Re: [PATCH] sched: make struct task_struct::state 32-bit

2019-09-04 Thread Valentin Schneider
On 04/09/2019 13:07, Valentin Schneider wrote: > [...] > Baby steps... There's something regarding coccinelle disjunctions that just can't grasp, and this also fails to recognize "current" as being "struct task_struct*". Once I fix these, it's "just" a matter of finding out how to write a rule

Re: [PATCH] sched: make struct task_struct::state 32-bit

2019-09-04 Thread Valentin Schneider
On 03/09/2019 22:51, Valentin Schneider wrote: [...] > I tried something for function parameters, which seems to be feasible > according to [1], but couldn't get it to work (yet). Here's what I have > so far: > [...] So now I have this: --- @funcmatch@ identifier func; identifier p; identifier

Re: [PATCH] sched: make struct task_struct::state 32-bit

2019-09-04 Thread Valentin Schneider
On 04/09/2019 10:43, David Laight wrote: > From: Alexey Dobriyan >> Sent: 03 September 2019 19:19 > ... >>> How did you come up with this changeset, did you pickaxe for some regexp? >> >> No, manually, backtracking up to the call chain. >> Maybe I missed a few places. > > Renaming the structure

RE: [PATCH] sched: make struct task_struct::state 32-bit

2019-09-04 Thread David Laight
From: Alexey Dobriyan > Sent: 03 September 2019 19:19 ... > > How did you come up with this changeset, did you pickaxe for some regexp? > > No, manually, backtracking up to the call chain. > Maybe I missed a few places. Renaming the structure field and getting the compiler to find all the uses

Re: [PATCH] sched: make struct task_struct::state 32-bit

2019-09-03 Thread Valentin Schneider
On 03/09/2019 19:19, Alexey Dobriyan wrote: > On Tue, Sep 03, 2019 at 06:29:06PM +0100, Valentin Schneider wrote: >> On 02/09/2019 22:05, Alexey Dobriyan wrote: >>> 32-bit accesses are shorter than 64-bit accesses on x86_64. >>> Nothing uses 64-bitness of ->state. > >> It looks like you missed a

Re: [PATCH] sched: make struct task_struct::state 32-bit

2019-09-03 Thread Alexey Dobriyan
On Tue, Sep 03, 2019 at 06:29:06PM +0100, Valentin Schneider wrote: > On 02/09/2019 22:05, Alexey Dobriyan wrote: > > 32-bit accesses are shorter than 64-bit accesses on x86_64. > > Nothing uses 64-bitness of ->state. > It looks like you missed a few places. There's a long prev_state in >

Re: [PATCH] sched: make struct task_struct::state 32-bit

2019-09-03 Thread Valentin Schneider
On 02/09/2019 22:05, Alexey Dobriyan wrote: > 32-bit accesses are shorter than 64-bit accesses on x86_64. > Nothing uses 64-bitness of ->state. > > Space savings are ~2KB on F30 kernel config. > > Signed-off-by: Alexey Dobriyan > --- > > arch/ia64/kernel/perfmon.c |4 ++-- >

Re: [PATCH] sched: make struct task_struct::state 32-bit

2019-09-03 Thread Valentin Schneider
On 03/09/2019 17:23, Alexey Dobriyan wrote: > On Tue, Sep 03, 2019 at 12:02:38AM +0100, Valentin Schneider wrote: >> struct task_struct { >> struct thread_info thread_info; /* 024 */ >> volatile int state;/*24 4 */ >> >>

Re: [PATCH] sched: make struct task_struct::state 32-bit

2019-09-03 Thread Alexey Dobriyan
On Tue, Sep 03, 2019 at 12:02:38AM +0100, Valentin Schneider wrote: > struct task_struct { > struct thread_info thread_info; /* 024 */ > volatile int state;/*24 4 */ > > /* XXX 4 bytes hole, try to pack */ > >

Re: [dm-devel] [PATCH] sched: make struct task_struct::state 32-bit

2019-09-03 Thread Peter Zijlstra
On Mon, Sep 02, 2019 at 11:51:55PM -0700, Christoph Hellwig wrote: > On Tue, Sep 03, 2019 at 12:05:58AM +0300, Alexey Dobriyan wrote: > > 32-bit accesses are shorter than 64-bit accesses on x86_64. > > Nothing uses 64-bitness of ->state. > > > > Space savings are ~2KB on F30 kernel config. > > I

Re: [dm-devel] [PATCH] sched: make struct task_struct::state 32-bit

2019-09-03 Thread Christoph Hellwig
On Tue, Sep 03, 2019 at 12:05:58AM +0300, Alexey Dobriyan wrote: > 32-bit accesses are shorter than 64-bit accesses on x86_64. > Nothing uses 64-bitness of ->state. > > Space savings are ~2KB on F30 kernel config. I guess we'd save even more when moving from a volatile to WRITE_ONCE/READ_ONCE..

Re: [PATCH] sched: make struct task_struct::state 32-bit

2019-09-02 Thread Valentin Schneider
Hi, On 02/09/2019 22:05, Alexey Dobriyan wrote: > 32-bit accesses are shorter than 64-bit accesses on x86_64. > Nothing uses 64-bitness of ->state. > > Space savings are ~2KB on F30 kernel config. > > Signed-off-by: Alexey Dobriyan > --- Interestingly this has been volatile long since forever

[PATCH] sched: make struct task_struct::state 32-bit

2019-09-02 Thread Alexey Dobriyan
32-bit accesses are shorter than 64-bit accesses on x86_64. Nothing uses 64-bitness of ->state. Space savings are ~2KB on F30 kernel config. Signed-off-by: Alexey Dobriyan --- arch/ia64/kernel/perfmon.c |4 ++-- block/blk-mq.c |2 +- drivers/md/dm.c |4