Re: Differences between builtins and modules

2018-05-10 Thread Jason Vas Dias
Sorry I didn't see this mail until now - RE: Randy Dunlap wrote: > Would someone please answer/reply to this (related) kernel bugzilla entry: > https://bugzilla.kernel.org/show_bug.cgi?id=118661 Yes, I raised this bug because I think modinfo should return 0 exit status if

Re: Differences between builtins and modules

2018-05-10 Thread Jason Vas Dias
Sorry I didn't see this mail until now - RE: Randy Dunlap wrote: > Would someone please answer/reply to this (related) kernel bugzilla entry: > https://bugzilla.kernel.org/show_bug.cgi?id=118661 Yes, I raised this bug because I think modinfo should return 0 exit status if a requested module is

Re: [PATCH v4.16-rc6 1/1] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-23 Thread Jason Vas Dias
Good day - I believe the last patch I sent, with $subject, addresses all concerns raised so far by reviewers, and complies with all kernel coding standards . Please, it would be most helpful if you could let me know whether the patch is now acceptable and will be applied at some stage or not -

Re: [PATCH v4.16-rc6 1/1] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-23 Thread Jason Vas Dias
Good day - I believe the last patch I sent, with $subject, addresses all concerns raised so far by reviewers, and complies with all kernel coding standards . Please, it would be most helpful if you could let me know whether the patch is now acceptable and will be applied at some stage or not -

[PATCH v4.16-rc6 1/1] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-21 Thread jason . vas . dias
This patch implements clock_gettime(CLOCK_MONOTONIC_RAW,) calls entirely in the vDSO, without calling vdso_fallback_gettime() . It has been augmented to support compilation with or without -DRETPOLINE / $(RETPOLINE_CFLAGS) ; when compiled with -DRETPOLINE, not all functions

[PATCH v4.16-rc6 1/1] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-21 Thread jason . vas . dias
This patch implements clock_gettime(CLOCK_MONOTONIC_RAW,) calls entirely in the vDSO, without calling vdso_fallback_gettime() . It has been augmented to support compilation with or without -DRETPOLINE / $(RETPOLINE_CFLAGS) ; when compiled with -DRETPOLINE, not all functions

[PATCH v4.16-rc6 (1)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-21 Thread jason . vas . dias
d by H.J. Liu, was not applied first - Sorry! Thanks & Best Regards, Jason Vas Dias

[PATCH v4.16-rc6 (1)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-21 Thread jason . vas . dias
d by H.J. Liu, was not applied first - Sorry! Thanks & Best Regards, Jason Vas Dias

Re: [PATCH v4.16-rc6 (1)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-19 Thread Jason Vas Dias
Note there is a bug raised by H.J. Liu : Bug 199129: Don't build vDSO with $(RETPOLINE_CFLAGS) -DRETPOLINE (https://bugzilla.kernel.org/show_bug.cgi?id=199129) If you agree it is a bug, then use both patches from post : '[PATCH v4.16-rc5 (2)] x86/vdso: VDSO should handle \

Re: [PATCH v4.16-rc6 (1)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-19 Thread Jason Vas Dias
Note there is a bug raised by H.J. Liu : Bug 199129: Don't build vDSO with $(RETPOLINE_CFLAGS) -DRETPOLINE (https://bugzilla.kernel.org/show_bug.cgi?id=199129) If you agree it is a bug, then use both patches from post : '[PATCH v4.16-rc5 (2)] x86/vdso: VDSO should handle \

[PATCH v4.16-rc6 1/1] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-19 Thread jason . vas . dias
This patch makes the vDSO handle clock_gettime(CLOCK_MONOTONIC_RAW,) calls in the same way it handles clock_gettime(CLOCK_MONOTONIC,) calls, reducing latency from @ 200-1000ns to @ 20ns. It has been resent and augmented to support compilation with

[PATCH v4.16-rc6 1/1] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-19 Thread jason . vas . dias
This patch makes the vDSO handle clock_gettime(CLOCK_MONOTONIC_RAW,) calls in the same way it handles clock_gettime(CLOCK_MONOTONIC,) calls, reducing latency from @ 200-1000ns to @ 20ns. It has been resent and augmented to support compilation with

[PATCH v4.16-rc6 (1)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-19 Thread jason . vas . dias
call on the same machine has a latency of @ 20ns. Please consider applying something like this patch to a future Linux release. Thanks & Best Regards, Jason Vas Dias

[PATCH v4.16-rc6 (1)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-19 Thread jason . vas . dias
call on the same machine has a latency of @ 20ns. Please consider applying something like this patch to a future Linux release. Thanks & Best Regards, Jason Vas Dias

Re: [PATCH v4.16-rc5 2/2] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread Jason Vas Dias
On 18/03/2018, Jason Vas Dias <jason.vas.d...@gmail.com> wrote: (should have CC'ed to list, sorry) > On 17/03/2018, Andi Kleen <a...@firstfloor.org> wrote: >> >> That's quite a mischaracterization of the issue. gcc works as intended, >> but the kernel did not

Re: [PATCH v4.16-rc5 2/2] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread Jason Vas Dias
On 18/03/2018, Jason Vas Dias wrote: (should have CC'ed to list, sorry) > On 17/03/2018, Andi Kleen wrote: >> >> That's quite a mischaracterization of the issue. gcc works as intended, >> but the kernel did not correctly supply a indirect call retpoline thunk >> to the

Re: [PATCH v4.16-rc5 (2)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread Jason Vas Dias
fixed typo in timer_latency.c affecting only -r printout : $ gcc -DN_SAMPLES=1000 -o timer timer_latency.c CLOCK_MONOTONIC ( using rdtscp_ordered() ) : $ ./timer -m -r 10 sum: 67615 Total time: 0.67615S - Average Latency: 0.00067S N zero deltas: 0 N inconsistent deltas: 0 sum: 51858

Re: [PATCH v4.16-rc5 (2)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread Jason Vas Dias
fixed typo in timer_latency.c affecting only -r printout : $ gcc -DN_SAMPLES=1000 -o timer timer_latency.c CLOCK_MONOTONIC ( using rdtscp_ordered() ) : $ ./timer -m -r 10 sum: 67615 Total time: 0.67615S - Average Latency: 0.00067S N zero deltas: 0 N inconsistent deltas: 0 sum: 51858

re: [PATCH v4.16-rc5 (2)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread Jason Vas Dias
tency.c'). I do apologize for whitespace errors, unread emails and resends and confusion of previous emails - I now understand the process and standards much better and will attempt to adhere to them more closely in future. Thanks & Best Regards, Jason Vas Dias /* * Program to measure high-res

re: [PATCH v4.16-rc5 (2)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread Jason Vas Dias
apologize for whitespace errors, unread emails and resends and confusion of previous emails - I now understand the process and standards much better and will attempt to adhere to them more closely in future. Thanks & Best Regards, Jason Vas Dias /* * Program to measure high-res timer latency.

[PATCH v4.16-rc5 2/2] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread jason . vas . dias
This patch allows compilation to succeed with compilers that support -DRETPOLINE - it was kindly contributed by H.J. Liu in GCC Bugzilla: 84908 : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84908 Apparently the GCC retpoline implementation has a limitation

[PATCH v4.16-rc5 2/2] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread jason . vas . dias
This patch allows compilation to succeed with compilers that support -DRETPOLINE - it was kindly contributed by H.J. Liu in GCC Bugzilla: 84908 : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84908 Apparently the GCC retpoline implementation has a limitation

[PATCH v4.16-rc5 (2)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread jason . vas . dias
AW,) calls - after the patch, the same call on the same machine has a latency of @ 20ns. Thanks & Best Regards, Jason Vas Dias

[PATCH v4.16-rc5 (2)] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread jason . vas . dias
AW,) calls - after the patch, the same call on the same machine has a latency of @ 20ns. Thanks & Best Regards, Jason Vas Dias

[PATCH v4.16-rc5 1/2] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread jason . vas . dias
This patch makes the vDSO handle clock_gettime(CLOCK_MONOTONIC_RAW,) calls in the same way it handles clock_gettime(CLOCK_MONOTONIC,) calls, reducing latency from @ 200-1000ns to @ 20ns. diff --git a/arch/x86/entry/vdso/vclock_gettime.c

[PATCH v4.16-rc5 1/2] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-17 Thread jason . vas . dias
This patch makes the vDSO handle clock_gettime(CLOCK_MONOTONIC_RAW,) calls in the same way it handles clock_gettime(CLOCK_MONOTONIC,) calls, reducing latency from @ 200-1000ns to @ 20ns. diff --git a/arch/x86/entry/vdso/vclock_gettime.c

Re: [PATCH v4.16-rc5 (3)] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-16 Thread Jason Vas Dias
Good day - RE: On 15/03/2018, Thomas Gleixner <t...@linutronix.de> wrote: > On Thu, 15 Mar 2018, Jason Vas Dias wrote: >> On 15/03/2018, Thomas Gleixner <t...@linutronix.de> wrote: >> > On Thu, 15 Mar 2018, jason.vas.d...@gmail.com wrote: >> > >

Re: [PATCH v4.16-rc5 (3)] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-16 Thread Jason Vas Dias
Good day - RE: On 15/03/2018, Thomas Gleixner wrote: > On Thu, 15 Mar 2018, Jason Vas Dias wrote: >> On 15/03/2018, Thomas Gleixner wrote: >> > On Thu, 15 Mar 2018, jason.vas.d...@gmail.com wrote: >> > >> >> Resent to address reviewer comments. >>

[PATCH v4.16-rc5 1/1] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-15 Thread jason . vas . dias
) are attached to bug #198161, as is the test program, timer_latency.c, to demonstrate the problem. Before the patch a latency of 200-1000ns was measured for clock_gettime(CLOCK_MONOTONIC_RAW,) calls - after the patch, the same call on the same machine has a latency of @ 20ns. Thanks & Best Regards, Jason Vas Dias

[PATCH v4.16-rc5 1/1] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-15 Thread jason . vas . dias
) are attached to bug #198161, as is the test program, timer_latency.c, to demonstrate the problem. Before the patch a latency of 200-1000ns was measured for clock_gettime(CLOCK_MONOTONIC_RAW,) calls - after the patch, the same call on the same machine has a latency of @ 20ns. Thanks & Best Regards, Jason Vas Dias

[PATCH v4.16-rc5 1/1] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-15 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index f19856d..8b9b9cf 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -182,27 +182,49 @@ notrace static u64 vread_tsc(void) return last; } -notrace

[PATCH v4.16-rc5 1/1] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall

2018-03-15 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index f19856d..8b9b9cf 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -182,27 +182,49 @@ notrace static u64 vread_tsc(void) return last; } -notrace

Re: [PATCH v4.16-rc5 (3)] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-15 Thread Jason Vas Dias
Hi Thomas - RE: On 15/03/2018, Thomas Gleixner wrote: > Jason, > > On Thu, 15 Mar 2018, jason.vas.d...@gmail.com wrote: > >> Resent to address reviewer comments. > > I was being patient so far and tried to guide you through the patch > submission process, but unfortunately

Re: [PATCH v4.16-rc5 (3)] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-15 Thread Jason Vas Dias
Hi Thomas - RE: On 15/03/2018, Thomas Gleixner wrote: > Jason, > > On Thu, 15 Mar 2018, jason.vas.d...@gmail.com wrote: > >> Resent to address reviewer comments. > > I was being patient so far and tried to guide you through the patch > submission process, but unfortunately this turns out to be

[PATCH v4.16-rc5 (3)] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-15 Thread jason . vas . dias
o include patches #2 and #3, but I think something like Patch #1 really needs to get into a future Linux release, as an unecessary latency of 200-1000ns for a timer that can tick 3 times per nanosecond is unacceptable. Patches for kernels 3.10.0-21 and 4.9.65-rt23 (ARM) are attached to bug

[PATCH v4.16-rc5 (3)] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-15 Thread jason . vas . dias
o include patches #2 and #3, but I think something like Patch #1 really needs to get into a future Linux release, as an unecessary latency of 200-1000ns for a timer that can tick 3 times per nanosecond is unacceptable. Patches for kernels 3.10.0-21 and 4.9.65-rt23 (ARM) are attached to bug

[PATCH v4.16-rc5 2/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-15 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index fbc7371..2c46675 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -184,10 +184,9 @@ notrace static u64 vread_tsc(void) notrace static u64

[PATCH v4.16-rc5 2/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-15 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index fbc7371..2c46675 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -184,10 +184,9 @@ notrace static u64 vread_tsc(void) notrace static u64

[PATCH v4.16-rc5 1/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-15 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index f19856d..fbc7371 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -182,6 +182,18 @@ notrace static u64 vread_tsc(void) return last; } +notrace

[PATCH v4.16-rc5 1/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-15 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index f19856d..fbc7371 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -182,6 +182,18 @@ notrace static u64 vread_tsc(void) return last; } +notrace

[PATCH v4.16-rc5 3/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-15 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index 03f3904..61d9633 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -21,12 +21,15 @@ #include #include #include +#include #define gtod

[PATCH v4.16-rc5 3/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-15 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index 03f3904..61d9633 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -21,12 +21,15 @@ #include #include #include +#include #define gtod

Re: [PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-14 Thread Jason Vas Dias
Thanks for the helpful comments, Peter - re: On 14/03/2018, Peter Zijlstra wrote: > >> Yes, I am sampling perf counters, > > You're not in fact sampling, you're just reading the counters. Correct, using Linux-ese terminology - but "sampling" in looser English. >> Reading

Re: [PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-14 Thread Jason Vas Dias
Thanks for the helpful comments, Peter - re: On 14/03/2018, Peter Zijlstra wrote: > >> Yes, I am sampling perf counters, > > You're not in fact sampling, you're just reading the counters. Correct, using Linux-ese terminology - but "sampling" in looser English. >> Reading performance counters

[PATCH v4.16-rc5 1/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-13 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index f19856d..fbc7371 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -182,6 +182,18 @@ notrace static u64 vread_tsc(void) return last; } +notrace

[PATCH v4.16-rc5 1/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-13 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index f19856d..fbc7371 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -182,6 +182,18 @@ notrace static u64 vread_tsc(void) return last; } +notrace

[PATCH v4.16-rc5 (3)] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-13 Thread jason . vas . dias
ttime(CLOCK_MONOTONIC_RAW) calls have @ half the latency of clock_gettime(CLOCK_MONOTONIC) calls. I think something like Patch #3 is necessary to export TSC calibration data to user-space TSC readers. Best Regards, Jason Vas Dias

[PATCH v4.16-rc5 (3)] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-13 Thread jason . vas . dias
ttime(CLOCK_MONOTONIC_RAW) calls have @ half the latency of clock_gettime(CLOCK_MONOTONIC) calls. I think something like Patch #3 is necessary to export TSC calibration data to user-space TSC readers. Best Regards, Jason Vas Dias

[PATCH v4.16-rc5 2/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-13 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index fbc7371..2c46675 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -184,10 +184,9 @@ notrace static u64 vread_tsc(void) notrace static u64

[PATCH v4.16-rc5 2/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-13 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index fbc7371..2c46675 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -184,10 +184,9 @@ notrace static u64 vread_tsc(void) notrace static u64

[PATCH v4.16-rc5 3/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-13 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index 2c46675..772988c 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -21,6 +21,7 @@ #include #include #include +#include #define gtod

[PATCH v4.16-rc5 3/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-13 Thread jason . vas . dias
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index 2c46675..772988c 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -21,6 +21,7 @@ #include #include #include +#include #define gtod

Re: [PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-13 Thread Jason Vas Dias
On 12/03/2018, Peter Zijlstra <pet...@infradead.org> wrote: > On Mon, Mar 12, 2018 at 07:01:20AM +0000, Jason Vas Dias wrote: >> Sometimes, particularly when correlating elapsed time to performance >> counter values, > > So what actual problem are you tring to s

Re: [PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-13 Thread Jason Vas Dias
On 12/03/2018, Peter Zijlstra wrote: > On Mon, Mar 12, 2018 at 07:01:20AM +0000, Jason Vas Dias wrote: >> Sometimes, particularly when correlating elapsed time to performance >> counter values, > > So what actual problem are you tring to solve here? Perf can already &

Re: [PATCH v4.16-rc4 1/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
The split patches with no checkpatch.pl failures are attached and were just sent in separate emails to the mailing list . Sorry it took a few tries to get right . This will be my last send today - I'm off to use it at work. Thanks & all the best, Jason

Re: [PATCH v4.16-rc4 1/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
The split patches with no checkpatch.pl failures are attached and were just sent in separate emails to the mailing list . Sorry it took a few tries to get right . This will be my last send today - I'm off to use it at work. Thanks & all the best, Jason

[PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
it . This patch affects only files: arch/x86/include/asm/msr.h arch/x86/include/asm/vgtod.h arch/x86/entry/vdso/vclock_gettime.c arch/x86/entry/vsyscall/vsyscall_gtod.c This is the second patch in the series, which adds use of rdtscp . Best Regards, Jason Vas Dias

[PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
it . This patch affects only files: arch/x86/include/asm/msr.h arch/x86/include/asm/vgtod.h arch/x86/entry/vdso/vclock_gettime.c arch/x86/entry/vsyscall/vsyscall_gtod.c This is the second patch in the series, which adds use of rdtscp . Best Regards, Jason Vas Dias

[PATCH v4.16-rc4 1/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
he second uses new rstscp() function which avoids use of an explicit barrier. Best Regards, Jason Vas Dias . --- diff -up linux-4.16-rc5.1/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5 linux-4.16-rc5.1/arch/x86/entry/vdso/vclock_gettime.c --- linux-4.16-rc5.1/arch/x86/entry/vdso/v

[PATCH v4.16-rc4 1/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
he second uses new rstscp() function which avoids use of an explicit barrier. Best Regards, Jason Vas Dias . --- diff -up linux-4.16-rc5.1/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5 linux-4.16-rc5.1/arch/x86/entry/vdso/vclock_gettime.c --- linux-4.16-rc5.1/arch/x86/entry/vdso/v

Re: [PATCH v4.16-rc4 1/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
Good day - On 12/03/2018, Ingo Molnar <mi...@kernel.org> wrote: > > * Thomas Gleixner <t...@linutronix.de> wrote: > >> On Mon, 12 Mar 2018, Jason Vas Dias wrote: >> >> checkpatch.pl still reports: >> >>total: 15 errors, 3 warnings, 165 lin

Re: [PATCH v4.16-rc4 1/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
Good day - On 12/03/2018, Ingo Molnar wrote: > > * Thomas Gleixner wrote: > >> On Mon, 12 Mar 2018, Jason Vas Dias wrote: >> >> checkpatch.pl still reports: >> >>total: 15 errors, 3 warnings, 165 lines checked >> Sorry I didn't see you had r

[PATCH v4.16-rc4 1/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
ction . The patch passes the checkpatch.pl script . Best Regards, Jason Vas Dias . --- diff -up linux-4.16-rc5.1/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5 linux-4.16-rc5.1/arch/x86/entry/vdso/vclock_gettime.c --- linux-4.16-rc5.1/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5

[PATCH v4.16-rc4 1/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
ction . The patch passes the checkpatch.pl script . Best Regards, Jason Vas Dias . --- diff -up linux-4.16-rc5.1/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5 linux-4.16-rc5.1/arch/x86/entry/vdso/vclock_gettime.c --- linux-4.16-rc5.1/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5

[PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
on of this patch (#2), the comments in the new vdso_tsc_calibration were wrong, for an earlier version - sorry about that. Best Regards, Jason Vas Dias . PATCH 2/2: --- diff -up linux-4.16-rc5/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5-p1 linux-4.16-rc5/arch/x86/entry/vdso/vclock

[PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-12 Thread Jason Vas Dias
on of this patch (#2), the comments in the new vdso_tsc_calibration were wrong, for an earlier version - sorry about that. Best Regards, Jason Vas Dias . PATCH 2/2: --- diff -up linux-4.16-rc5/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5-p1 linux-4.16-rc5/arch/x86/entry/vdso/vclock

[PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
used by user-space code to implement sub-nanosecond precision clocks . This second patch is entirely optional but I think greatly expands the scope of user-space TSC readers . Oops, previous version of this second patch mistakenly copied the changed part of vclock_gettime.c. Best Reg

[PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
used by user-space code to implement sub-nanosecond precision clocks . This second patch is entirely optional but I think greatly expands the scope of user-space TSC readers . Oops, previous version of this second patch mistakenly copied the changed part of vclock_gettime.c. Best Reg

[PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
used by user-space code to implement sub-nanosecond precision clocks . This second patch is entirely optional but I think greatly expands the scope of user-space TSC readers . Best Regards, Jason Vas Dias . --- diff -up linux-4.16-rc5/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc

[PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
used by user-space code to implement sub-nanosecond precision clocks . This second patch is entirely optional but I think greatly expands the scope of user-space TSC readers . Best Regards, Jason Vas Dias . --- diff -up linux-4.16-rc5/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc

[PATCH v4.16-rc4 1/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
rs . Best Regards, Jason Vas Dias . --- diff -up linux-4.16-rc5/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5 linux-4.16-rc5/arch/x86/entry/vdso/vclock_gettime.c --- linux-4.16-rc5/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5 2018-03-12 00:25:09.0 + +++ linux-4.16-rc5

[PATCH v4.16-rc4 1/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
rs . Best Regards, Jason Vas Dias . --- diff -up linux-4.16-rc5/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5 linux-4.16-rc5/arch/x86/entry/vdso/vclock_gettime.c --- linux-4.16-rc5/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc5 2018-03-12 00:25:09.0 + +++ linux-4.16-rc5

Re: [PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
Thanks Thomas - On 11/03/2018, Thomas Gleixner <t...@linutronix.de> wrote: > On Sun, 11 Mar 2018, Jason Vas Dias wrote: > > This looks better now. Though running that patch through checkpatch.pl > results in: > > total: 28 errors, 20 warnings, 139 lines check

Re: [PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
Thanks Thomas - On 11/03/2018, Thomas Gleixner wrote: > On Sun, 11 Mar 2018, Jason Vas Dias wrote: > > This looks better now. Though running that patch through checkpatch.pl > results in: > > total: 28 errors, 20 warnings, 139 lines checked > Hmm, I was unaware of that scri

[PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
ion/coding-style.rst and calling 'indent-region' and 'tabify' (whitespace only changes) - SORRY ! (and even after that, somehow 2 '\t\n's got left in vgtod.h - now removed - sorry again!) . Best Regards, Jason Vas Dias . PATCH: --- diff -up linux-4.16-rc4/arch/x86/entry/vdso/vcloc

[PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
ion/coding-style.rst and calling 'indent-region' and 'tabify' (whitespace only changes) - SORRY ! (and even after that, somehow 2 '\t\n's got left in vgtod.h - now removed - sorry again!) . Best Regards, Jason Vas Dias . PATCH: --- diff -up linux-4.16-rc4/arch/x86/entry/vdso/vcloc

[PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
ion/coding-style.rst and calling 'indent-region' and 'tabify' (whitespace only changes) - SORRY ! Best Regards, Jason Vas Dias . --- diff -up linux-4.16-rc4/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc4 linux-4.16-rc4/arch/x86/entry/vdso/vclock_gettime.c --- linux-4.16-rc4

[PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-11 Thread Jason Vas Dias
ion/coding-style.rst and calling 'indent-region' and 'tabify' (whitespace only changes) - SORRY ! Best Regards, Jason Vas Dias . --- diff -up linux-4.16-rc4/arch/x86/entry/vdso/vclock_gettime.c.4.16-rc4 linux-4.16-rc4/arch/x86/entry/vdso/vclock_gettime.c --- linux-4.16-rc4

Re: Fwd: [PATCH v4.15.7 1/1] on Intel, VDSO should handle CLOCK_MONOTONIC_RAW and export 'tsc_calibration' pointer

2018-03-10 Thread Jason Vas Dias
latencies down from > 300ns to < 20ns . Maybe I should post that also to kernel.org, or to ti.com ? I have a separate patch for the vdso_tsc_calibration export of the tsc_khz and calibration which no longer returns pointers into the VDSO - I can post this as a patch if you like. Thanks

Re: Fwd: [PATCH v4.15.7 1/1] on Intel, VDSO should handle CLOCK_MONOTONIC_RAW and export 'tsc_calibration' pointer

2018-03-10 Thread Jason Vas Dias
ns to < 20ns . Maybe I should post that also to kernel.org, or to ti.com ? I have a separate patch for the vdso_tsc_calibration export of the tsc_khz and calibration which no longer returns pointers into the VDSO - I can post this as a patch if you like. Thanks & Best Regards, Jason Va

[PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-10 Thread Jason Vas Dias
tree, current HEAD of : git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git . The patch affects only files: arch/x86/include/asm/vgtod.h arch/x86/entry/vdso/vclock_gettime.c arch/x86/entry/vsyscall/vsyscall_gtod.c Best Regards, Jason Vas Dias

[PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-10 Thread Jason Vas Dias
tree, current HEAD of : git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git . The patch affects only files: arch/x86/include/asm/vgtod.h arch/x86/entry/vdso/vclock_gettime.c arch/x86/entry/vsyscall/vsyscall_gtod.c Best Regards, Jason Vas Dias

Re: [PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-10 Thread Jason Vas Dias
Oops, please disregard 1st mail on $subject - I guess use of Quoted Printable is not a way of getting past the email line length. Patch I tried to send is attached as attachment - will resend inline using other method. Sorry, Regards, Jason vdso_monotonic_raw-v4.16-rc4.patch Description:

Re: [PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-10 Thread Jason Vas Dias
Oops, please disregard 1st mail on $subject - I guess use of Quoted Printable is not a way of getting past the email line length. Patch I tried to send is attached as attachment - will resend inline using other method. Sorry, Regards, Jason vdso_monotonic_raw-v4.16-rc4.patch Description:

[PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-10 Thread Jason Vas Dias
, current HEAD of : git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git . The patch affects only files: arch/x86/include/asm/vgtod.h arch/x86/entry/vdso/vclock_gettime.c arch/x86/entry/vsyscall/vsyscall_gtod.c Best Regards, Jason Vas Dias . --- diff -up

[PATCH v4.16-rc4 1/1] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW

2018-03-10 Thread Jason Vas Dias
, current HEAD of : git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git . The patch affects only files: arch/x86/include/asm/vgtod.h arch/x86/entry/vdso/vclock_gettime.c arch/x86/entry/vsyscall/vsyscall_gtod.c Best Regards, Jason Vas Dias . --- diff -up

Re: Fwd: [PATCH v4.15.7 1/1] on Intel, VDSO should handle CLOCK_MONOTONIC_RAW and export 'tsc_calibration' pointer

2018-03-08 Thread Jason Vas Dias
On 08/03/2018, Thomas Gleixner <t...@linutronix.de> wrote: > On Tue, 6 Mar 2018, Jason Vas Dias wrote: >> I will prepare a new patch that meets submission + coding style guidelines >> and >> does not expose pointers within the vsyscall_gtod_data region to >> user-s

Re: Fwd: [PATCH v4.15.7 1/1] on Intel, VDSO should handle CLOCK_MONOTONIC_RAW and export 'tsc_calibration' pointer

2018-03-08 Thread Jason Vas Dias
On 08/03/2018, Thomas Gleixner wrote: > On Tue, 6 Mar 2018, Jason Vas Dias wrote: >> I will prepare a new patch that meets submission + coding style guidelines >> and >> does not expose pointers within the vsyscall_gtod_data region to >> user-space code - >>

[PATCH v4.15.7 1/1] x86/vdso: handle clock_gettime(CLOCK_MONOTONIC_RAW, ) in VDSO

2018-03-06 Thread Jason Vas Dias
Handling clock_gettime( CLOCK_MONOTONIC_RAW, ) by calling vdso_fallback_gettime(), ie. syscall, is too slow - latencies of 300-700ns are common on Haswell (06:3C) CPUs . This patch against the 4.15.7 stable branch makes the VDSO handle clock_gettime(CLOCK_GETTIME_RAW, ) by issuing rdtscp in

[PATCH v4.15.7 1/1] x86/vdso: handle clock_gettime(CLOCK_MONOTONIC_RAW, ) in VDSO

2018-03-06 Thread Jason Vas Dias
Handling clock_gettime( CLOCK_MONOTONIC_RAW, ) by calling vdso_fallback_gettime(), ie. syscall, is too slow - latencies of 300-700ns are common on Haswell (06:3C) CPUs . This patch against the 4.15.7 stable branch makes the VDSO handle clock_gettime(CLOCK_GETTIME_RAW, ) by issuing rdtscp in

Fwd: [PATCH v4.15.7 1/1] on Intel, VDSO should handle CLOCK_MONOTONIC_RAW and export 'tsc_calibration' pointer

2018-03-06 Thread Jason Vas Dias
On 06/03/2018, Thomas Gleixner <t...@linutronix.de> wrote: > Jason, > > On Mon, 5 Mar 2018, Jason Vas Dias wrote: > > thanks for providing this. A few formal nits first. > > Please read Documentation/process/submitting-patches.rst > > Patches need a concise subjec

Fwd: [PATCH v4.15.7 1/1] on Intel, VDSO should handle CLOCK_MONOTONIC_RAW and export 'tsc_calibration' pointer

2018-03-06 Thread Jason Vas Dias
On 06/03/2018, Thomas Gleixner wrote: > Jason, > > On Mon, 5 Mar 2018, Jason Vas Dias wrote: > > thanks for providing this. A few formal nits first. > > Please read Documentation/process/submitting-patches.rst > > Patches need a concise subject line and the

[PATCH v4.15.7 1/1] on Intel, VDSO should handle CLOCK_MONOTONIC_RAW and export 'tsc_calibration' pointer

2018-03-04 Thread Jason Vas Dias
alues somehow . The documentation states for CLOCK_MONOTONIC_RAW that it is the same as CLOCK_MONOTONIC except it is NOT subject to NTP adjustments . This is very far from the case currently, without a patch like the one above. And the kernel should not restrict user-space programs to only being

[PATCH v4.15.7 1/1] on Intel, VDSO should handle CLOCK_MONOTONIC_RAW and export 'tsc_calibration' pointer

2018-03-04 Thread Jason Vas Dias
alues somehow . The documentation states for CLOCK_MONOTONIC_RAW that it is the same as CLOCK_MONOTONIC except it is NOT subject to NTP adjustments . This is very far from the case currently, without a patch like the one above. And the kernel should not restrict user-space programs to only being able to either measure an NTP adjusted time value, or a time value difference of greater than 1000ns with any accuracy, on a modern Intel CPU whose TSC ticks 2.8 times per nanosecond (picosecond resolution is theoretically possible). Please, include something like the above patch in future Linux versions. Thanks & Best Regards, Jason Vas Dias

Re: perf Intel x86_64 : BUG: BRANCH_INSTRUCTIONS / BRANCH_MISSES cannot be combined with CACHE_REFERENCES / CACHE_MISSES .

2018-02-13 Thread Jason Vas Dias
On 13/02/2018, Jason Vas Dias <jason.vas.d...@gmail.com> wrote: > Good day - > > I'd much appreciate some advice as to why, on my Intel x86_64 > ( DisplayFamily_DisplayModel : 06_3CH ), running either Linux 4.12.10, > or Linux 3.10.0, any

Re: perf Intel x86_64 : BUG: BRANCH_INSTRUCTIONS / BRANCH_MISSES cannot be combined with CACHE_REFERENCES / CACHE_MISSES .

2018-02-13 Thread Jason Vas Dias
On 13/02/2018, Jason Vas Dias wrote: > Good day - > > I'd much appreciate some advice as to why, on my Intel x86_64 > ( DisplayFamily_DisplayModel : 06_3CH ), running either Linux 4.12.10, > or Linux 3.10.0, any attempt to count all of : > PERF_COUNT_HW_B

perf Intel x86_64 : BUG: BRANCH_INSTRUCTIONS / BRANCH_MISSES cannot be combined with CACHE_REFERENCES / CACHE_MISSES .

2018-02-13 Thread Jason Vas Dias
Good day - I'd much appreciate some advice as to why, on my Intel x86_64 ( DisplayFamily_DisplayModel : 06_3CH ), running either Linux 4.12.10, or Linux 3.10.0, any attempt to count all of : PERF_COUNT_HW_BRANCH_INSTRUCTIONS (or raw config 0xC4) , and

perf Intel x86_64 : BUG: BRANCH_INSTRUCTIONS / BRANCH_MISSES cannot be combined with CACHE_REFERENCES / CACHE_MISSES .

2018-02-13 Thread Jason Vas Dias
Good day - I'd much appreciate some advice as to why, on my Intel x86_64 ( DisplayFamily_DisplayModel : 06_3CH ), running either Linux 4.12.10, or Linux 3.10.0, any attempt to count all of : PERF_COUNT_HW_BRANCH_INSTRUCTIONS (or raw config 0xC4) , and

Re: [PATCH] arch/x86/kernel/tsc.c : set X86_FEATURE_ART for TSC on CPUs like i7-4910MQ : bug #194609

2017-02-23 Thread Jason Vas Dias
? I am searching for all places where a '[.>]mult.*=' occurs, but this returns rather alot of matches. Please could a future version of linux at least export the 'mult' and 'shift' values for the current clocksource ! Regards, Jason On 22/02/2017, Jason Vas Dias <jason.vas.d...@gmai

Re: [PATCH] arch/x86/kernel/tsc.c : set X86_FEATURE_ART for TSC on CPUs like i7-4910MQ : bug #194609

2017-02-23 Thread Jason Vas Dias
? I am searching for all places where a '[.>]mult.*=' occurs, but this returns rather alot of matches. Please could a future version of linux at least export the 'mult' and 'shift' values for the current clocksource ! Regards, Jason On 22/02/2017, Jason Vas Dias wrote: > O

  1   2   >