Re: [patch 02/11] x86/time: Implement clocksource_arch_init()

2018-09-14 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Vitaly Kuznetsov wrote: > Thomas Gleixner writes: > > + > > + if (cs->archdata.vclock_mode >= VCLOCK_MAX) { > > It should be '>' as VCLOCK_MAX == VCLOCK_HVCLOCK == 3 Indeed. Thanks, tglx ___ Virtualization mailing list

Re: [patch 02/11] x86/time: Implement clocksource_arch_init()

2018-09-14 Thread Vitaly Kuznetsov
Thomas Gleixner writes: > Runtime validate the VCLOCK_MODE in clocksource::archdata and disable > VCLOCK if invalid, which disables the VDSO but keeps the system running. > > Signed-off-by: Thomas Gleixner > --- > arch/x86/Kconfig |1 + > arch/x86/kernel/time.c | 16

Re: [patch 10/11] x86/vdso: Move cycle_last handling into the caller

2018-09-14 Thread Vitaly Kuznetsov
Thomas Gleixner writes: > Dereferencing gtod->cycle_last all over the place and foing the cycles < > last comparison in the vclock read functions generates horrible code. Doing > it at the call site is much better and gains a few cycles both for TSC and > pvclock. > > Caveat: This adds the compar

Re: [patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-14 Thread Andy Lutomirski
> On Sep 14, 2018, at 7:27 AM, Thomas Gleixner wrote: > > On Fri, 14 Sep 2018, Andy Lutomirski wrote: >>> On Sep 14, 2018, at 5:50 AM, Thomas Gleixner wrote: >>> >>> With the storage array in place it's now trivial to support CLOCK_TAI in >>> the vdso. Instead of extending the array to accomo

Re: [patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Andy Lutomirski wrote: > > On Sep 14, 2018, at 5:50 AM, Thomas Gleixner wrote: > > > > With the storage array in place it's now trivial to support CLOCK_TAI in > > the vdso. Instead of extending the array to accomodate CLOCK_TAI, make use > > of the fact that: > > > > - CLOC

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Arnd Bergmann
On Fri, Sep 14, 2018 at 2:52 PM Thomas Gleixner wrote: > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > implementation, which extended the clockid switch case and added yet > another slightly different copy of the same code. > > Especially the extended switch case is probl

Re: [patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-14 Thread Andy Lutomirski
> On Sep 14, 2018, at 5:50 AM, Thomas Gleixner wrote: > > With the storage array in place it's now trivial to support CLOCK_TAI in > the vdso. Instead of extending the array to accomodate CLOCK_TAI, make use > of the fact that: > > - CLOCK ids are set in stone > - CLOCK_THREAD_CPUTIME is never

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Florian Weimer wrote: > On 09/14/2018 03:05 PM, Thomas Gleixner wrote: > > On Fri, 14 Sep 2018, Florian Weimer wrote: > > > > > On 09/14/2018 02:50 PM, Thomas Gleixner wrote: > > > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > > > > implementation, w

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Peter Zijlstra
On Fri, Sep 14, 2018 at 02:56:46PM +0200, Florian Weimer wrote: > On 09/14/2018 02:50 PM, Thomas Gleixner wrote: > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > > implementation, which extended the clockid switch case and added yet > > another slightly different copy of th

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Florian Weimer wrote: > On 09/14/2018 02:50 PM, Thomas Gleixner wrote: > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > > implementation, which extended the clockid switch case and added yet > > another slightly different copy of the same code. > > >

[patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
With the storage array in place it's now trivial to support CLOCK_TAI in the vdso. Instead of extending the array to accomodate CLOCK_TAI, make use of the fact that: - CLOCK ids are set in stone - CLOCK_THREAD_CPUTIME is never going to be supported in the VDSO so the array slot 3 is unused -

[patch 10/11] x86/vdso: Move cycle_last handling into the caller

2018-09-14 Thread Thomas Gleixner
Dereferencing gtod->cycle_last all over the place and foing the cycles < last comparison in the vclock read functions generates horrible code. Doing it at the call site is much better and gains a few cycles both for TSC and pvclock. Caveat: This adds the comparison to the hyperv vclock as well, bu

[patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-14 Thread Thomas Gleixner
The code flow for the vclocks is convoluted as it requires the vclocks which can be invalidated separately from the vsyscall_gtod_data sequence to store the fact in a separate variable. That's inefficient. Restructure the code so the vclock readout returns cycles and the conversion to nanoseconds

[patch 08/11] x86/vdso: Replace the clockid switch case

2018-09-14 Thread Thomas Gleixner
Now that the time getter functions use the clockid as index into the storage array for the base time access, the switch case can be replaced. - Check for clockid >= MAX_CLOCKS and for negative clockid (CPU/FD) first and call the fallback function right away. - After establishing that clockid is

[patch 05/11] x86/vdso: Introduce and use vgtod_ts

2018-09-14 Thread Thomas Gleixner
It's desired to support more clocks in the VDSO, e.g. CLOCK_TAI. This results either in indirect calls due to the larger switch case, which then requires retpolines or when the compiler is forced to avoid jump tables it results in even more conditionals. To avoid both variants which are bad for pe

[patch 06/11] x86/vdso: Collapse high resolution functions

2018-09-14 Thread Thomas Gleixner
do_realtime() and do_monotonic() are now the same except for the storage array index. Hand the index in as an argument and collapse the functions. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 35 +++ 1 file changed, 7 insertions(+),

[patch 07/11] x86/vdso: Collapse coarse functions

2018-09-14 Thread Thomas Gleixner
do_realtime_coarse() and do_monotonic_coarse() are now the same except for the storage array index. Hand the index in as an argument and collapse the functions. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 20 1 file changed, 4 insertions(+), 1

[patch 03/11] x86/vdso: Enforce 64bit clocksource

2018-09-14 Thread Thomas Gleixner
All VDSO clock sources are TSC based and use CLOCKSOURCE_MASK(64). There is no point in masking with all FF. Get rid of it and enforce the mask in the sanity checker. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c |2 +- arch/x86/kernel/time.c |6 ++

[patch 04/11] x86/vdso: Use unsigned int consistently for vsyscall_gtod_data::seq

2018-09-14 Thread Thomas Gleixner
The sequence count in vgtod_data is unsigned int, but the call sites use unsigned long, which is a pointless exercise. Fix the call sites and replace 'unsigned' with unsinged 'int' while at it. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c |8 arch/x86/incl

[patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() implementation, which extended the clockid switch case and added yet another slightly different copy of the same code. Especially the extended switch case is problematic as the compiler tends to generate a jump table which then re

[patch 02/11] x86/time: Implement clocksource_arch_init()

2018-09-14 Thread Thomas Gleixner
Runtime validate the VCLOCK_MODE in clocksource::archdata and disable VCLOCK if invalid, which disables the VDSO but keeps the system running. Signed-off-by: Thomas Gleixner --- arch/x86/Kconfig |1 + arch/x86/kernel/time.c | 16 2 files changed, 17 insertions(+) --

[patch 01/11] clocksource: Provide clocksource_arch_init()

2018-09-14 Thread Thomas Gleixner
Architectures have extra archdata in the clocksource, e.g. for VDSO support. There are no sanity checks or general initializations for this available. Add support for that. Signed-off-by: Thomas Gleixner --- include/linux/clocksource.h |5 + kernel/time/Kconfig |4 kerne

ICITS'19 - Quito, Ecuador | Extended deadline: September 23

2018-09-14 Thread Marle
* Proceedings by Springer, indexed in Scopus, ISI, etc. *** ICITS'19 - The 2019 International Conference on Information Technology & Systems Quito, Ecuador, 6 - 8 February 2019 http://www.icits.me

Re: [PATCH net-next V2] virtio_net: ethtool tx napi configuration

2018-09-14 Thread Jason Wang
On 2018年09月13日 23:20, Willem de Bruijn wrote: On Thu, Sep 13, 2018 at 1:40 AM Jason Wang wrote: Implement ethtool .set_coalesce (-C) and .get_coalesce (-c) handlers. Interrupt moderation is currently not supported, so these accept and display the default settings of 0 usec and 1 frame. Toggl