All of lore.kernel.org
 help / color / mirror / Atom feed
* Build issue on arm: undefined reference to `get_cpu_clock'
@ 2010-08-10 12:11 Michael Opdenacker
  2010-08-10 18:04 ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Opdenacker @ 2010-08-10 12:11 UTC (permalink / raw)
  To: fio mailing list

Hello,

Though the arm platform seems to be supported, fio fails to build on the
arm platform. Other non Intel platforms should also be impacted.

gettime.o: In function `get_cycles_per_usec':
/home/ubuntu/.phoronix-test-suite/installed-tests/fio/fio-1.42/gettime.c:192:
undefined reference to `get_cpu_clock'
/home/ubuntu/.phoronix-test-suite/installed-tests/fio/fio-1.42/gettime.c:199:
undefined reference to `get_cpu_clock'
make: *** [fio] Error 1

Unlike in the fio_gettime, where there is an "#ifdef
ARCH_HAVE_CPU_CLOCK" statement around the calls to get_cpu_clock(),
there are other places where this function is used unconditionally.

The get_cpu_clock function is only defined in
arch/arch-ia64.h
arch/arch-x86.h
arch/arch-x86_64.h

How are other architectures supported? I don't understand fio can
support them without defining the get_cpu_clock() function.

I did my tests on version 1.42, but faced the same issues with the
latest git version.

Thank you in advance.

Cheers,

Michael.

-- 
Michael Opdenacker, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
+ 33 621 604 642


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Build issue on arm: undefined reference to `get_cpu_clock'
  2010-08-10 12:11 Build issue on arm: undefined reference to `get_cpu_clock' Michael Opdenacker
@ 2010-08-10 18:04 ` Jens Axboe
  2010-08-12  9:04   ` Michael Opdenacker
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2010-08-10 18:04 UTC (permalink / raw)
  To: Michael Opdenacker; +Cc: fio mailing list

On 08/10/2010 08:11 AM, Michael Opdenacker wrote:
> Hello,
> 
> Though the arm platform seems to be supported, fio fails to build on the
> arm platform. Other non Intel platforms should also be impacted.
> 
> gettime.o: In function `get_cycles_per_usec':
> /home/ubuntu/.phoronix-test-suite/installed-tests/fio/fio-1.42/gettime.c:192:
> undefined reference to `get_cpu_clock'
> /home/ubuntu/.phoronix-test-suite/installed-tests/fio/fio-1.42/gettime.c:199:
> undefined reference to `get_cpu_clock'
> make: *** [fio] Error 1
> 
> Unlike in the fio_gettime, where there is an "#ifdef
> ARCH_HAVE_CPU_CLOCK" statement around the calls to get_cpu_clock(),
> there are other places where this function is used unconditionally.
> 
> The get_cpu_clock function is only defined in
> arch/arch-ia64.h
> arch/arch-x86.h
> arch/arch-x86_64.h
> 
> How are other architectures supported? I don't understand fio can
> support them without defining the get_cpu_clock() function.
> 
> I did my tests on version 1.42, but faced the same issues with the
> latest git version.

Indeed, dunno what happened there. I'll take a look.

-- 
Jens Axboe


Confidentiality Notice: This e-mail message, its contents and any attachments to it are confidential to the intended recipient, and may contain information that is privileged and/or exempt from disclosure under applicable law. If you are not the intended recipient, please immediately notify the sender and destroy the original e-mail message and any attachments (and any copies that may have been made) from your system or otherwise. Any unauthorized use, copying, disclosure or distribution of this information is strictly prohibited.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Build issue on arm: undefined reference to `get_cpu_clock'
  2010-08-10 18:04 ` Jens Axboe
@ 2010-08-12  9:04   ` Michael Opdenacker
  2010-08-12 11:49     ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Opdenacker @ 2010-08-12  9:04 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio mailing list

Hi Jens,

On 08/10/2010 08:04 PM, Jens Axboe wrote:
> On 08/10/2010 08:11 AM, Michael Opdenacker wrote:
>> The get_cpu_clock function is only defined in
>> arch/arch-ia64.h
>> arch/arch-x86.h
>> arch/arch-x86_64.h
>>
>> How are other architectures supported? I don't understand fio can
>> support them without defining the get_cpu_clock() function.
>>
>> I did my tests on version 1.42, but faced the same issues with the
>> latest git version.
>>     
> Indeed, dunno what happened there. I'll take a look.
>   
I have seen your addition of get_cpu_clock() for the ppc architecture.

By the way, wouldn't it be more portable to use the POSIX
clock_gettime() function instead of reading an architecture dependent
register? At least, this is recommended on
http://en.wikipedia.org/wiki/Time_Stamp_Counter

Thank you for your support,

Cheers,

Michael.

-- 
Michael Opdenacker, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
+ 33 621 604 642


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Build issue on arm: undefined reference to `get_cpu_clock'
  2010-08-12  9:04   ` Michael Opdenacker
@ 2010-08-12 11:49     ` Jens Axboe
  2010-08-15 19:03       ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2010-08-12 11:49 UTC (permalink / raw)
  To: Michael Opdenacker; +Cc: fio mailing list

On 08/12/2010 05:04 AM, Michael Opdenacker wrote:
> Hi Jens,
> 
> On 08/10/2010 08:04 PM, Jens Axboe wrote:
>> On 08/10/2010 08:11 AM, Michael Opdenacker wrote:
>>> The get_cpu_clock function is only defined in
>>> arch/arch-ia64.h
>>> arch/arch-x86.h
>>> arch/arch-x86_64.h
>>>
>>> How are other architectures supported? I don't understand fio can
>>> support them without defining the get_cpu_clock() function.
>>>
>>> I did my tests on version 1.42, but faced the same issues with the
>>> latest git version.
>>>     
>> Indeed, dunno what happened there. I'll take a look.
>>   
> I have seen your addition of get_cpu_clock() for the ppc architecture.
> 
> By the way, wouldn't it be more portable to use the POSIX
> clock_gettime() function instead of reading an architecture dependent
> register? At least, this is recommended on
> http://en.wikipedia.org/wiki/Time_Stamp_Counter

Of course using clock_gettime() would be more portable. The
point of the CPU clock is speed. If you are testing IOPS into
the ranges of millions and doing ~5 clock calls per IO, then
portability takes a back seat to speed.

But arm needs to work of course, I will commit a patch to
fix it as soon as I can.

-- 
Jens Axboe


Confidentiality Notice: This e-mail message, its contents and any attachments to it are confidential to the intended recipient, and may contain information that is privileged and/or exempt from disclosure under applicable law. If you are not the intended recipient, please immediately notify the sender and destroy the original e-mail message and any attachments (and any copies that may have been made) from your system or otherwise. Any unauthorized use, copying, disclosure or distribution of this information is strictly prohibited.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Build issue on arm: undefined reference to `get_cpu_clock'
  2010-08-12 11:49     ` Jens Axboe
@ 2010-08-15 19:03       ` Jens Axboe
  2010-08-16 12:59         ` Michael Opdenacker
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2010-08-15 19:03 UTC (permalink / raw)
  To: Michael Opdenacker; +Cc: fio mailing list

On 08/12/2010 07:49 AM, Jens Axboe wrote:
> On 08/12/2010 05:04 AM, Michael Opdenacker wrote:
>> Hi Jens,
>>
>> On 08/10/2010 08:04 PM, Jens Axboe wrote:
>>> On 08/10/2010 08:11 AM, Michael Opdenacker wrote:
>>>> The get_cpu_clock function is only defined in
>>>> arch/arch-ia64.h
>>>> arch/arch-x86.h
>>>> arch/arch-x86_64.h
>>>>
>>>> How are other architectures supported? I don't understand fio can
>>>> support them without defining the get_cpu_clock() function.
>>>>
>>>> I did my tests on version 1.42, but faced the same issues with the
>>>> latest git version.
>>>>     
>>> Indeed, dunno what happened there. I'll take a look.
>>>   
>> I have seen your addition of get_cpu_clock() for the ppc architecture.
>>
>> By the way, wouldn't it be more portable to use the POSIX
>> clock_gettime() function instead of reading an architecture dependent
>> register? At least, this is recommended on
>> http://en.wikipedia.org/wiki/Time_Stamp_Counter
> 
> Of course using clock_gettime() would be more portable. The
> point of the CPU clock is speed. If you are testing IOPS into
> the ranges of millions and doing ~5 clock calls per IO, then
> portability takes a back seat to speed.
> 
> But arm needs to work of course, I will commit a patch to
> fix it as soon as I can.

Committed such a patch, would be nice if you could test.
Either git pull or download fio-1.43-rc1 (or latest snap).

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Build issue on arm: undefined reference to `get_cpu_clock'
  2010-08-15 19:03       ` Jens Axboe
@ 2010-08-16 12:59         ` Michael Opdenacker
  2010-08-16 22:27           ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Opdenacker @ 2010-08-16 12:59 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio mailing list

Hi Jens,

On 08/15/2010 09:03 PM, Jens Axboe wrote:
>
>> Of course using clock_gettime() would be more portable. The
>> point of the CPU clock is speed. If you are testing IOPS into
>> the ranges of millions and doing ~5 clock calls per IO, then
>> portability takes a back seat to speed.
>>
>> But arm needs to work of course, I will commit a patch to
>> fix it as soon as I can.
>>     
> Committed such a patch, would be nice if you could test.
> Either git pull or download fio-1.43-rc1 (or latest snap).
>   
Many thanks for the patch!

I had no problem compiling it on ARM, and I ran it with no problem on an
example job file:

[random-writers]
ioengine=libaio
iodepth=4
rw=randwrite
bs=32k
direct=0
size=64m
numjobs=4

Now, you may modify the README file to mention that the ARM platform is
supported too.

Thanks again,

Cheers,

Michael.

-- 
Michael Opdenacker, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
+ 33 621 604 642


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Build issue on arm: undefined reference to `get_cpu_clock'
  2010-08-16 12:59         ` Michael Opdenacker
@ 2010-08-16 22:27           ` Jens Axboe
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2010-08-16 22:27 UTC (permalink / raw)
  To: Michael Opdenacker; +Cc: fio mailing list

On 08/16/2010 08:59 AM, Michael Opdenacker wrote:
> Hi Jens,
> 
> On 08/15/2010 09:03 PM, Jens Axboe wrote:
>>
>>> Of course using clock_gettime() would be more portable. The
>>> point of the CPU clock is speed. If you are testing IOPS into
>>> the ranges of millions and doing ~5 clock calls per IO, then
>>> portability takes a back seat to speed.
>>>
>>> But arm needs to work of course, I will commit a patch to
>>> fix it as soon as I can.
>>>     
>> Committed such a patch, would be nice if you could test.
>> Either git pull or download fio-1.43-rc1 (or latest snap).
>>   
> Many thanks for the patch!
> 
> I had no problem compiling it on ARM, and I ran it with no problem on an
> example job file:
> 
> [random-writers]
> ioengine=libaio
> iodepth=4
> rw=randwrite
> bs=32k
> direct=0
> size=64m
> numjobs=4
> 
> Now, you may modify the README file to mention that the ARM platform is
> supported too.

Great, thanks for confirming.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-16 22:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-10 12:11 Build issue on arm: undefined reference to `get_cpu_clock' Michael Opdenacker
2010-08-10 18:04 ` Jens Axboe
2010-08-12  9:04   ` Michael Opdenacker
2010-08-12 11:49     ` Jens Axboe
2010-08-15 19:03       ` Jens Axboe
2010-08-16 12:59         ` Michael Opdenacker
2010-08-16 22:27           ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.