Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp839552imn; Tue, 26 Jul 2022 10:40:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1suoP+xIgbC7qQLGQOBI5SqH+h31C3S2WXlYNoMjkXhNh2hfBx86jD2kYHViOlJlYSh/P2B X-Received: by 2002:a17:907:6ea0:b0:72b:8574:b7c4 with SMTP id sh32-20020a1709076ea000b0072b8574b7c4mr15069838ejc.418.1658857214506; Tue, 26 Jul 2022 10:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658857214; cv=none; d=google.com; s=arc-20160816; b=A3ZX/ZtpF0QmrMKBFJPgZF84HMdEwsoXOGjZiT8mkWmWE+9kkMmY2dAOeLAC4Gs4yM 1j+YUaEyM50sjCGqr2TgM8bNps/lKETHOAqIOVKAwV6wIxyj/mX9P8ChHaCYHJHm2PN9 gRRLgZhGVMR+Cck3Vd4To05rBIL/3WMshCfHB3UHuHsVuirrcuSSx0kfB/JdZ0rlyx+C 5mO7Q+IcDC+3itSjoNQH+AKFXyLuF7Aga3mKOxyaudLpjDDT9YmRfymT0CAf4gS6CWAn SDPGTFosaxP7xBrB2UvP1KKjPcUGNrwepho22KGay1XmuKBWq0EkjUa99NgoppmrzZv7 0PGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=csi8DKhXQqGuLjHDX+zKw1RSlMGZo6HFF9ZyuowCuq4=; b=iHuhtSsxgFV/b5k+qoZSEgxZiLluGn2a30uxIW/Ee1LltCVwYiIoYgJi2GOMQNmFG7 hHz2O4pq2w0Cq8+GlFvbAJi6WQ1M9X+56RP5Ju8SFb4zOa4Yw8z+0ukMWj8TU7cLZY+Z YNKPpHycYzdxSAwLf4RzrNuNjwxFJUGKrpKlDSbfVflMmJWM4T4/AR5jIFies7tCVBOp aBALL++mxjUpj7xhA3EZrvitHeXQbfS0ZqvDg6LKAWwOQuVtzOctR+ueLG0/cTvAfucG eWVWJXuP4hCoaSgAWY9CzWOoT0QSmlevEs4zUbVgaED6zDrND33KgW0837b3xRtu++S7 4b2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="U/Sdxptu"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn9-20020a17090794c900b0072f40d666d6si17998284ejc.602.2022.07.26.10.39.49; Tue, 26 Jul 2022 10:40:14 -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=@gmail.com header.s=20210112 header.b="U/Sdxptu"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239310AbiGZRd2 (ORCPT + 99 others); Tue, 26 Jul 2022 13:33:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229928AbiGZRd0 (ORCPT ); Tue, 26 Jul 2022 13:33:26 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A11F1C908; Tue, 26 Jul 2022 10:33:25 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id z3so13977488plb.1; Tue, 26 Jul 2022 10:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=csi8DKhXQqGuLjHDX+zKw1RSlMGZo6HFF9ZyuowCuq4=; b=U/SdxptusQuSzFDIruTYLSWMcIba2U5OWiLGu6pkSYGjb1Nx+wNeOoSNQjBOMkxTKz zXq9A7gaHKIYjoND1POiRg2zHsufOsMWHHkUyfhwXmVE2gDM5PI+lb8bJX77ZshlVSQ3 BD/GGKqArAy8NjtbJgFpXv+4ypVe67LSLaNtXmXAf4e07P01qocpHVaitOV1Dt74CRmh 5iHsteyTsCkZfWuARYvMkM5T0Z9VWKmGwohbrXhhqpaBWb035bzWnKwrHMieeFGdVRWn nRQLftN8+acOuqZpW5qWFezxRsXd+GHg9ojbmsZZUUqBS684vqgS93NXMfDN0V3j1rTM O2SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=csi8DKhXQqGuLjHDX+zKw1RSlMGZo6HFF9ZyuowCuq4=; b=O80qXCDgoBJqMNPN67Tv8Cy1oDgVkIVXOdNxt1XiW7Qi1JBxP5Dg4cooKX81hz0sfD 8+iZIPdYbY19giGHAf1LEHhEW46RsQ/j1oTRP1I1F+atJdNHML87zgVvCkD+JkE1jZRf RS3MIH6CdJNaNTQeQQ4og+0p6ZJXrdHhoOyngzaSingrQyodg54VkC3OfxDto4BvkbUb OX1/wncw0KcH2bdQMmgW1xFgx+Ppjunpv1O7vFJG4/5gcHCg/E9ep8NLo0oyMQFGafhS 38D2Qez90totwuBi9GSEtlaUayd1otWsNQk4DvoneMf9k+MDvxBA87kJgO5RlJGeg4US pATA== X-Gm-Message-State: AJIora+lnFzNOgHg1DsGpU/xCVGPYD1zAllLMIr1mo4iGhgcTZ3lFXWQ iY093F19lSUcVi++b1+r7cU= X-Received: by 2002:a17:902:b612:b0:16c:d98d:638 with SMTP id b18-20020a170902b61200b0016cd98d0638mr17312229pls.38.1658856804727; Tue, 26 Jul 2022 10:33:24 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:370d]) by smtp.gmail.com with ESMTPSA id qe9-20020a17090b4f8900b001f2ef3c7956sm1904021pjb.25.2022.07.26.10.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 10:33:24 -0700 (PDT) Sender: Tejun Heo Date: Tue, 26 Jul 2022 07:33:22 -1000 From: Tejun Heo To: Michal =?iso-8859-1?Q?Koutn=FD?= 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: References: <20220726143257.GA23882@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220726143257.GA23882@blackbody.suse.cz> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no 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 Hello, On Tue, Jul 26, 2022 at 04:32:57PM +0200, Michal Koutn? wrote: > 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. Yeah, I was disappoinetd that it wasn't being used by systemd already. It'd be great if the glibc situation can be rectified soon because this is a much better interface. > > + CGRP_ROOT_FAVOR_DYNMODS = (1 << 4), > > + > > + /* > > * Enable cpuset controller in v1 cgroup to use v2 behavior. > > */ > > - CGRP_ROOT_CPUSET_V2_MODE = (1 << 4), > > + CGRP_ROOT_CPUSET_V2_MODE = (1 << 16), > > > > /* > > * Enable legacy local memory.events. > > */ > > - CGRP_ROOT_MEMORY_LOCAL_EVENTS = (1 << 5), > > + CGRP_ROOT_MEMORY_LOCAL_EVENTS = (1 << 17), > > > > /* > > * Enable recursive subtree protection > > */ > > - CGRP_ROOT_MEMORY_RECURSIVE_PROT = (1 << 6), > > + CGRP_ROOT_MEMORY_RECURSIVE_PROT = (1 << 18), > > Why this new gap in flag bits? To distinguish core and per-controller flags. Thanks. -- tejun