Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2961853pxj; Mon, 10 May 2021 15:04:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAdtK5FG1q3yxwyNR724lwTJVp0ilsv/m8vAXt5jwf3lgNWJ4LTi26v1B27Sq+VkXdXyhp X-Received: by 2002:a05:6e02:2189:: with SMTP id j9mr3342152ila.3.1620684271699; Mon, 10 May 2021 15:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620684271; cv=none; d=google.com; s=arc-20160816; b=LlSPBZdx7BO1A8LdfjMHzlzDHZ1LwefWpzY/Z5a4rYAwou6p3KPBu4/LZYiEBt2gGA VMabAflL1/wJyrZz5prrN+Cf5UcZSztHYA7lomQedl3t++I+WIujcAXfpjJiRsVPmSlJ CsgtCJszVO5/k2KUnB8U3yOuSb9Eum8V7GDBBhiahv32wGfDNRi10vLpjGe8KbsYoSBb pypQn9nwuugjA+wGJDMiwqVDwJcaL2qSCWxciqE9jgUZAR3nvvziPdTTFCiKX7gW8kvc 8H+KnKL5FKFqfwm7V0E99drLa2xix24YBBRQGdh5fa1yt2SmZsLIAlxHRnPLqRLUHwbB dYeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=eF6mHXnyQO/5Hgp+d/GWBsHQqZJ5DW8+q46yqFcmkgU=; b=t/a2vPQbEz3mSG7+RlJZKyjZ9Ol0rzSYVEWtdKPuRKtuRZS4LWEyxD9qEyhgnX0TTB 5IMBxDmfd5WxamND7P4Xjk1B4hBjyOgTA/OTQfwDF6C0OV4T0jfTUCYzLj7K4CJebdg0 aJfORY3J0SmJRxz/AudhOhe2fDvCo9Q4eNkbK15+3Acxa/D5NIF3HvBmO2cDFGhgoapn FkUwNFDm6LJ4VUbiRbj6Ic0ZRvZfNxgGT941H+2pBVEPpprPoKYBM7uil/rMVa2obx+C kUxahh9xvVFiAizT7DmkkJPz0+h9Gm+hgtFPy6HG1BC6WFWS2vG0WpAFs6dwnC2SQl6E 75vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dIK3Ztfy; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si4254277jal.57.2021.05.10.15.04.19; Mon, 10 May 2021 15:04:31 -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=@google.com header.s=20161025 header.b=dIK3Ztfy; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbhEJWEn (ORCPT + 99 others); Mon, 10 May 2021 18:04:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbhEJWEj (ORCPT ); Mon, 10 May 2021 18:04:39 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70253C06175F for ; Mon, 10 May 2021 15:03:32 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2so25643576lft.4 for ; Mon, 10 May 2021 15:03:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eF6mHXnyQO/5Hgp+d/GWBsHQqZJ5DW8+q46yqFcmkgU=; b=dIK3ZtfyVSK/2JyhHVbLHvpO175CBFwmAuHrOWRfTZFvJNS7aVPDYfvS8vsgzreQfo Tk8wzdEV9Ofvm+h6RH+61Aq2wfnsqh2F8uVLezaNiu4FQ1b4TErhFnznIrA/p4zCRTqu xEOpxTLeh6QuhQhHeYjI8rBnLkVmtcbpzioz0OAdKfaRLKau49CYRc3w1tkRITK0l37s ukasPeDm2Ycqv5nz4Ch8YoHUx87x0PlcbmoCH79UaeYz2qaDnqBU87H/87FrI4bwFBii Mhzxr93A8of7z71kPsEhBsucuYQXcWOXE/FHmcgO3muv2dsSvihJmlGDVhe2QokLfofZ j78g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eF6mHXnyQO/5Hgp+d/GWBsHQqZJ5DW8+q46yqFcmkgU=; b=YJ82HbiS2ze3QXK8maQv5sI2cGdOSUWs8u2/Ja26dbvEOJwG+daVDZLp3Ctf/dBzzy JOVo/i+PzA5n6prPSMw5mC3sooc3pp9ZTPchANMhsK63p/5uEHRQ2OZUJ6re04uujw/v sr4ST8o99aIRTepl8zTdimh6M2rRWSG/8cVC+AkuiFVUelm5/khHWltpqxos9XosYx5o DGHEE+Il/6a12yJSL+SiprdYHKkfM07WmMUiSj18IsDQN1Cs50c1QZN+koFRBmCJc1S7 kn4iKnP5/uC+kkNyYMr/NFTeVSw8dSPxL2yIpmjL4oD1HeynHx0lr/9pdOydI2grlrlq I1Yg== X-Gm-Message-State: AOAM530XCVg4rZx+HcmzESY2O5onDkE6fDJ2/oFunXJeUrNgEeXGcej7 eT+YuFvS7w13ert5KZFXNdhM3z8qDNjxQDr/U0n2Iw== X-Received: by 2002:a05:6512:1182:: with SMTP id g2mr18581406lfr.117.1620684210724; Mon, 10 May 2021 15:03:30 -0700 (PDT) MIME-Version: 1.0 References: <20210510213946.1667103-1-guro@fb.com> In-Reply-To: <20210510213946.1667103-1-guro@fb.com> From: Shakeel Butt Date: Mon, 10 May 2021 15:03:19 -0700 Message-ID: Subject: Re: [PATCH v2] cgroup: inline cgroup_task_freeze() To: Roman Gushchin Cc: Tejun Heo , Cgroups , Zefan Li , Johannes Weiner , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 2:40 PM 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(). > > v2: fix build > > Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt