mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <llong@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: "Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Chen Ridong" <chenridong@huawei.com>
Subject: Re: [PATCH 2/2] cgroup/cpuset: Change callback_lock to raw_spinlock_t
Date: Mon, 20 Oct 2025 15:25:28 -0400	[thread overview]
Message-ID: <05900ad4-fdbd-4505-a080-1e71bedb5f4a@redhat.com> (raw)
In-Reply-To: <aPZqk4h0ek_QM9o5@slm.duckdns.org>

On 10/20/25 1:00 PM, Tejun Heo wrote:
> On Sun, Oct 19, 2025 at 10:32:07PM -0400, Waiman Long wrote:
>> The callback_lock is acquired either to read a stable set of cpu
>> or node masks or to modify those masks when cpuset_mutex is also
>> acquired. Sometime, it may need to go up the cgroup hierarchy while
>> holding the lock to find the right set of masks to use. Assuming that
>> the depth of the cgroup hierarch is finite and typically small, the
>> lock hold time should be limited.
>>
>> As a result, it can be converted to raw_spinlock_t to reduce overhead
>> in a PREEMPT_RT setting without introducing excessive latency.
>>
>> Signed-off-by: Waiman Long <longman@redhat.com>
> Is this something that RT people would like? Why does the overhead of the
> lock matter? I think this patch requires more justifications.

Yes, I will push a new patch and cc the RT guys to see if they have any 
objection. I had seen that callback_lock was changed to raw_spinlock_t 
in one or more of the releases of the linux-rt-devel tree before the 
mainline merge.

Thanks,
Longman


      reply	other threads:[~2025-10-20 19:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20  2:32 [PATCH 0/2] cgroup/cpuset: Miscellaneous cleanup Waiman Long
2025-10-20  2:32 ` [PATCH 1/2] cgroup/cpuset: Don't track # of local child partitions Waiman Long
2025-10-20  6:57   ` Chen Ridong
2025-10-20 17:02     ` Tejun Heo
2025-10-21  2:06       ` Chen Ridong
2025-10-20 17:02   ` Tejun Heo
2025-10-20  2:32 ` [PATCH 2/2] cgroup/cpuset: Change callback_lock to raw_spinlock_t Waiman Long
2025-10-20 17:00   ` Tejun Heo
2025-10-20 19:25     ` Waiman Long [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=05900ad4-fdbd-4505-a080-1e71bedb5f4a@redhat.com \
    --to=llong@redhat.com \
    --cc=cgroups@vger.kernel.org \
    --cc=chenridong@huawei.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=tj@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®