From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48A5528DC4; Mon, 30 Mar 2026 18:21:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774894866; cv=none; b=b/uwAK08yoDqx4BmYlYGiL5dCV4OAPDt7qKxEEGnP58UQEuNndRMF0UrIFuRMPoVfqKv1PeYD6ds0303kfXpGqGDnODd/NAQsQ8v7iy4Itw5QMjxqUo6LoHPkW6cEW66MXcHbaUHK9jEhg6Qeo09bvaRlw7fnenN70Cj8LE7kj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774894866; c=relaxed/simple; bh=wLKFz1dNqc7DzZ0sjh8HsTDFHr786GFLYOG9cUpnLdA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gcPgRIUQtbsY9KqVMYta5AbJsa72kBR1N/on4u9mvH46xi97CUvQdwSc5bmn0K1aTo3rLMfJV2XgX3IDdzAwYaYh8c/K7tss8dWQU/nSkYqN2zZ+no+nTn57y+Lp+nlKcbbwqsNDiJ6nuYXfHqvI2+wF15kv98s37bS2dVgm0kE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=awxIo7pe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="awxIo7pe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97847C4CEF7; Mon, 30 Mar 2026 18:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774894865; bh=wLKFz1dNqc7DzZ0sjh8HsTDFHr786GFLYOG9cUpnLdA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=awxIo7petjzPEnV73OfwVtk+qt1fTfvrL/dBhNG9n2B8PseXB4+20DUSkt/Lvsl0k My1D9fIHhr3RmTPNNdRbGICh00CPQTt40fZVRYfpYaflU+ql5li+LaGgBvQ4Nw48wu DD88SmabxO9Aik/Y4gyuMQZ5+Ud9laPkLQgnnQnMFxhPVK87jGJxMc8Ql/v6mo2gxP fYSalTNH1VCsD78yRCeNLuC+vaPss6sJXH7BIOG0S7WukGFmKLo9NPwBbnlMENiYg1 vVtdgRw+HQin4wrr4rQv1UGgnzeBLiykI7LiHYoymo/zLCYS8riHZZw/1C2h1IRVtA qhRDG5Y71uk3g== Date: Mon, 30 Mar 2026 08:21:04 -1000 From: Tejun Heo To: Waiman Long Cc: Chen Ridong , Chen Ridong , Johannes Weiner , Michal =?iso-8859-1?Q?Koutn=FD?= , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] cgroup/cpuset: Skip security check for hotplug induced v1 task migration Message-ID: References: <20260329173958.2634925-1-longman@redhat.com> <20260329173958.2634925-3-longman@redhat.com> <83e3d0fd-ab1c-4078-ae0a-e902e92fcdb6@redhat.com> Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83e3d0fd-ab1c-4078-ae0a-e902e92fcdb6@redhat.com> Hello, On Mon, Mar 30, 2026 at 12:15:01PM -0400, Waiman Long wrote: ... > > If there are many tasks in the cpuset that has no CPUs, they will be migrated > > one by one. I'm afraid that only the first task will succeed, and the rest will > > fail because the flag is cleared after processing the first one. > > The setsched_check flag is used in the cgroup_taskset_for_each() loop below. > That loop is going to iterate all the tasks to be migrated and so the flag > will apply to all of them. So it is not just the first one. During migration, a taskset is used to group tasks in a thread group if cgroup_migrate() called with %true @threadgroup. That doens't really apply here. cgroup_transfer_tasks() doesn't set @threadgroup and even if it were to set set, there can just be multiple procesess. Besides, it's rather odd for it be a one-shot param that gets cleared deep in the stack. Wouldn't it make more sense to make whoever sets it to be responsible for clearing it? Thanks. -- tejun