Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp264282pxb; Thu, 12 Aug 2021 16:04:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz74y8sDoyuBu/HRF7XJeVwGWNXn3Of3H7ORr08J39qKsDWh1LTPL4oZLSnAj1MMUU1UW+X X-Received: by 2002:a92:d112:: with SMTP id a18mr655033ilb.34.1628809456811; Thu, 12 Aug 2021 16:04:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628809456; cv=none; d=google.com; s=arc-20160816; b=0wSP/HrZyDt+hAjy8XKQDSLEDZ/ZkktfjxaDejE5H8Q5rkbODynCxNXlSoUuIYND46 fMu0kHnVXiFpoJuBklqlVGVQNTEz/368QEJAZ/n2kXsOCmMcB0ZvsDVi0uqxZcTuF5Eu 7LWiHNY8iOn8CBfMA7IhGB0qmFg7XO7Vgq1ISJNlUYH9KKHRRw/3IjMTqYSMTMPOBOWt OIcUFxHGwvkKypGZCa+p+pC4BLulF2rnzic1CSRXe5xKMHZI2RF3DydziJseEFxkmsY+ eqnQM6LgIfnEYofjHf4hJ4nHoN5JCNKb4XxkT+rT0UYE4ou+eqrjiW5Nc5z2RSTzDD7s v1kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=TAC7usbSxJAj4Uf52V6UWSOyNZ0nwEBnpPn4ZOBy98U=; b=VxAQpjAD93uanZwgJPmq3Tfk78SUhPnXsBaoUUkdf6kLczAdwLdRMn09NdSQKC+i4r 0/qOn0TrKR6kRXO46ayBFwv8yA/TpSUWB7KYO/NkugsQejKK0MOduFcJ7qc15SZUxHFX xgYL3hBPU7FIdv7gmUpZcKuLFzt4juWyCnb2QDaORNiJQZj32eOIWQ8XQWpnxLzEq+l3 qfKtkZtRRO6KDQX4tN/F1u6koN2h3etyey9ajFizmK86SIQKW/u0LGilAEb0jiXZjDCD CNR9snRulP+0ppz9+5DgpTFbnCbbm2t88mPaRvWl93WXcjw5ciDhYlfzRPOR+2KmCrcj I48Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N19jAu7y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si4340595ile.51.2021.08.12.16.03.52; Thu, 12 Aug 2021 16:04:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N19jAu7y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237963AbhHLVlo (ORCPT + 99 others); Thu, 12 Aug 2021 17:41:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237921AbhHLVlo (ORCPT ); Thu, 12 Aug 2021 17:41:44 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B205C061756; Thu, 12 Aug 2021 14:41:18 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id e15so9127628plh.8; Thu, 12 Aug 2021 14:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TAC7usbSxJAj4Uf52V6UWSOyNZ0nwEBnpPn4ZOBy98U=; b=N19jAu7ypTXt6WK7cfJ0LMDOqywRj+Jwavt99QhQohJWtN4D3MU5t9zGcqaItP0Gt6 Z8wkY6LhQhZ61HOWBUtfY8d6PLtkaMY7xGmmmvr8Q9vgQXi2lDBhCXzPedrMqMgy44OX BkCZfXCvjlGo8duK1PJTdKuhu5tQcgvVwNQBFvscXnfMVEdjPgs8BfJ7v3ApWfkBzeYZ Qur5/Wv9akKhyJn+x3QOE1D2tDZdUkTO9cnK+qC4Wx6QdnHDzbAkoCgDQD5PIYXDJ8V/ NoZnEZ2VEhJWtk8/WwgZ6qImb4PDaCBvAiornHAvrL+UcURc6q3EwSf2JVxrxaN9q47j FyYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=TAC7usbSxJAj4Uf52V6UWSOyNZ0nwEBnpPn4ZOBy98U=; b=Uut3HTwLQBjAt4+2b/5nvg1j3xcTKy/qt3Gd878eIDMh7zVUeBgIWsNILfOWMyCG/x c5Vd2AUpPhI+DtK1JsGazLGSCymfQmVHKfrMksszObfxH9uzhiWXMMCN5z2nU2tglEDh Legwi/drxl6MSx8vD+ZgALUx0+6ZukbshnKYoY/djWzZx7cUdM+OGH4X0sQFdPM1K5Vd nxMBcUlycNH6lXEjJE8+wg+C83X2ICyY4MSQZCp/x3d4tz7ZrsXUXs7fkeM4IXtzqdwT BbRtGKdPTJN42blgSZFfT+/AEtaBlu/lL3mSa+h1W8kMO/YZ29ZTBEc6LWGhRlxN8Te6 vMOg== X-Gm-Message-State: AOAM530YZ0x5I39kAT7FiqZIAxdz8lbQATYOosFXeqAqYOVKPdWFC8KJ kB9qNisSJAOGqUBkG5d1V54= X-Received: by 2002:a63:4d18:: with SMTP id a24mr5550376pgb.324.1628804477955; Thu, 12 Aug 2021 14:41:17 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-e24f-43ff-fee6-449f.res6.spectrum.com. [2603:800c:1a02:1bae:e24f:43ff:fee6:449f]) by smtp.gmail.com with ESMTPSA id v10sm11118067pjd.29.2021.08.12.14.41.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Aug 2021 14:41:17 -0700 (PDT) Sender: Tejun Heo Date: Thu, 12 Aug 2021 11:41:15 -1000 From: Tejun Heo To: Waiman Long Cc: Zefan Li , Johannes Weiner , Jonathan Corbet , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v2] cgroup/cpuset: Enable memory migration for cpuset v2 Message-ID: References: <20210811195707.30851-1-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210811195707.30851-1-longman@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 11, 2021 at 03:57:07PM -0400, Waiman Long wrote: > When a user changes cpuset.cpus, each task in a v2 cpuset will be moved > to one of the new cpus if it is not there already. For memory, however, > they won't be migrated to the new nodes when cpuset.mems changes. This is > an inconsistency in behavior. > > In cpuset v1, there is a memory_migrate control file to enable such > behavior by setting the CS_MEMORY_MIGRATE flag. Make it the default > for cpuset v2 so that we have a consistent set of behavior for both > cpus and memory. > > There is certainly a cost to make memory migration the default, but it > is a one time cost that shouldn't really matter as long as cpuset.mems > isn't changed frequenty. Update the cgroup-v2.rst file to document the > new behavior and recommend against changing cpuset.mems frequently. > > Since there won't be any concurrent access to the newly allocated cpuset > structure in cpuset_css_alloc(), we can use the cheaper non-atomic > __set_bit() instead of the more expensive atomic set_bit(). > > Signed-off-by: Waiman Long Applied to cgroup/for-5.15. Thanks. -- tejun