public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] sched: Cleanup task_struct::state
@ 2021-06-02 13:12 Peter Zijlstra
  2021-06-02 13:12 ` [PATCH 1/6] sched: Unbreak wakeups Peter Zijlstra
                   ` (5 more replies)
  0 siblings, 6 replies; 30+ messages in thread
From: Peter Zijlstra @ 2021-06-02 13:12 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Dietmar Eggemann, Steven Rostedt, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira
  Cc: Borislav Petkov, x86, H. Peter Anvin, Jens Axboe, Alasdair Kergon,
	Mike Snitzer, dm-devel, David S. Miller, Jakub Kicinski,
	Felipe Balbi, Greg Kroah-Hartman, Alexander Viro, Tejun Heo,
	Zefan Li, Johannes Weiner, Jason Wessel, Daniel Thompson,
	Douglas Anderson, Arnaldo Carvalho de Melo, Mark Rutland,
	Alexander Shishkin

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.



^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2021-06-18 20:42 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-02 13:12 [PATCH 0/6] sched: Cleanup task_struct::state Peter Zijlstra
2021-06-02 13:12 ` [PATCH 1/6] sched: Unbreak wakeups Peter Zijlstra
2021-06-02 13:58   ` Greg Kroah-Hartman
     [not found]   ` <20210602133040.271625424-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2021-06-02 14:47     ` Will Deacon
2021-06-02 19:43   ` Davidlohr Bueso
2021-06-02 13:12 ` [PATCH 2/6] sched: Introduce task_is_running() Peter Zijlstra
2021-06-02 14:59   ` Will Deacon
2021-06-02 16:46     ` Peter Zijlstra
2021-06-02 23:15   ` Davidlohr Bueso
2021-06-02 13:12 ` [PATCH 3/6] sched,perf,kvm: Fix preemption condition Peter Zijlstra
2021-06-02 13:59   ` Mathieu Desnoyers
2021-06-02 14:10     ` Peter Zijlstra
     [not found]       ` <YLeRVQbXt2hCiO8f-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2021-06-02 14:30         ` Mark Rutland
     [not found]   ` <20210602133040.398289363-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2021-06-02 14:15     ` Mathieu Desnoyers
2021-06-02 14:23       ` Peter Zijlstra
2021-06-02 13:12 ` [PATCH 4/6] sched: Add get_current_state() Peter Zijlstra
     [not found]   ` <20210602133040.461908001-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2021-06-02 14:01     ` Mathieu Desnoyers
2021-06-02 14:12       ` Peter Zijlstra
2021-06-02 15:02   ` Will Deacon
2021-06-02 13:12 ` [PATCH 5/6] sched,timer: Use __set_current_state() Peter Zijlstra
     [not found]   ` <20210602133040.524487671-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2021-06-02 15:06     ` Will Deacon
2021-06-02 19:54   ` Davidlohr Bueso
2021-06-03  6:39     ` Peter Zijlstra
2021-06-18 20:42   ` Thomas Gleixner
2021-06-02 13:12 ` [PATCH 6/6] sched: Change task_struct::state Peter Zijlstra
     [not found]   ` <20210602133040.587042016-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2021-06-02 14:06     ` Mathieu Desnoyers
2021-06-02 14:20       ` Peter Zijlstra
2021-06-02 15:10     ` Will Deacon
2021-06-07 10:45   ` Daniel Thompson
     [not found]     ` <20210607104500.sopvslejuoxwzhrs-DWWWtol72k3/PtFMR13I2A@public.gmane.org>
2021-06-07 11:10       ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox