From: Kayra Cizmeci <kayracizmeci@gmail.com>
To: Peng Huang <penghuang@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun@kernel.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Waiman Long <longman@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
John Stultz <jstultz@google.com>,
Suren Baghdasaryan <surenb@google.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Clark Williams <clrkwllms@kernel.org>,
linux-rt-devel@lists.linux.dev
Subject: Re: [RFC PATCH v2 0/6] rwsem: priority boost for holders blocking high-priority waiters
Date: Wed, 2 Dec 2026 23:34:52 +0300 [thread overview]
Message-ID: <axB8mjCnXJpUhJXg@scheduler.schedules> (raw)
In-Reply-To: <20261202200435.1156855-1-penghuang@google.com>
On Wed, Dec 02, 2026 at 12:04:35PM -0800, Peng Huang wrote:
> On Wed, Dec 02, 2026 at 10:18:20PM +0300, Kayra Cizmeci wrote:
> > TB runs on TA's donation (weight) but TA doesn't pay anything
> > to make the donation. Normally on Proxy Exec, TA would pay the bill.
> > While here, TB does. TB is running early because TA wanted to run early,
> > and TA was waiting for it. If TA didn't waited TB there is no reason for
> > TB to run early. IMO, it doesn't makes sense that TA is the only one
> > demanding this, and TB is the one paying the bill.
>
> Fair point, that's the main accounting difference from PE.
>
> One way to look at it: in the kernel, rwsems protect shared metadata
> (mmap_lock, i_rwsem, etc.) rather than RPCs, so the work inside the
> critical section is almost always TB's own work (like a background
> MADV_COLD or /proc read), not work done for TA. For short holds
Yeah, but the urgency of the work is coming from TA. It doesn't matter
whose work it is when we are doing the work early for TA. And we are not
demanding to do the work early, TA does.
> (within a slice), TB runs its own critical section early and pays back
> the lag when rescale_entity() restores its weight, much like rt_mutex
> PI bills the holder. For longer holds, TB actually gets the higher
> share during the hold and only pays back up to its residual lag on
> unlock (bounded within its cgroup share under FAIR_GROUP_SCHED).
>
> So TB isn't really penalized unfairly; the real trade-off is the flip
> side, that TA doesn't pay anything for bumping TB ahead of other
> runnable tasks. If you have any ideas on how to account this back to TA
> (or bound it better) without hurting down_read()/up_read(), I'd love to
> hear them!
Well accounting it for TA would be similar to reimplementing Proxy Exec,
that is why I wanted to try to do this with Proxy Exec.
I'm gonna try to sleep now. (Not a big possibility tho, I drank more coffee and
tea than I should at this point)
Anyways...
Cheers,
Kayra
prev parent reply other threads:[~2026-12-02 20:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 6:27 Peng Huang
2026-12-01 6:27 ` [RFC PATCH v2 1/6] locking/rwsem: Track held rwsems per task Peng Huang
2026-12-01 6:27 ` [RFC PATCH v2 2/6] btrfs: untrack i_rwsem before io_uring encoded read completion Peng Huang
2026-12-01 8:40 ` Christoph Hellwig
2026-12-01 14:43 ` Steven Rostedt
2026-12-01 17:41 ` Peng Huang
2026-12-02 6:20 ` Christoph Hellwig
2026-12-01 6:27 ` [RFC PATCH v2 3/6] locking/rwsem: Publish the top waiter priority Peng Huang
2026-12-01 6:27 ` [RFC PATCH v2 4/6] sched: Apply rwsem holder boost to the fair load weight Peng Huang
2026-12-01 6:27 ` [RFC PATCH v2 5/6] sched/fair: Boost rwsem holders with contended high-priority waiters Peng Huang
2026-12-01 6:27 ` [RFC PATCH v2 6/6] locking/rwsem: Add KUnit tests for scheduler priority boost Peng Huang
2026-12-01 20:43 ` [RFC PATCH v2 0/6] rwsem: priority boost for holders blocking high-priority waiters Kayra Cizmeci
2026-12-01 21:10 ` Peng Huang
2026-12-02 16:39 ` Kayra Cizmeci
2026-12-02 17:49 ` Peng Huang
2026-12-02 19:18 ` Kayra Cizmeci
2026-12-02 20:04 ` Peng Huang
2026-12-02 20:34 ` Kayra Cizmeci [this message]
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=axB8mjCnXJpUhJXg@scheduler.schedules \
--to=kayracizmeci@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=boqun@kernel.org \
--cc=bsegall@google.com \
--cc=clrkwllms@kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=longman@redhat.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=penghuang@google.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=surenb@google.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=will@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
all inboxes | Powered by JetHome®