Re: [PATCH 3/3] rseq: optimise for 64bit arches

2021-04-13 Thread Mathieu Desnoyers
- On Apr 13, 2021, at 11:06 AM, David Laight david.lai...@aculab.com wrote: [...] > > Hmmm... too much replication. > You could do: > #ifdef CONFIG_64BIT > #define PTR_TYPE u64 > #define PTR_FLD ptr64 > #else > #define PTR_TYPE u32 > #define PTR_FLD ptr32 > #endif > > Then have one copy of

RE: [PATCH 3/3] rseq: optimise for 64bit arches

2021-04-13 Thread David Laight
From: Mathieu Desnoyers > Sent: 13 April 2021 15:22 ... > > David > > > >> So I suppose that if we're going to #ifdef this, we might as well do the > >> whole thing. > >> > >> Mathieu; did I forget a reason why this cannot work? > > The only difference it brings on 32-bit is that the

Re: [PATCH 3/3] rseq: optimise for 64bit arches

2021-04-13 Thread Mathieu Desnoyers
- On Apr 13, 2021, at 6:36 AM, David Laight david.lai...@aculab.com wrote: > From: Peter Zijlstra >> Sent: 13 April 2021 10:10 >> >> On Tue, Apr 13, 2021 at 12:36:57AM -0700, Eric Dumazet wrote: >> > From: Eric Dumazet >> > >> > Commit ec9c82e03a74 ("rseq: uapi: Declare rseq_cs field as

RE: [PATCH 3/3] rseq: optimise for 64bit arches

2021-04-13 Thread David Laight
From: Peter Zijlstra > Sent: 13 April 2021 10:10 > > On Tue, Apr 13, 2021 at 12:36:57AM -0700, Eric Dumazet wrote: > > From: Eric Dumazet > > > > Commit ec9c82e03a74 ("rseq: uapi: Declare rseq_cs field as union, > > update includes") added regressions for our servers. > > > > Using

Re: [PATCH 3/3] rseq: optimise for 64bit arches

2021-04-13 Thread Peter Zijlstra
On Tue, Apr 13, 2021 at 12:36:57AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > Commit ec9c82e03a74 ("rseq: uapi: Declare rseq_cs field as union, > update includes") added regressions for our servers. > > Using copy_from_user() and clear_user() for 64bit values > on 64bit arches is

[PATCH 3/3] rseq: optimise for 64bit arches

2021-04-13 Thread Eric Dumazet
From: Eric Dumazet Commit ec9c82e03a74 ("rseq: uapi: Declare rseq_cs field as union, update includes") added regressions for our servers. Using copy_from_user() and clear_user() for 64bit values on 64bit arches is suboptimal. We might revisit this patch once all 32bit arches support get_user()