Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp656387iog; Thu, 30 Jun 2022 07:48:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7ntwR5Vm2qCiaPfW4d1Juc568zcLsuUj01x1Ea67wICM99XVp5QV+/CgPppjHv1xxLhRk X-Received: by 2002:a17:90b:33d2:b0:1ed:2038:b949 with SMTP id lk18-20020a17090b33d200b001ed2038b949mr10392760pjb.61.1656600522961; Thu, 30 Jun 2022 07:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656600522; cv=none; d=google.com; s=arc-20160816; b=UMrLs8SSSQDYmyMv5UWtiJsQn09WWOD13Y4ynqKkjLFNCbUSCHdaAljFmD+DsI3Iax 1CQiAtQOIgq+eMLkm6CrmrB9Kty43+qIZINUDdh7LiakYwFwF34NRcBRz/y+YlRk5CoY KkrR7Znm2ayFFu7VZ/1imYQLZgro2aIqOOcSxzrF+6ePXgDseCHgepFdDWy1JS8BpgVP F4THWRnVzdS2+J8f5Va81kaGC6MmcEoEjXyGYtEWFrqbmMALnZgSY02Wf+dLUIqA4SEg bjvW8uRdNzLOPRLAv54JDIsv+lpyheEockXZGT9StHzWpFzunWrd58NgEFqBPRJNjK+y Aecg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=r+2jSverPOfqGEKU6YL54SGkmzqRewq0zi4aTwuQWVg=; b=F6/nO384s/VOZnQpVSOdJhM1Wv6qOTSEnKMT/zQRIOr2Ra6uv0l9yXu6O44ZI/loYl d8Rgy/8e7bNLB6VoHwgA8aBtwQ0v0/CY+bwKHuafKG2eb3AyUUWfaGW43d1Dw/ZecqKw FM9hWwWkEXuV7EjE8QfZniWsmZZIVMCJYIcRdJCzeJedcrJyxJqjc7ryuZ6MGMwdxbSb NWhhXwMKk97xe3MueCKF0FNc40DtdZ0Hr24AEnHBoTqsok1Uw7y3Vkthhee+Cl++mHIy 8FPa4U7CClbRtuGTO4xtdk0WdYZa3gGdZqJVa0pN+truoc/P9xlCtXjtQS2qJHwCf4r+ J8mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=NQJFxWMb; 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 n6-20020a170902e54600b001623b7bdd65si29666086plf.335.2022.06.30.07.48.31; Thu, 30 Jun 2022 07:48:42 -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=NQJFxWMb; 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 S237217AbiF3OhW (ORCPT + 99 others); Thu, 30 Jun 2022 10:37:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235979AbiF3Ogz (ORCPT ); Thu, 30 Jun 2022 10:36:55 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 286CA201A6; Thu, 30 Jun 2022 07:32:14 -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 CB1B921EFB; Thu, 30 Jun 2022 14:32:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1656599532; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r+2jSverPOfqGEKU6YL54SGkmzqRewq0zi4aTwuQWVg=; b=NQJFxWMbAHm7LziJAaX0qwJ3jblN0hLNNfEOc+ukjrHuS04pTcAJtGu2PvLSHHm2baWcLi 6d6yoEW/ti0PFPza/gAw0Pv8kuPVwzG0Cqo/igYQU3BYxnCm+v4Hr+jEtN7Hz8DTdG0u0/ 9iFRnVdTN7We1cfra567KIbMx3damAM= 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 7FB7913A5C; Thu, 30 Jun 2022 14:32:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +DZiHuyzvWJHbAAAMHmgww (envelope-from ); Thu, 30 Jun 2022 14:32:12 +0000 Date: Thu, 30 Jun 2022 16:32:11 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Tejun Heo Cc: Waiman Long , Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Andrew Morton , Roman Gushchin , Phil Auld , Peter Zijlstra , Juri Lelli , Frederic Weisbecker , Marcelo Tosatti Subject: Re: [PATCH v11 7/8] cgroup/cpuset: Update description of cpuset.cpus.partition in cgroup-v2.rst Message-ID: <20220630143211.GA22105@blackbody.suse.cz> References: <20220510153413.400020-8-longman@redhat.com> <404171dc-0da3-21f2-5003-9718f875e967@redhat.com> <20220613142452.GB6910@blackbody.suse.cz> <20220613175548.GB21665@blackbody.suse.cz> <20220614115345.GA6771@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Tue, Jun 28, 2022 at 04:10:29AM +0900, Tejun Heo wrote: > What I'm trying to say is that cpuset.cpus of child_1 and child_2 are > owned by the parent, Cf On Mon, Jun 13, 2022 at 08:00:56AM -1000, Tejun Heo wrote: > On Mon, Jun 13, 2022 at 07:55:49PM +0200, Michal Koutn=FD wrote: > > I don't think child_*/cpuset.cpus must be owned by root. >=20 > I meant the parent. I'm slightly confused. > so a feature which blocks siblings from intersecting each other > doesn't make whole lot of sense because all those files are under the > control of the parent who would have the power to enable or disable > the restrition anyway. file owner parent/ user (mkdir) `- cpuset.cpus root `- cpuset.cpus.partition root (P) `- child_1/ user ` cpuset.cpus user (*) `- child_2/ user ` cpuset.cpus user (*) The writes to child cpuset.cpus may/may not invalidate parent's (P) partition validity (whether a cpu is left to it to host possible tasks). child_1 vs child_2 overlap affects only whether the children cgroups are a valid partition. I think you mean: writes to children cpuset.cpus should be allowed, possible exclusivity violation should be reported in parent/cpuset.cpus.partition. What I thought was OK: prevent (fail) writes to children cpuset.cpus that'd violate the exclusivity (or would take the last cpu from parent if it's necessary to host a task). IMO, it's similar to failed writes to parent/cgroup.subtree_control in a delegated subtree if the parent still has some tasks (that'd violate internal node constraint). What I think might still be OK: allow writes to children cpuset.cpus that violate exclusivity and report that in children's cpuset.cpus.partition. Writes that'd take last cpu from parent should still fail (similar to the failing subtree_control writes above). Hope that clarifies, Michal