From: Peter Zijlstra <peterz@infradead.org>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Jens Axboe <axboe@kernel.dk>, Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Tejun Heo <tj@kernel.org>, Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Jason Wessel <jason.wessel@windriver.com>,
Daniel Thompson <daniel.thompson@linaro.org>,
Douglas Anderson <dianders@chromium.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Pavel Machek <pavel@ucw.cz>, Will Deacon <will@kernel.org>,
Waiman Long <longman@redhat.com>,
Boqun Feng <boqun.feng@gmail.com>,
Oleg Nesterov <oleg@redhat.com>,
Davidlohr Bueso <dave@stgolabs.net>,
"Paul E. McKenney" <paulmck@kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Joel Fernandes <joel@joelfernandes.org>,
John Stultz <john.stultz@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: [PATCH v2 0/7] Cleanup task_struct::state
Date: Fri, 11 Jun 2021 10:28:10 +0200 [thread overview]
Message-ID: <20210611082810.970791107@infradead.org> (raw)
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.
next reply other threads:[~2021-06-11 8:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 8:28 Peter Zijlstra [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210611082810.970791107@infradead.org \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=axboe@kernel.dk \
--cc=balbi@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=bp@alien8.de \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=daniel.thompson@linaro.org \
--cc=dave@stgolabs.net \
--cc=davem@davemloft.net \
--cc=dianders@chromium.org \
--cc=dietmar.eggemann@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=hpa@zytor.com \
--cc=jason.wessel@windriver.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=john.stultz@linaro.org \
--cc=jolsa@redhat.com \
--cc=josh@joshtriplett.org \
--cc=juri.lelli@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=longman@redhat.com \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=oleg@redhat.com \
--cc=paulmck@kernel.org \
--cc=pavel@ucw.cz \
--cc=pbonzini@redhat.com \
--cc=rjw@rjwysocki.net \
--cc=rostedt@goodmis.org \
--cc=sboyd@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=snitzer@redhat.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=viro@zeniv.linux.org.uk \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox