Re: [PATCH 6/7] x86/vdso: Add vDSO functions for user wait instructions

2018-08-01 Thread Thomas Gleixner
On Tue, 31 Jul 2018, Andy Lutomirski wrote: > On Tue, Jul 31, 2018 at 2:22 PM, Thomas Gleixner wrote: > >> u64 start = __vdso_read_art_ns(); > > > > Errm. No. You can't read ART. ART is only used by decives to which it is > > distributed. You can only read TSC here and convert that to nsecs. > >

Re: [PATCH 6/7] x86/vdso: Add vDSO functions for user wait instructions

2018-07-31 Thread Andy Lutomirski
On Tue, Jul 31, 2018 at 2:22 PM, Thomas Gleixner wrote: > On Mon, 23 Jul 2018, Andy Lutomirski wrote: >> On 07/23/2018 05:55 AM, Fenghua Yu wrote: >> > static void __init init_vdso_funcs_data(void) >> > { >> > + struct system_counterval_t sys_counterval; >> > + >> > if (static_cpu_has(

Re: [PATCH 6/7] x86/vdso: Add vDSO functions for user wait instructions

2018-07-31 Thread Thomas Gleixner
On Mon, 23 Jul 2018, Andy Lutomirski wrote: > On 07/23/2018 05:55 AM, Fenghua Yu wrote: > > static void __init init_vdso_funcs_data(void) > > { > > + struct system_counterval_t sys_counterval; > > + > > if (static_cpu_has(X86_FEATURE_MOVDIRI)) > > vdso_funcs_data.movdiri_sup

Re: [PATCH 6/7] x86/vdso: Add vDSO functions for user wait instructions

2018-07-24 Thread Andy Lutomirski
On Mon, Jul 23, 2018 at 7:11 PM, Andy Lutomirski wrote: > On 07/23/2018 05:55 AM, Fenghua Yu wrote: >> >> User wants to query if user wait instructions (umonitor, umwait, and >> tpause) are supported and use the instructions. The vDSO functions >> provides fast interface for user to check the supp

Re: [PATCH 6/7] x86/vdso: Add vDSO functions for user wait instructions

2018-07-23 Thread Andy Lutomirski
On 07/23/2018 05:55 AM, Fenghua Yu wrote: User wants to query if user wait instructions (umonitor, umwait, and tpause) are supported and use the instructions. The vDSO functions provides fast interface for user to check the support and use the instructions. waitpkg_supported and its alias __vdso

[PATCH 6/7] x86/vdso: Add vDSO functions for user wait instructions

2018-07-23 Thread Fenghua Yu
User wants to query if user wait instructions (umonitor, umwait, and tpause) are supported and use the instructions. The vDSO functions provides fast interface for user to check the support and use the instructions. waitpkg_supported and its alias __vdso_waitpkg_supported check if user wait instru