From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 EF34943E49A for ; Tue, 16 Jun 2026 15:27:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781623647; cv=none; b=ETEqnY84GgdZNy+UaE+tQ9tEcdAA72+6ZKCN3AhqtO76CAS5OX0xNroqOJD3osmUHBOX8zG3GTw/dELTxDZd2lHw1d/Ya/oFRRQx/7Fk9oi8reRt0N8e4hNkdAdM2iXZSfXPR/ngKZi132dKNz47P8Cx0hZNY0NN/4kyh2aNzfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781623647; c=relaxed/simple; bh=gWePh3Vznf74DWR5pPqi6EqAwqedNELsKH618o5hclA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ce9Ssu/3wO5e86POwT8z2ccN805BDDa65h7JaGxvhsRFhauxUssC0g9O2ILoKnTeBsiE3qhi7JRPZAR651Kjpt9DeOYlyjJE3cUJVBWWIvVM3fEr4Rl0RLy//PtLu3sTiH3FYDS/zz0kB0oFG68wHj2nFBBHl7F3l7hWYrlGV5w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=We1ebm6J; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="We1ebm6J" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781623645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PM8sP3MAiJZZknY6HDXqfIBCoWcPf7VRCGmXyvu7wus=; b=We1ebm6J2W46lCMkFKRF2P4pzHag3gmB5ezreVm/wR0hpdDVV1C3c2osqeulwB4UY/zoRN mcrMbq0Csdc0WB43dUi9TR1vfG+AdzSTJZDoG4R6CKZLqAEy5xgW+BZtgJ6yMgyRH1ZD2c rfoXbNtgdQmHCVExqlEcbhU8S9m0nU8= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-563-jgGo_N4IM2WI6zmN4LSXbA-1; Tue, 16 Jun 2026 11:27:23 -0400 X-MC-Unique: jgGo_N4IM2WI6zmN4LSXbA-1 X-Mimecast-MFC-AGG-ID: jgGo_N4IM2WI6zmN4LSXbA_1781623638 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4AB4C1955F0D; Tue, 16 Jun 2026 15:27:17 +0000 (UTC) Received: from [10.22.81.159] (unknown [10.22.81.159]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 60017180058F; Tue, 16 Jun 2026 15:27:13 +0000 (UTC) Message-ID: Date: Tue, 16 Jun 2026 11:27:12 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] cgroup/cpuset: rebind mm mempolicy to effective_mems, not mems_allowed To: Gregory Price , "David Hildenbrand (Arm)" Cc: Farhad Alemi , Andrew Morton , Farhad Alemi , Yury Norov , Joshua Hahn , Zi Yan , Matthew Brost , Rakie Kim , Byungchul Park , Ying Huang , Alistair Popple , Rasmus Villemoes , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, stable@vger.kernel.org References: <8d3b4561-92cd-4ebc-8462-5fb0fd659e8a@kernel.org> <70f486ce-5ef6-4d72-8cc3-7086f4eea930@redhat.com> <51eafe6c-6622-479b-b391-6d3ff9350e75@kernel.org> Content-Language: en-US From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 On 6/16/26 9:44 AM, Gregory Price wrote: > On Tue, Jun 16, 2026 at 08:59:07AM +0200, David Hildenbrand (Arm) wrote: >> On 6/16/26 05:43, Waiman Long wrote: >>> On 6/15/26 10:26 PM, Waiman Long wrote: >>>> >>>> The reason why I am suggesting to use cs->effective_mems to keep the old >>>> cgroup v1 behavior. If the consensus is to use the output of >>>> guarantee_online_mems() for mpol_rebind_mm(), I will not be against that but >>>> it will be a slight change in user-visible behavior. > I'm not grok'ing what is user-visible here. > > The two values should effectively be equivalent because we're > using this value to constrain mpol's during a hotplug event. > > If the values differed, you would be saying there's a race condition > that could affect correctness of the rebind (which can't happen, > because this whole thing is done under the hotplug lock btw). > > Can you help me understand? The effective_mems and guarantee_online_mems() should be more or less equivalent for v2, but not for v1. In my response to David, I gave an example of how the behavior will differ. Cheers, Longman