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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45BEAECAAD3 for ; Mon, 5 Sep 2022 10:51:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237610AbiIEKvB (ORCPT ); Mon, 5 Sep 2022 06:51:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236686AbiIEKu5 (ORCPT ); Mon, 5 Sep 2022 06:50:57 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E9C94E631; Mon, 5 Sep 2022 03:50:56 -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-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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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