From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4157C33C9A for ; Thu, 14 Nov 2019 19:37:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8170520724 for ; Thu, 14 Nov 2019 19:37:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ENcQLJlD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8170520724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2DA346B0003; Thu, 14 Nov 2019 14:37:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 28ABD6B0005; Thu, 14 Nov 2019 14:37:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15C6C6B0006; Thu, 14 Nov 2019 14:37:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id F1B106B0003 for ; Thu, 14 Nov 2019 14:37:40 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 7EC625010 for ; Thu, 14 Nov 2019 19:37:40 +0000 (UTC) X-FDA: 76155892680.20.unit81_25d34d6696b24 X-HE-Tag: unit81_25d34d6696b24 X-Filterd-Recvd-Size: 4493 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Thu, 14 Nov 2019 19:37:39 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id j5so6664127qtn.10 for ; 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=tEbO61SyL5WEQIjpVegrM4A832VB0zR1q6982EA8FYCpiUiNhSC73PKXkdZgY98QJY 0e+SBDG5A+NP2OlHU7NRg7+5ueHQX/kzs9Ii0bNW0LAnIsuqBwl2oCnFn6htZGbBW7TU zm+aSWty3FTMqdW30H6vCCBS+LEGJtyghCuN3t667lyt2biKRrXRPqZEYOnMUhEwpPjZ 4G6D4RXNBXjFdMQqPiI+3pWCCLweYWflh/S0IVMJhKH9NG0lsGfMtVU9RFTkOF3+6dTy 7MykFy1NzwOPMmZSI/7LLsbP0jsvJVUkC6GJZZkDiY1n6GHparXvwI0IA2p/5DAquHto +/tg== X-Gm-Message-State: APjAAAUbtOffNbCXFYnbNtSAn3395olbXXFnP2SPQWj9ovQ8pFHl7Zqy +vuUKKDfbm/AoRQQWfeMkj8= X-Google-Smtp-Source: APXvYqxT7G8AToZXHz14LxnBAYjHU/Qt6IRoHOBggDxGPJxNQ/IOqepe9ojGzA8OxASeKgRE8f6g7g== 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) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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