linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Cleanup task_struct::state
@ 2021-06-11  8:28 Peter Zijlstra
  2021-06-11  8:28 ` [PATCH v2 1/7] sched: Unbreak wakeups Peter Zijlstra
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Peter Zijlstra @ 2021-06-11  8:28 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, 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, Jiri Olsa, Namhyung Kim, Rafael J. Wysocki,
	Pavel Machek, Will Deacon, Waiman Long, Boqun Feng,
	Oleg Nesterov, Davidlohr Bueso, Paul E. McKenney, Josh Triplett,
	Mathieu Desnoyers, Lai Jiangshan, Joel Fernandes, John Stultz,
	Stephen Boyd, Andrew Morton, Paolo Bonzini, Stephen Rothwell,
	linux-kernel, linux-arch

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.

This series applies on top of tip/master, and has been having the all-clear
from the robots for the past week.

Since v1:
 - fixed a whole bunch of compile fail on !x86
 - collected tags
 - (slightly) smaller Cc list


The plan is to stick them in tip/sched/core early next week, I'm hoping this
won't cause too much pain for sfr.


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

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

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11  8:28 [PATCH v2 0/7] Cleanup task_struct::state Peter Zijlstra
2021-06-11  8:28 ` [PATCH v2 1/7] sched: Unbreak wakeups Peter Zijlstra
2021-06-18 11:24   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2021-06-11  8:28 ` [PATCH v2 2/7] sched: Introduce task_is_running() Peter Zijlstra
2021-06-11  8:49   ` Geert Uytterhoeven
2021-06-11  9:13     ` Peter Zijlstra
2021-06-11 10:26   ` Will Deacon
2021-06-18 11:24   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2021-06-11  8:28 ` [PATCH v2 3/7] sched,perf,kvm: Fix preemption condition Peter Zijlstra
2021-06-18 11:24   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2021-06-11  8:28 ` [PATCH v2 4/7] sched: Add get_current_state() Peter Zijlstra
2021-06-18 11:24   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2021-06-11  8:28 ` [PATCH v2 5/7] sched,timer: Use __set_current_state() Peter Zijlstra
2021-06-18 11:24   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2021-06-11  8:28 ` [PATCH v2 6/7] sched,arch: Remove unused TASK_STATE offsets Peter Zijlstra
2021-06-18 11:24   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2021-06-11  8:28 ` [PATCH v2 7/7] sched: Change task_struct::state Peter Zijlstra
2021-06-16 13:24   ` Daniel Bristot de Oliveira
2021-06-18 11:24   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).