Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2840780pxj; Mon, 10 May 2021 11:57:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeCvOjAjUaP8FH0tEcxsl9M7Hf9ut9+HY5jDXgO85nDHSaK3CAdzOQOM4FsTfYg3GZvJ3g X-Received: by 2002:a50:f41a:: with SMTP id r26mr31173674edm.339.1620673046998; Mon, 10 May 2021 11:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620673046; cv=none; d=google.com; s=arc-20160816; b=JQiF17m3U9qt4987qU7sdJZqXiW5n5V+L82MpjglmxlKZN8eMnaUk7RiAMcZ+1u6Cp ZXlPRT4CYCMRM3wQ4DIbGQxcAj2x2ecrzFjMVHtSK4bQBz6A1QJe/3hMcDUXMxeMHe+B R5TQlYglOsyACC/BImplndfj9UyyrKpmNDkB+CDSoS7kRoaNODpRgjZ0D2T6FeoqxVF1 ibf6G+ElpKfRGtUYgTd1hpaPPsqjcVp+yO4QK8BrEhhhsn1QOlTqrYg33XFm5MrSSUQ6 y+HJWnBNrrl3w/kAyLMUmuchvNJ/tlbPFEYzqUIMYWywwWy0pjsq+hlf7h4+P2fuDmdC S8Cg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=qhr+PGYEagAJ8E92KKnVFnuFMoTrCUOtPClJNlbWd8c=; b=HSiqNYzHVh7WhVJtWFEI5h/0bshBWOiCAc5FfbWQgOtiPIvIj/jJL9EG96aiyW81Wo pSr31fWzWUqjGNjAic5SBnW8KGyMvRkAQg2Cnlj25APw7KryNtOgsllixpj55PnVn/d0 8WTg+fnxHtU1W7ujdmdQCLRMBHJhm/vfTDd0H0U4qDCywCTlYMJo7dAgytlDLKlCJvhY 8nrHaWqMCT5hKtXnoY6RQg8xNlMF8OiWzHwID6mqHb5BWSuAphbgqOnzMTR/k02s/0Bd tflS3+/SzMibOd01wT45/DsH5VvoNcDrJXGMJxNPK0LwxkUfz/uM69Y3OiltI+9YTOmd gPMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XDAkuaG3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si817367edv.218.2021.05.10.11.57.03; Mon, 10 May 2021 11:57:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XDAkuaG3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229566AbhEJSzk (ORCPT + 99 others); Mon, 10 May 2021 14:55:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230300AbhEJSzj (ORCPT ); Mon, 10 May 2021 14:55:39 -0400 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E490C061574; Mon, 10 May 2021 11:54:34 -0700 (PDT) Received: by mail-qv1-xf34.google.com with SMTP id u1so8880417qvg.11; Mon, 10 May 2021 11:54:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qhr+PGYEagAJ8E92KKnVFnuFMoTrCUOtPClJNlbWd8c=; b=XDAkuaG3qMxQY7dLWJcvjZbjFutrp6S4uxZbqDVUVlsSSlv67pOxqGEMAsZEbwqLpm pCRp4m2d8A0+I0Gkk2olVBRLnUZBEc5ttuj8I2oy5s0FzSAP2wVS4GyJwoadxXHVgqqn Pgqw1/hbpWDzLZSrL+Hxdj+7XFk1z5MBMATmjmZZ+lDD/kYWKSA7GWeNbQqJrLn4rhgd PlkdwnMbSwf4IK3m3EHT7PmAHSlE9iO13AOyBBWG9En1y+48k1Rn91QsOu2Y/wUAdv5A +7m3+AVAd4dngN6iUbJCOV5dWMVYZ7gqt96zpShP50K+Rq5F5CaCkrv/58L02mrQ/qwd IbKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=qhr+PGYEagAJ8E92KKnVFnuFMoTrCUOtPClJNlbWd8c=; b=UDoA6DmFy6kPsOPmivff1oFAc8GLtiiRDn4ZNC1R5T2WXz9hgWU14FdcJNiaXqFIRe 30uDQyBGAK+E2QqNvysffcrNTpgYpiRIlnl5pU40BqOSeLSLBuG0m73nRwkf465z+IoI Q2e082ArkR36yS4hfVSjyzyLgXh8Oiaz1tnoendSu2ZbSFWdalIj2IIo9wwJChXyuC4G bTbdjd+bvnz9uE5ULnQADvQuHGytAt+CF1Y/NQ8V4imri3r6zUhXhb2v1LQheYLgUIAf PhEUjXENQlaSByB4LfJC6uU2B+TS4l+mJfA88M6QTvxTERzODFvoNzwrn1Fp50VQMYiB 6vJQ== X-Gm-Message-State: AOAM5304GfugstN8t2IN3iY+izf/4rX4c32KirdeP9RrCDGGLHxN23cg lk9eqfYkme6EK6I0/TKFk+I= X-Received: by 2002:ad4:4523:: with SMTP id l3mr13886384qvu.45.1620672873193; Mon, 10 May 2021 11:54:33 -0700 (PDT) Received: from localhost (dhcp-6c-ae-f6-dc-d8-61.cpe.echoes.net. [199.96.183.179]) by smtp.gmail.com with ESMTPSA id w7sm11934620qtn.91.2021.05.10.11.54.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 11:54:32 -0700 (PDT) Sender: Tejun Heo Date: Mon, 10 May 2021 14:54:31 -0400 From: Tejun Heo To: Roman Gushchin Cc: cgroups@vger.kernel.org, Zefan Li , Johannes Weiner , linux-kernel@vger.kernel.org Subject: Re: [PATCH] cgroup: inline cgroup_task_freeze() Message-ID: References: <20210510184556.946798-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210510184556.946798-1-guro@fb.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 11:45:56AM -0700, Roman Gushchin wrote: > After the introduction of the cgroup.kill there is only one call site > of cgroup_task_freeze() left: cgroup_exit(). cgroup_task_freeze() is > currently taking rcu_read_lock() to read task's cgroup flags, but > because it's always called with css_set_lock locked, the rcu protection > is excessive. > > Simplify the code by inlining cgroup_task_freeze(). > > Signed-off-by: Roman Gushchin Applied to cgroup/for-5.14. Thanks. -- tejun