mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Chen Ridong <chenridong@huaweicloud.com>
Cc: hannes@cmpxchg.org, mkoutny@suse.com, longman@redhat.com,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	lujialin4@huawei.com, chenridong@huawei.com,
	christophe.jaillet@wanadoo.fr
Subject: Re: [-next v2 1/4] cpuset: remove redundant CS_ONLINE flag
Date: Wed, 13 Aug 2025 08:15:06 -1000	[thread overview]
Message-ID: <aJzWKq81QWCte4MZ@slm.duckdns.org> (raw)
In-Reply-To: <20250813082904.1091651-2-chenridong@huaweicloud.com>

On Wed, Aug 13, 2025 at 08:29:01AM +0000, Chen Ridong wrote:
> From: Chen Ridong <chenridong@huawei.com>
> 
> The CS_ONLINE flag was introduced prior to the CSS_ONLINE flag in the
> cpuset subsystem. Currently, the flag setting sequence is as follows:
> 
> 1. cpuset_css_online() sets CS_ONLINE
> 2. css->flags gets CSS_ONLINE set
> ...
> 3. cgroup->kill_css sets CSS_DYING
> 4. cpuset_css_offline() clears CS_ONLINE
> 5. css->flags clears CSS_ONLINE
> 
> The is_cpuset_online() check currently occurs between steps 1 and 3.
> However, it would be equally safe to perform this check between steps 2
> and 3, as CSS_ONLINE provides the same synchronization guarantee as
> CS_ONLINE.
> 
> Since CS_ONLINE is redundant with CSS_ONLINE and provides no additional
> synchronization benefits, we can safely remove it to simplify the code.
> 
> Signed-off-by: Chen Ridong <chenridong@huawei.com>
> Acked-by: Waiman Long <longman@redhat.com>

Applied to cgroup/for-6.18.

Thanks.

-- 
tejun

  reply	other threads:[~2025-08-13 18:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13  8:29 [-next v2 0/4] some optimization for cpuset Chen Ridong
2025-08-13  8:29 ` [-next v2 1/4] cpuset: remove redundant CS_ONLINE flag Chen Ridong
2025-08-13 18:15   ` Tejun Heo [this message]
2025-08-13  8:29 ` [-next v2 2/4] cpuset: decouple tmpmaks and cpumaks of cs free Chen Ridong
2025-08-13 19:50   ` Waiman Long
2025-08-14  0:38     ` Chen Ridong
2025-08-13  8:29 ` [-next v2 3/4] cpuset: separate tmpmasks and cpuset allocation logic Chen Ridong
2025-08-13 21:28   ` kernel test robot
2025-08-15  0:44     ` Chen Ridong
2025-08-15 19:15       ` Waiman Long
2025-08-16  0:21         ` Chen Ridong
2025-08-13  8:29 ` [-next v2 4/4] cpuset: add helpers for cpus read and cpuset_mutex locks Chen Ridong
2025-08-13 20:09   ` Waiman Long
2025-08-14  0:44     ` Chen Ridong
2025-08-14  3:13       ` Waiman Long
2025-08-14  3:27         ` Waiman Long
2025-08-14  3:58           ` Chen Ridong
2025-08-15 19:13             ` Waiman Long
2025-08-16  0:23               ` Chen Ridong

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=aJzWKq81QWCte4MZ@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=chenridong@huawei.com \
    --cc=chenridong@huaweicloud.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=lujialin4@huawei.com \
    --cc=mkoutny@suse.com \
    /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®