Re: [PATCH] tools/power turbostat: call pread64 in kernel directly

2020-09-03 Thread Len Brown
> -D_FILE_OFFSET_BITS=64 Applied. thanks! -Len On Mon, Aug 24, 2020 at 12:09 AM Liwei Song wrote: > > > > On 8/24/20 04:54, Alexander Monakov wrote: > > Hi, > > > > I am not the original submitter, but I have answers and a proper patch :) > > > > On Fri, 21 Aug 2020, Len Brown wrote: > > > >> R

Re: [PATCH] tools/power turbostat: call pread64 in kernel directly

2020-08-23 Thread Liwei Song
On 8/24/20 04:54, Alexander Monakov wrote: > Hi, > > I am not the original submitter, but I have answers and a proper patch :) > > On Fri, 21 Aug 2020, Len Brown wrote: > >> Re: offset size >> >> The offsets on this file are the MSR offsets. >> What MSR are you trying to access at offset 0xc0

Re: [PATCH] tools/power turbostat: call pread64 in kernel directly

2020-08-23 Thread Alexander Monakov
Hi, I am not the original submitter, but I have answers and a proper patch :) On Fri, 21 Aug 2020, Len Brown wrote: > Re: offset size > > The offsets on this file are the MSR offsets. > What MSR are you trying to access at offset 0xc0010299? This MSR is particular is part of AMD RAPL (energy m

Re: [PATCH] tools/power turbostat: call pread64 in kernel directly

2020-08-21 Thread Len Brown
Re: offset size The offsets on this file are the MSR offsets. What MSR are you trying to access at offset 0xc0010299? Re: pread vs pread64 If I take on faith that you have some kind of 32-bit execution environment that makes pread into pread32 instead of pread64, and that truncates an off_t to 3

Re: [PATCH] tools/power turbostat: call pread64 in kernel directly

2020-08-13 Thread Liwei Song
with multilib lib32 support, the rootfs will be 32-bit, the kernel is still 64-bit, in this case run turbostat will failed with "out of range" error. Thanks, Liwei. On 8/14/20 05:43, Len Brown wrote: > Huh? > > On Fri, Jul 17, 2020 at 2:09 AM Liwei Song wrote: >> >> with 32-bit rootfs, the off

Re: [PATCH] tools/power turbostat: call pread64 in kernel directly

2020-08-13 Thread Len Brown
Huh? On Fri, Jul 17, 2020 at 2:09 AM Liwei Song wrote: > > with 32-bit rootfs, the offset may out of range when set it > to 0xc0010299, define it as "unsigned long long" type and > call pread64 directly in kernel. > > Signed-off-by: Liwei Song > --- > tools/power/x86/turbostat/turbostat.c | 5 +