[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aCJFoCq7Pp_luu2M@uudg.org>
Date: Mon, 12 May 2025 16:01:52 -0300
From: "Luis Claudio R. Goncalves" <lgoncalv@...hat.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
Clark Williams <clrkwllms@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>, Tejun Heo <tj@...nel.org>,
David Vernet <dvernet@...a.com>, Barret Rhoden <brho@...gle.com>,
Josh Don <joshdon@...gle.com>, Crystal Wood <crwood@...hat.com>,
linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
Juri Lelli <juri.lelli@...hat.com>, Ben Segall <bsegall@...gle.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Ingo Molnar <mingo@...hat.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v2] sched: do not call __put_task_struct() on rt if
pi_blocked_on is set
On Thu, Apr 10, 2025 at 05:32:05PM +0200, Sebastian Andrzej Siewior wrote:
> On 2025-04-10 09:51:03 [+0200], Peter Zijlstra wrote:
> > > I complained about this special RT case in put_task_struct() when it was
> > > first got introduced. Couldn't we just just unconditionally do the RCU
> > > put?
> >
> > Yeah, please make it simpler, not more complex.
>
> Just so we clear: simpler as in everyone does call_rcu() or RT does
> always call_rcu() and everyone else __put_task_struct()? I mean we would
> end up with one call chain I am just not sure how expensive it gets for
> !RT.
Sebastian, I implemented the change where put_task_struct() unconditionally
resorted to:
call_rcu(&t->rcu, __put_task_struct_rcu_cb);
I submitted the kernels I built with that change and a pristine upstream
kenrel to LTP and stress-ng and also ran 'perf bench all'. I built kernels
with and without lockdep and extra debug. All kernels survived the tests
without a scratch and I haven't observed differences in behaviors nor
timings (for the tests that had that information).
What would be a good benchmark to compare the kernels with and without the
put_task_struct() change? I would like to observe whether there is a
penalty or added overhead with the change in place.
Best,
Luis
> Sebastian
>
---end quoted text---
Powered by blists - more mailing lists