linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny@suse.com>
To: Waiman Long <longman@redhat.com>
Cc: Tejun Heo <tj@kernel.org>, Zefan Li <lizefan.x@bytedance.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Shuah Khan <shuah@kernel.org>,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, Will Deacon <will@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>
Subject: Re: [PATCH v2 3/4] cgroup/cpuset: Include offline CPUs when tasks' cpumasks in top_cpuset are updated
Date: Fri, 17 Mar 2023 19:01:57 +0100	[thread overview]
Message-ID: <20230317180157.uqlleobldg53pgj6@blackpad> (raw)
In-Reply-To: <20230317151508.1225282-4-longman@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

Hello.

On Fri, Mar 17, 2023 at 11:15:07AM -0400, Waiman Long <longman@redhat.com> wrote:
>   * Iterate through each task of @cs updating its cpus_allowed to the
>   * effective cpuset's.  As this function is called with cpuset_rwsem held,
> - * cpuset membership stays stable.
> + * cpuset membership stays stable. For top_cpuset, task_cpu_possible_mask()
> + * is used instead of effective_cpus to make sure all offline CPUs are also
> + * included as hotplug code won't update cpumasks for tasks in top_cpuset.
>   */

On Wed, Mar 15, 2023 at 11:06:20AM +0100, Michal Koutný <mkoutny@suse.com> wrote:
> I see now that it returns offlined cpus to top cpuset's tasks.

I considered only the "base" set change cs->effective_cpus ->
possible_mask. (Apologies for that mistake.)

However, I now read the note about subparts_cpus

>         * effective_cpus contains only onlined CPUs, but subparts_cpus
>         * may have offlined ones.

So if subpart_cpus keeps offlined CPUs, they will be subtracted from
possible_mask and absent in the resulting new_cpus, i.e. undesirable for
the tasks in that cpuset :-/

Michal

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-03-17 18:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 15:15 [PATCH v2 0/4] cgroup/cpuset: Miscellaneous updates Waiman Long
2023-03-17 15:15 ` [PATCH v2 1/4] cgroup/cpuset: Fix partition root's cpuset.cpus update bug Waiman Long
2023-03-29 18:37   ` Tejun Heo
2023-03-17 15:15 ` [PATCH v2 2/4] cgroup/cpuset: Skip task update if hotplug doesn't affect current cpuset Waiman Long
2023-03-17 15:15 ` [PATCH v2 3/4] cgroup/cpuset: Include offline CPUs when tasks' cpumasks in top_cpuset are updated Waiman Long
2023-03-17 18:01   ` Michal Koutný [this message]
2023-03-17 18:05     ` Waiman Long
2023-03-20 15:04       ` Michal Koutný
2023-03-17 15:15 ` [PATCH v2 4/4] cgroup/cpuset: Minor updates to test_cpuset_prs.sh Waiman Long
2023-03-29 18:43   ` Tejun Heo
2023-03-28 13:40 ` [PATCH v2 0/4] cgroup/cpuset: Miscellaneous updates Will Deacon
2023-03-29  1:15   ` Waiman Long

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=20230317180157.uqlleobldg53pgj6@blackpad \
    --to=mkoutny@suse.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=longman@redhat.com \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=tj@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).