All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] sched: Cleanup task_struct::state
@ 2021-06-02 13:12 ` Peter Zijlstra
  0 siblings, 0 replies; 64+ 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, 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,
	linux-kernel, linux-block, netdev, linux-usb, linux-fsdevel,
	cgroups, kgdb-bugreport, linux-perf-users, linux-pm, rcu,
	linux-mm, kvm

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] 64+ messages in thread

end of thread, other threads:[~2021-06-28  9:52 UTC | newest]

Thread overview: 64+ 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 ` [dm-devel] " Peter Zijlstra
2021-06-02 13:12 ` [PATCH 1/6] sched: Unbreak wakeups Peter Zijlstra
2021-06-02 13:12   ` [dm-devel] " Peter Zijlstra
2021-06-02 13:58   ` Greg Kroah-Hartman
2021-06-02 13:58     ` [dm-devel] " Greg Kroah-Hartman
2021-06-02 14:47   ` Will Deacon
2021-06-02 14:47     ` [dm-devel] " Will Deacon
2021-06-02 19:43   ` Davidlohr Bueso
2021-06-02 19:43     ` [dm-devel] " Davidlohr Bueso
2021-06-02 13:12 ` [PATCH 2/6] sched: Introduce task_is_running() Peter Zijlstra
2021-06-02 13:12   ` [dm-devel] " Peter Zijlstra
2021-06-02 14:59   ` Will Deacon
2021-06-02 14:59     ` [dm-devel] " Will Deacon
2021-06-02 16:46     ` Peter Zijlstra
2021-06-02 16:46       ` [dm-devel] " Peter Zijlstra
2021-06-02 23:15   ` Davidlohr Bueso
2021-06-02 23:15     ` [dm-devel] " Davidlohr Bueso
2021-06-02 13:12 ` [PATCH 3/6] sched,perf,kvm: Fix preemption condition Peter Zijlstra
2021-06-02 13:12   ` [dm-devel] " Peter Zijlstra
2021-06-02 13:59   ` Mathieu Desnoyers
2021-06-02 13:59     ` [dm-devel] [PATCH 3/6] sched, perf, kvm: " Mathieu Desnoyers
2021-06-02 13:59     ` [PATCH 3/6] sched,perf,kvm: " Mathieu Desnoyers
2021-06-02 14:10     ` Peter Zijlstra
2021-06-02 14:10       ` [dm-devel] [PATCH 3/6] sched, perf, kvm: " Peter Zijlstra
2021-06-02 14:30       ` [PATCH 3/6] sched,perf,kvm: " Mark Rutland
2021-06-02 14:30         ` [dm-devel] [PATCH 3/6] sched, perf, kvm: " Mark Rutland
2021-06-02 14:15   ` [PATCH 3/6] sched,perf,kvm: " Mathieu Desnoyers
2021-06-02 14:15     ` [dm-devel] [PATCH 3/6] sched, perf, kvm: " Mathieu Desnoyers
2021-06-02 14:15     ` [PATCH 3/6] sched,perf,kvm: " Mathieu Desnoyers
2021-06-02 14:23     ` Peter Zijlstra
2021-06-02 14:23       ` [dm-devel] [PATCH 3/6] sched, perf, kvm: " Peter Zijlstra
2021-06-02 13:12 ` [PATCH 4/6] sched: Add get_current_state() Peter Zijlstra
2021-06-02 13:12   ` [dm-devel] " Peter Zijlstra
2021-06-02 14:01   ` Mathieu Desnoyers
2021-06-02 14:01     ` [dm-devel] " Mathieu Desnoyers
2021-06-02 14:01     ` Mathieu Desnoyers
2021-06-02 14:12     ` Peter Zijlstra
2021-06-02 14:12       ` [dm-devel] " Peter Zijlstra
2021-06-02 15:02   ` Will Deacon
2021-06-02 15:02     ` [dm-devel] " Will Deacon
2021-06-02 13:12 ` [PATCH 5/6] sched,timer: Use __set_current_state() Peter Zijlstra
2021-06-02 13:12   ` [dm-devel] " Peter Zijlstra
2021-06-02 15:06   ` Will Deacon
2021-06-02 15:06     ` [dm-devel] " Will Deacon
2021-06-02 19:54   ` Davidlohr Bueso
2021-06-02 19:54     ` [dm-devel] " Davidlohr Bueso
2021-06-03  6:39     ` Peter Zijlstra
2021-06-03  6:39       ` [dm-devel] " Peter Zijlstra
2021-06-18 20:42   ` Thomas Gleixner
2021-06-18 20:42     ` [dm-devel] " Thomas Gleixner
2021-06-02 13:12 ` [PATCH 6/6] sched: Change task_struct::state Peter Zijlstra
2021-06-02 13:12   ` [dm-devel] " Peter Zijlstra
2021-06-02 14:06   ` Mathieu Desnoyers
2021-06-02 14:06     ` [dm-devel] " Mathieu Desnoyers
2021-06-02 14:06     ` Mathieu Desnoyers
2021-06-02 14:20     ` Peter Zijlstra
2021-06-02 14:20       ` [dm-devel] " Peter Zijlstra
2021-06-02 15:10   ` Will Deacon
2021-06-02 15:10     ` [dm-devel] " Will Deacon
2021-06-07 10:45   ` Daniel Thompson
2021-06-07 10:45     ` [dm-devel] " Daniel Thompson
2021-06-07 11:10     ` Peter Zijlstra
2021-06-07 11:10       ` [dm-devel] " Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.