Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp742562imn; Tue, 26 Jul 2022 08:08:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tQc9eFej9eeGHCie5P4z2IjrwjyUv5Stozh22yeX2cA6XqbYRuYOabLbX2m4V7ML4vyIvr X-Received: by 2002:a17:906:ef8b:b0:72b:58da:b115 with SMTP id ze11-20020a170906ef8b00b0072b58dab115mr13979749ejb.417.1658848123557; Tue, 26 Jul 2022 08:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658848123; cv=none; d=google.com; s=arc-20160816; b=0p3BCynAAZN6dVH2c300BPhj5GZx8GbGgk3ch5U7c8k841FmTrNXuUpcela1T5uZnm V2SBAxuwr6222i5s2qpFsUj8xcnB6x+QaqZunzVMONCMRu7Wd2wCQX11yX8vc9Dc7W+3 Dg7mD1XpWVl5txFxcwo5tN8NFL6sihGvr3WbUEIHYe+yuKCe47alkz+NdBbzV2qR8Gbf UFQ+xiJYfIvF9rz0B/DbHAuQexwlZwXkPmcHEfMPr2oFRVUwxKCO8OmivnPSIbjr1L5/ MELHggGndDtgBBpSUmGx40Q713pD3fYBROIx6Rw+llwehuZi7Al14/J0YSzweDn3ZMyd 4vcQ== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GmzxlrD4MfGqasLwf7DeQPvyp1YsjrHWacTayMiVBgs=; b=Kd3mctDb8McysQ50KJWT8PJ5wre30oGxtNCWMRbWZ0IbPdVxbV+M02vlVp9obAUrpz Bz/Q4mB29OGBBEhwg9chUoqhNgZZfr1Q5Gi/lP4bCUe9wBzrOTocjaxEFfVI3LMaGvhK bm+ZljThfcghUe1SsjBujSy3z0jJmi4FiyBRnOJfz7Aw+373bWQsNE0qlAhdut1iwYUk ad488cUEFD1uf5a7fvRzSLOwYsBZTxhKLD9C/g5kyTMYJM3COhpKI7y6wxBS+LdtzWv5 rIRlKFlwfh9+goHnoPy1kP0eIwWXU3Aw8rDnOoZ0cFAVUW9aGJaYyl5ZNSSgAJD/i+LJ PESw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=VzaexPvc; 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 w6-20020aa7d286000000b0043c8fd06e8esi646322edq.357.2022.07.26.08.08.17; Tue, 26 Jul 2022 08:08:43 -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=VzaexPvc; 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 S239322AbiGZOdE (ORCPT + 99 others); Tue, 26 Jul 2022 10:33:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239307AbiGZOdC (ORCPT ); Tue, 26 Jul 2022 10:33:02 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A346129813; Tue, 26 Jul 2022 07:33:00 -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 2758437EFB; Tue, 26 Jul 2022 14:32:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1658845979; 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=GmzxlrD4MfGqasLwf7DeQPvyp1YsjrHWacTayMiVBgs=; b=VzaexPvcMynfjlBtImA2nTgG3+dH5jaMLEtGNj2QeksXbstkDRq1u8e7ogp2JZUAqJFhEK +TgJXVLp7L7TwUNj+MkJRDnMCThwYCv0CKz6ZWhZFabsQjJMSm9ABubb+3Vf685KftagjK IyigtmDwXokwRz35tcgFW3KQ/BGxWfg= 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 F40C413322; Tue, 26 Jul 2022 14:32:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1FjDOhr732J3PwAAMHmgww (envelope-from ); Tue, 26 Jul 2022 14:32:58 +0000 Date: Tue, 26 Jul 2022 16:32:57 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Tejun Heo Cc: Christian Brauner , Peter Zijlstra , John Stultz , Dmitry Shmidt , Oleg Nesterov , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH RESEND 3/3 cgroup/for-5.20] cgroup: Make !percpu threadgroup_rwsem operations optional Message-ID: <20220726143257.GA23882@blackbody.suse.cz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline 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 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 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 23, 2022 at 04:28:28AM -1000, Tejun Heo wrote: > This makes the hotter paths - fork and exit - slower as they're always > forced into the slow path. There is no reason to force this on everyone > especially given that more common static usage pattern can now completely > avoid write-locking the rwsem. Write-locking is elided when turning on and > off controllers on empty sub-trees and CLONE_INTO_CGROUP enables seeding a > cgroup without grabbing the rwsem. Just a practical note that CLONE_INTO_CGROUP may not be so widespread yet [1][2]. But generally, the change makes sense to me. > + CGRP_ROOT_FAVOR_DYNMODS =3D (1 << 4), > + > + /* > * Enable cpuset controller in v1 cgroup to use v2 behavior. > */ > - CGRP_ROOT_CPUSET_V2_MODE =3D (1 << 4), > + CGRP_ROOT_CPUSET_V2_MODE =3D (1 << 16), > =20 > /* > * Enable legacy local memory.events. > */ > - CGRP_ROOT_MEMORY_LOCAL_EVENTS =3D (1 << 5), > + CGRP_ROOT_MEMORY_LOCAL_EVENTS =3D (1 << 17), > =20 > /* > * Enable recursive subtree protection > */ > - CGRP_ROOT_MEMORY_RECURSIVE_PROT =3D (1 << 6), > + CGRP_ROOT_MEMORY_RECURSIVE_PROT =3D (1 << 18), Why this new gap in flag bits? [1] https://github.com/systemd/systemd/pull/16706 [2] https://github.com/search?q=3Dorg%3Aopencontainers+CLONE_INTO_CGROUP&ty= pe=3Dall (empty) --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCYt/7FwAKCRAkDQmsBEOq uUu7AQCTUIpH8K9WfOjrd4atmJg3ivYL9Dq6gqtpvNZrS7XStgD+Prz9fzwjGXvO Fw86GZpQI02CRHvZdUw+lRMJ8r7qhAQ= =bB6g -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0--