Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4295182ybx; Mon, 4 Nov 2019 10:58:57 -0800 (PST) X-Google-Smtp-Source: APXvYqw49O1T0CYinGA0zU81Q/R8SucdDogtkKgfWrFeyuXvqSEmJZ2kcDbPekdG/MUDmi1PRZFZ X-Received: by 2002:a17:906:1c97:: with SMTP id g23mr25527182ejh.66.1572893937129; Mon, 04 Nov 2019 10:58:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572893937; cv=none; d=google.com; s=arc-20160816; b=CIlPLqk4ZuxxsS/y0CMLnSQI+g50JNJ7hw2I9yiOSME1B4LY0TdorXqSYk31s5jl0F l7XuLMGMGNmVbnatA4u4do7pIqxlbVev95kWM8uop5M+QJMbd0fdB9k0XWk8ht8o8BCb 6uNKI0upx3jsm7T27zw5elFoc1gdhz8HddXIUa0P0wsTSDJxEQF/kZZV8wnWpL4GBM5D b72YQ0BRc4NQ61zYSgY0/B7VdAMat9kFYfOjJ4K+72y9BnFV7FQQTm+TRdqmTQDrS0SO 5ZU27YtrTyssUEn0VPS/H/UMb19z4WZwBf++qaReoz7wnXxRrmKXTv7cn/+/IGWz/Noz lO4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iu+BhSItoLG7V/SDt+dUldIGjPfqnAm9cYSGYBKo0PU=; b=0uqrza1++uyWvRlLDJ/ZEc31jl47y3pTt5Rwfdp2QZLtTBHKC2KlFia5h4Gg5pp0Oj s7gTwUx+Zm2QkOpFLwrcpfpSxgvslngcQDz956kO++La9ROeqBdgVa1J1wWF75Qg8qn5 auwWPVOkJkK3RaML2riS9JO5rzJRurvoHW5DHEhsPHYnXWcLQ+XqPKwF/8Wy1jGAlITH FfMRaDfHJyYZr0XD3lXZNO+PPi4BPeuvlwK3tjpRf+dCsqDGE6iyo8kf0DKazMTmYMom sWQ+b230674XQsALZ+HYi0qghmFjsBrXH3YGJil96qeFSyH6RfjCVM5NYewV8dBpqx5q yDSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pj27si2250178ejb.241.2019.11.04.10.58.33; Mon, 04 Nov 2019 10:58:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729376AbfKDS5r (ORCPT + 99 others); Mon, 4 Nov 2019 13:57:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:35630 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728510AbfKDS5r (ORCPT ); Mon, 4 Nov 2019 13:57:47 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 22F82ACB6; Mon, 4 Nov 2019 18:57:45 +0000 (UTC) Date: Mon, 4 Nov 2019 19:57:42 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Juri Lelli , mathieu.poirier@linaro.org Cc: peterz@infradead.org, mingo@redhat.com, rostedt@goodmis.org, tj@kernel.org, linux-kernel@vger.kernel.org, luca.abeni@santannapisa.it, claudio@evidence.eu.com, tommaso.cucinotta@santannapisa.it, bristot@redhat.com, lizefan@huawei.com, longman@redhat.com, dietmar.eggemann@arm.com, cgroups@vger.kernel.org Subject: Re: [PATCH v9 3/8] cpuset: Rebuild root domain deadline accounting information Message-ID: <20191104185742.GC7827@blackbody.suse.cz> References: <20190719140000.31694-1-juri.lelli@redhat.com> <20190719140000.31694-4-juri.lelli@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ncSAzJYg3Aa9+CRW" Content-Disposition: inline In-Reply-To: <20190719140000.31694-4-juri.lelli@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ncSAzJYg3Aa9+CRW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello. I came across a cgroup_enable_task_cg_lists() call from the cpuset controller... On Fri, Jul 19, 2019 at 03:59:55PM +0200, Juri Lelli wrote: > --- a/kernel/cgroup/cpuset.c > +++ b/kernel/cgroup/cpuset.c > [...] > +static void rebuild_root_domains(void) > +{ > + struct cpuset *cs = NULL; > + struct cgroup_subsys_state *pos_css; > + > + lockdep_assert_held(&cpuset_mutex); > + lockdep_assert_cpus_held(); > + lockdep_assert_held(&sched_domains_mutex); > + > + cgroup_enable_task_cg_lists(); ...and I wonder why is it necessary to call at this place? (IIUC, before cpuset hierarchy is anywhere mounted it's mere top_cpuset, i.e. processing the top_cpuset alone is enough. And if anyone wants to create any non-root cpusets, they have to mount the hierachy first, i.e. no need to call cgroup_enable_task_cg_lists() manually. Also if I'm not overlooking anything, the race between hotplug and mount (more precisely new cpuset creation) should be synchronized by cpuset_mutex.) Thanks, Michal --ncSAzJYg3Aa9+CRW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEEoQaUCWq8F2Id1tNia1+riC5qSgFAl3AdJ8ACgkQia1+riC5 qSi+RA//fudY8YZhWshSdEbKhCAhyiKaBx3noxOAIsbI07smX9H3cCKqt/VuURNY jHy+43M9FQ1q3JnygVu5ldGgHUqXtuLugTA7oFSPVtATtHH37TLfpbUrspZBIUBp OTAJ3OHK2M1GlSCY++gA4KJ2XEI5cJQEc3UWK/pC2UGVlQ29V8UFa55ZQVnrO+pO EYoVOxlm9p6NoHjtgQ+xNXKjWfqGhrzl9L2VbxlGcBjP4Zkhdm7OE3VHZ6hwozH8 2aTuKte+DuU9GvMqMkmqKJfWHDB/mPNVZOb6IwQx4OOtKfrE3PZKgklBAMp9bolZ nwmODQbvZDoUKplmYum/RwlIlKFfw5gVa8W/T6oVBytbNqgk+yrUCKZlOIEOwm1e SJ/AeA5TfKXk7KL/8giEUpRQJCl+egl+ZQFXRZjkzrEDQm9HlOaCJohL7CifK70w qjk9hkg4Gj9g01brD6qlcbi2ewALZqKjprsPcVOORG6FlF9CN25qypc0P2r+KfuP IfceIaEO3YolOxrJGY61eDKorEI3L+i2TTAhf4z3HEpf8lnaZl8C0TglGjlZy8F4 k7l4hRJObilzKyjuxyC4pGRHKEKPsqnfP7g+AClPBKlpa77edYuswdOV+TPxmJWl KVhOnhZgRd8Iyq67vnHMN0aw6xFtSjWQC+Sxu5OuzLTfAOjUTEo= =VQRg -----END PGP SIGNATURE----- --ncSAzJYg3Aa9+CRW--