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 59534ECAAD3 for ; Mon, 5 Sep 2022 10:50:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6A7DC801D4; Mon, 5 Sep 2022 06:50:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 656C28D0050; Mon, 5 Sep 2022 06:50:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 51E85801D4; Mon, 5 Sep 2022 06:50:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 40B7F8D0050 for ; Mon, 5 Sep 2022 06:50:57 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 10A351605F7 for ; Mon, 5 Sep 2022 10:50:57 +0000 (UTC) X-FDA: 79877714154.17.2D4BE81 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf17.hostedemail.com (Postfix) with ESMTP id 94C8E40063 for ; Mon, 5 Sep 2022 10:50:56 +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-out1.suse.de (Postfix) with ESMTPS id 1563338825; Mon, 5 Sep 2022 10:50:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1662375055; 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=jLtoVNiBT2iSspfGxmncgOVgViwjY/ew1M2VzEnJohU=; b=tuZx0thWhdDNLQb2iOtjt5nsAi8tSL9CQTYd6aMVNNn7Jqg9oia58Jq/f1/Sms2d4R34gW QbXNq3fv1IdAre7JAEgFELRSnd5gXYW7luDDTsw/ZANRbuHIjBY0zx6/uqDFGbNI7gKJ+O /yk03N/hMavkJrXpvO5kxs2pZgVdcUQ= 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 EB231139C7; Mon, 5 Sep 2022 10:50:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id A2UwN47UFWOIUQAAMHmgww (envelope-from ); Mon, 05 Sep 2022 10:50:54 +0000 Date: Mon, 5 Sep 2022 12:50:54 +0200 From: Michal Hocko To: Zhongkun He 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: [External] Re: [PATCH] cgroup/cpuset: Add a new isolated mems.policy type. Message-ID: References: <20220904040241.1708-1-hezhongkun.hzk@bytedance.com> <0e5f380b-9201-0f56-9144-ce8449491fc8@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0e5f380b-9201-0f56-9144-ce8449491fc8@bytedance.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662375056; a=rsa-sha256; cv=none; b=hkP8W1SSX9fTLy5vTSetgIqUUD7+4tDRELEfsYNJRrbqAle+RuhquYv6AVw/YlClQTodp0 ibTcJZSbxVNyHqYGTvsdBvr9yFlxYWrg1qPbYMGE1vVvZVWQtCmi3zgTgUkntE0rCKnjy0 FOXPr4cYgDBl7hh6EroEnc/8+CvprPk= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=tuZx0thW; spf=pass (imf17.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662375056; 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=jLtoVNiBT2iSspfGxmncgOVgViwjY/ew1M2VzEnJohU=; b=PVww3p5MvdJM1YKTwKNUg/Hpa5J7LPJuNw6gnGbxN+ySntke+nIAMr8lygslCDhjcd9+Or 3YTkE1UzxqsUCWxA/IUu5/m3mjuMcZy54P7+RUoSFywXb/mUjz+k0flN04zMBId9IK/rww Sz27RKEd/mLN4m7rFQbE+oo7bqK2bLs= X-Rspam-User: X-Stat-Signature: 7iiera4uqcatuk8qc94usn7qtaxbiiba X-Rspamd-Queue-Id: 94C8E40063 X-Rspamd-Server: rspam10 Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=tuZx0thW; spf=pass (imf17.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-HE-Tag: 1662375056-505265 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 Mon 05-09-22 18:30:55, Zhongkun He wrote: > Hi Michal, thanks for your reply. > > The current 'mempolicy' is hierarchically independent. The default value of > the child is to inherit from the parent. The modification of the child > policy will not be restricted by the parent. This breaks cgroup fundamental property of hierarchical enforcement of each property. And as such it is a no go. > Of course, there are other options, such as the child's policy mode must be > the same as the parent's. node can be the subset of parent's, but the > interleave type will be complicated, that's why hierarchy independence is > used. It would be better if you have other suggestions? Honestly, I am not really sure cgroup cpusets is a great fit for this usecase. It would be probably better to elaborate some more what are the existing shortcomings and what you would like to achieve. Just stating the syscall is a hard to use interface is not quite clear on its own. Btw. have you noticed this question? > > 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