From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AA4FECAAA1 for ; Mon, 5 Sep 2022 06:45:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CB398801B1; Mon, 5 Sep 2022 02:45:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C624F8D0050; Mon, 5 Sep 2022 02:45:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B29DB801B1; Mon, 5 Sep 2022 02:45:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A12F28D0050 for ; Mon, 5 Sep 2022 02:45:27 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 7C10FA186D for ; Mon, 5 Sep 2022 06:45:27 +0000 (UTC) X-FDA: 79877095494.19.2292706 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf23.hostedemail.com (Postfix) with ESMTP id 0DF8C140075 for ; Mon, 5 Sep 2022 06:45:26 +0000 (UTC) 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> ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=CEJnFxSe; spf=pass (imf23.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662360327; a=rsa-sha256; cv=none; b=u0XzHZ3EK/CfMVEh1bc0g7S4X7hRrPWaTJVnYR/QZZF9Rntc7IOUat8BAMpyhfMA+X0iJF xDJuqv4QPewcjxrRo/ZHjHcqqAQ0pbmez1xsDFWyDdFNyxF0q+DCyVFiyPu9EEQjOYKTR8 E55CXdvaDkSAmiv+sLXbtjwAm5F5eaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662360327; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mPt2cENEN10WmmgHREJgk8hsqDksK88YmLcQYRTdLds=; b=Fb7ma7dn1MNnOZn/1z7kPFp34J0k7w4YXnyOPD4CwBPBjeBIRfdZ1NYRls2lWeZ/JlcITy yOB9eNaB4WxqrAm/Po6QV0YM36zsi5YbFewXLzt/pqQ2wMbt9XkFfkKz7yszIw6oxcQiS5 /sriCvtO/aVAR/B4yl/cK1wcwJBC2vM= Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=CEJnFxSe; spf=pass (imf23.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam06 X-Stat-Signature: nuok4atjdjpau8bhxqcnmndk9abie7e7 X-Rspam-User: X-Rspamd-Queue-Id: 0DF8C140075 X-HE-Tag: 1662360326-598869 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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