Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2732778rwb; Sun, 4 Sep 2022 23:57:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR5py4BkB6MaIkOkzSGWX1U8nfHuotwJZ8qMq1sUjR4mNKhX+TxWoJGQtCRzYKmHTqU2NdvQ X-Received: by 2002:a05:6402:909:b0:435:a8b:5232 with SMTP id g9-20020a056402090900b004350a8b5232mr42176154edz.240.1662361036870; Sun, 04 Sep 2022 23:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662361036; cv=none; d=google.com; s=arc-20160816; b=D/yJ2WIT1mwQ/uj9yfx2p5Jb/CdWJyxQKcbDHVIQZ6VzisOx9ymHWbwePi3jLsyON+ FTEzAHus8eOhAeDsnSxujfcjsYZu2OsaUrUAe7dQBxsmBUQ6tFlTxccha/qrhrd1EGqi wmBtB9BDby7QhfaAR5jIbO5rz/+6QHazwjtEhVyP5esyqWgi0NTiNYON4ofAxDaeYCE5 bdRdzjFDYx0Tx1gdO99boEPFYN3foPqFmb8YzISsvMId8JoWeFpPwK7wsOjw3UG+AuUR yllYjvBcyn9k6k87UFC8zJTUdJJsmPtLfPZRjzTJnLwz48UHm3B4igRpv2xMg4VgTXWs I0uQ== 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:dkim-signature; bh=mPt2cENEN10WmmgHREJgk8hsqDksK88YmLcQYRTdLds=; b=kEPVOmhC07yDIhXwms/kMH75Dg2eWwl55STrvdWcEx+eL8y9HCE18FriJXDkVNz42u AmLj6hgKHsoXKPY8c/6Bl//FwM9rfE7sf9VieqkuCmwxc7Eog0rnqJ0wCEx/mdNlwBl+ Wi0U1plB/joQ+/qaTSdR1SrOB/9hE2oh0C3iTkqmCwkoDiPlCNXSMgxwlLzu6dG5myvv BeRyjaVK0qJfo2r4dYskmtLB4tq7NeewqIP8BLuy+Ng/xd4d1N4kr+qIQsIxVzbGxBff uwRoaAZUFTHeGmY57FJ7MD05Q/VsOJcA56X4KfDKF0iuvHUvqvggnoFMPjhOanyX3J6Q Ppew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=CEJnFxSe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t32-20020a056402242000b0044e723e8ca9si2428507eda.183.2022.09.04.23.56.52; Sun, 04 Sep 2022 23:57:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=CEJnFxSe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236918AbiIEGp3 (ORCPT + 99 others); Mon, 5 Sep 2022 02:45:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235768AbiIEGp2 (ORCPT ); Mon, 5 Sep 2022 02:45:28 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DCA11BE9B; Sun, 4 Sep 2022 23:45:27 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C926D5D8D4; Mon, 5 Sep 2022 06:45:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1662360325; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mPt2cENEN10WmmgHREJgk8hsqDksK88YmLcQYRTdLds=; b=CEJnFxSe55CXW/6IMWShpBBfRLm1buiiB2ggpdNYYoBCOu0aMDuAed1Xd5WMZm32NhtNYZ XJe8aqLvx3S4TOVWUOzw2N13lVuCDbBUuKwoLKkgnhyxbLXBwtcB2TLtmk+mxCIFFsTptM WJN/ylYgngESJjmvw+4/KkBAt6x9SPM= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A697F139C7; Mon, 5 Sep 2022 06:45:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id F6o4JgWbFWMCXwAAMHmgww (envelope-from ); Mon, 05 Sep 2022 06:45:25 +0000 Date: Mon, 5 Sep 2022 08:45:25 +0200 From: Michal Hocko To: hezhongkun Cc: hannes@cmpxchg.org, roman.gushchin@linux.dev, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, lizefan.x@bytedance.com, wuyun.abel@bytedance.com Subject: Re: [PATCH] cgroup/cpuset: Add a new isolated mems.policy type. Message-ID: References: <20220904040241.1708-1-hezhongkun.hzk@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220904040241.1708-1-hezhongkun.hzk@bytedance.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 04-09-22 12:02:41, hezhongkun wrote: > From: Zhongkun He > > Mempolicy is difficult to use because it is set in-process > via a system call. We want to make it easier to use mempolicy > in cpuset, and we can control low-priority cgroups to > allocate memory in specified nodes. So this patch want to > adds the mempolicy interface in cpuset. > > The mempolicy priority of cpuset is lower than the task. > The order of getting the policy is: > 1) vma mempolicy > 2) task->mempolicy > 3) cpuset->mempolicy > 4) default policy. > > cpuset's policy is owned by itself, but descendants will > get the default mempolicy from parent. What is the hierarchical behavior of the policy? Say parent has a stronger requirement (say bind) than a child (prefer)? > How to use the mempolicy interface: > echo prefer:2 > /sys/fs/cgroup/zz/cpuset.mems.policy > echo bind:1-3 > /sys/fs/cgroup/zz/cpuset.mems.policy > echo interleave:0,1,2,3 >/sys/fs/cgroup/zz/cpuset.mems.policy Am I just confused or did you really mean to combine all these together? -- Michal Hocko SUSE Labs