Thread (30 messages) 30 messages, 8 authors, 2021-06-18
STALE1807d

[PATCH 0/6] sched: Cleanup task_struct::state

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-06-02 13:31:34
Also in: cgroups, dm-devel, kvm, linux-block, linux-fsdevel, linux-mm, linux-perf-users, linux-usb, lkml, netdev, rcu

Hi!

The task_struct::state variable is a bit odd in a number of ways:

 - it's declared 'volatile' (against current practises);
 - it's 'unsigned long' which is a weird size;
 - it's type is inconsistent when used for function arguments.

These patches clean that up by making it consistently 'unsigned int', and
replace (almost) all accesses with READ_ONCE()/WRITE_ONCE(). In order to not
miss any, the variable is renamed, ensuring a missed conversion results in a
compile error.

The first few patches fix a number of pre-existing errors and introduce a few
helpers to make the final conversion less painful.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help