Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3604858ybc; Thu, 14 Nov 2019 11:41:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyvcez0HRvkeqsFRedch199vgfxL2Nlu3Jglo8FtGDigwxoQTrfAbaeOnJAXHMQhznKCxR/ X-Received: by 2002:a1c:650b:: with SMTP id z11mr9680874wmb.149.1573760467399; Thu, 14 Nov 2019 11:41:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573760467; cv=none; d=google.com; s=arc-20160816; b=pl8g+JXN7YmM1a1z2EfvNY0uv8aVf9/TWSO2xRZJJ6XA50MJbYzYPtSFqOTeVC0xhT jhionSl5be2HO/9Z3hffc/laY+tn+Iom37agkz8UmTX8nQfp+V5N04UC6HQKXXAdjK0x bzsaWrLuF6aM1fbq7z8ncqd003WFFpap8sNY/QYOS45Z631a2EsyXBkK8wfmVPBX50Ad uigjQAxDYAYKx0pPgEIVCKDHKxvMlKyl2AbSg5x6M6FCRX/bfcKqaM9X4K9WCGi4TBk1 AAyxN9za3TaVdvg7FvgpTiEP8OdUhA0u8A/BbPUKQIam7BWF6BXnQXxN2sjNt20kvVVp unPA== 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:dkim-signature; bh=NaPLGFJxVcxgMv19Az2//JUge4Ox1fZnZEYyYhMIrvQ=; b=BkNo4Rq4k3MCiZ3KpIzH1Xd/h0aPdGVZt2gVifG51eNr0drFD64sPf2i6hJt7tEr9j e86LS2n+unuP5kPH6zcSQiQYamD1wAAD0XO8++40RNOQfJ6vxwsn9TqNTzECDps2KVtJ Luu1121l5G2bKXEbzwpaIuDXeBFPfxLVpt2c3AShPgph0+nyLhe7LDTS/zRe1S8EC6z4 yl5Swqu/+BJz0vrcIpXqnRUoKj8fqDBxDO54ctwG+UUTdJURBFkSgcw4G074pyquLwFS d8XEVVss0VH+DQw6GStFO3xTUy8T0ptPuTwm0AISYjiCnMD+0FORqPLaU9vlo6enGSJk Y4nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ENcQLJlD; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x17si4239141edq.340.2019.11.14.11.40.42; Thu, 14 Nov 2019 11:41:07 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ENcQLJlD; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726632AbfKNThk (ORCPT + 99 others); Thu, 14 Nov 2019 14:37:40 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:34682 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726289AbfKNThk (ORCPT ); Thu, 14 Nov 2019 14:37:40 -0500 Received: by mail-qt1-f195.google.com with SMTP id i17so8123506qtq.1; Thu, 14 Nov 2019 11:37:39 -0800 (PST) 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:user-agent; bh=NaPLGFJxVcxgMv19Az2//JUge4Ox1fZnZEYyYhMIrvQ=; b=ENcQLJlD7NyKjL4MhLTtu6qmWQBoZX2ZbVzbI6gs1a5r58sbqecrjnHvXwJxl0rNDG s279UAsU35aOF6fL5X0plcg17peUXu2eWl3fEr7AnIPzNuD6vhy6+JASUlFyIDl1A75x hYafS7hrCW2I9Tfv65/P2zBW+iAP7E+8qBq2wyWoFs5l6XYU1oAbdfGjK9HLpc4nxahY qkY1XrfbEhOf5v1ODQD9vzo4h0vrZqPHM/zzo9pKbAgukQUQniSiJdPU6+ArsE65PAvy UAzb9sB5hT3dOXQcuuyKKJkV3QEn8690LrMp6yeDSRycq07Puyhu3s7v29FMc+2VEUE5 6GDg== 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:user-agent; bh=NaPLGFJxVcxgMv19Az2//JUge4Ox1fZnZEYyYhMIrvQ=; b=R76EOmXfrqKTCXYkQk1fQGyvDhPiTsARsUv2rdPv4VOTO+GOXIWxIa/tgvRR+xfu3D MjlPTqVpBg9poT7V41fzuHK/izIZzf0cXmQ4k0B2+GWkewg1wvDu4oMiesY0N26v4ocl RRPEfGAAQrkYW3gUxItMHII6VfawfA71yM+4Tkxwj6lNoOC7ZldMrcNa6ST3fdwvpTZs AxC7Elvlt9Lg6RWGjvc+gatPNzhkRsaQ+sVA+u5WNdPs4f4Tb/xdfvW5C1NvyV0LpmXk 24VLKnvOXDA4ZnlxUVTBEPAgVvERQ+CFEfrU64pc7tBzFofIOC0f8Vdq8TLBrqnXGvkw oV2Q== X-Gm-Message-State: APjAAAVs7k4xIYHT8tfThu9rEUyp/Gvna48gaunmafdHUrno6b4VeW4H dWUzqoliWiw54DJiisCXt1w= X-Received: by 2002:ac8:89c:: with SMTP id v28mr10058337qth.156.1573760258727; Thu, 14 Nov 2019 11:37:38 -0800 (PST) Received: from localhost ([2620:10d:c091:500::2:69f2]) by smtp.gmail.com with ESMTPSA id n62sm3002863qkn.47.2019.11.14.11.37.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2019 11:37:38 -0800 (PST) Date: Thu, 14 Nov 2019 11:37:36 -0800 From: Tejun Heo To: Michal Hocko Cc: Roman Gushchin , Michal =?iso-8859-1?Q?Koutn=FD?= , "linux-mm@kvack.org" , Andrew Morton , Johannes Weiner , "linux-kernel@vger.kernel.org" , Kernel Team , "stable@vger.kernel.org" Subject: Re: [PATCH 1/2] mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm() Message-ID: <20191114193736.GL4163745@devbig004.ftw2.facebook.com> References: <20191106225131.3543616-1-guro@fb.com> <20191113162934.GF19372@blackbody.suse.cz> <20191113170823.GA12464@castle.DHCP.thefacebook.com> <20191114191657.GN20866@dhcp22.suse.cz> <20191114192018.GJ4163745@devbig004.ftw2.facebook.com> <20191114193340.GA24848@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191114193340.GA24848@dhcp22.suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Thu, Nov 14, 2019 at 08:33:40PM +0100, Michal Hocko wrote: > > It is useful for controlling admissions of new userspace visible uses > > - e.g. a tracepoint shouldn't be allowed to be attached to a cgroup > > which has already been deleted. > > I am not sure I understand. Roman says that the cgroup can get offline > right after the function returns. How is "already deleted" different > from "just deleted"? I thought that the state is preserved at least > while the rcu lock is held but my memory is dim here. It's the same difference as between "opening a file and deleting it" and "deleting a file and opening it". We shoud allow the former while not allowing the latter. > > We're just using it too liberally. > > Can we get a doc update to be explicit about sensible usecases so that > others can be dropped accordingly? Yeah, we should audit and convert the uses and update the doc. Thanks. -- tejun