Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4771660ybc; Fri, 15 Nov 2019 09:48:51 -0800 (PST) X-Google-Smtp-Source: APXvYqyZT2apcjwUT8Y/fCSk6frkga8lGWeNGw+WV8hxAI6hhY0ZOmh7slx5JPJBhG2v/ZWcrTji X-Received: by 2002:a17:906:bfe3:: with SMTP id vr3mr2452476ejb.273.1573840131363; Fri, 15 Nov 2019 09:48:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573840131; cv=none; d=google.com; s=arc-20160816; b=ZccPV0u3eBrJrSyE6vNfoKHBVZ8AOkx2IdPUKpKZYJL7WYRl41RlECQaZeZYDXx4r5 E1yvfgZhuPpU/pfpCXV68ucoNdGwLN2e2An/iFai+xV7E25UMHgFwqpnrViWIixGtsCk umLnFmE2hu5UcSAencjlZn6uRfu8gbMu2Mmdv8p9rG1dDQKHxGnzxMUkSRx1m2mJfyGN LMQTkCZXhAiNX/AwJM5r1rbKjqO0K1r9BbA9gi0S2FQt0twIOaQftB4mx711S6Eu8mGf 1MDWVgE05I/+FMTWWwvQ+rKnxZ8U5K8Sx4piVJIeNvfs5BgjhHoEzfRvAjgNiyaJR3hf nfuA== 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=YuU96D/TDOxMsRo5MUSuzz7CtcCcjXftMIfC3UuPqHU=; b=WSlqYxprFYAM03jg4HScCXNna4LISt/Id/3qjs5u/yIawS9qGt/I9PI4GlUJX1frYQ 1PBurzj16HAHAOAVpKK/PgJbQf4wWrzaDYkWqPo3N2Tur8UGj4Hm6/wPp8H0idX+Gz74 hDDenItOoW1yodv2Fik4rECW5zAbSPcaUJiPgv4EJonL8hiYy/AJiOzoT+CbwUUmVzhg wh9LUuu6RzTLyvi4Y1zJenbMhu4Zfq0WBKKEu21MSqEyQXbH3j9v4PmTqC0c1VI34MQ7 OMUWNHa8hC+qMoNiIwBDMuTIGug+gQnz/3NL8rXPIxlshLDfRf9SmzcDy9HHPsTwv/jm SwTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="pPGEq/7Q"; 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 f11si6061876ejr.10.2019.11.15.09.48.26; Fri, 15 Nov 2019 09:48:51 -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="pPGEq/7Q"; 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 S1726766AbfKORpP (ORCPT + 99 others); Fri, 15 Nov 2019 12:45:15 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:34487 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbfKORpO (ORCPT ); Fri, 15 Nov 2019 12:45:14 -0500 Received: by mail-qt1-f196.google.com with SMTP id i17so11663851qtq.1; Fri, 15 Nov 2019 09:45:14 -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=YuU96D/TDOxMsRo5MUSuzz7CtcCcjXftMIfC3UuPqHU=; b=pPGEq/7QhVZhrqpLch0bLyj/72nqtgSOl/IMPgAAmVYSsb/fRFxcnszz/kWfmiVeiX qK1uvlLMbsbFmDfDJppVIkeWYm2SIamy03myVeeNOFkkjpYlcLM4KGVtP8f1AlPJmFa0 nvyUPYX0eBdDhMhIs8O1RuIwGjSBbGQCZOewWNUZkIcuLzwRbmKlcRkfaj3BKSHfQ5iB dRmWsSYTEKp8UBfBfgLcndjAG7O+1WTjfubUSepVafd69mLHoSnQTbFeCe77pu+0/fEH MoHr4DovkUADP32hUfqrkedITCc0DSJ5QqqfCraZRb/B/SKet6twIAOUHUzTTxddh5Kf P3wQ== 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=YuU96D/TDOxMsRo5MUSuzz7CtcCcjXftMIfC3UuPqHU=; b=M7485x2oL8EGheCtdG768IFJtbvY/zy4bP/lup+FM2bggu06Mu0nHZyNNCc9a7AI3j 7bJMc+0L61n6Nq+ce2KLkqPe9yttVN2e1zUAXj4D+GUCS5eJr6iTRNs7KWETPMOAEWPi bvHmfRAXXDZY5tvRh4Le6mW6Rg3ZPrdPebW7KYiWliadUZGgQfLxzjnQJxL204nksF/S bmV4Y69FjPA0+eTx0AysIn89D/czpKDMylP9BDqmvC2eOGiQiE2YabFUsxHFrylj4Sqh 16CC5Mz/QqCtdxc+RGYXTyVM9EIJ+vxhPrhMnruhe9ngGqxWLqWIdy0Uwe6ySL5DwtYV iEpg== X-Gm-Message-State: APjAAAVWxxQkNgnK5PS7Zaqhj2d9A+mlBQ6J9X9nszPudYOLaovAHHTB gFhxsRpGwkIE81/i9hs0f0U= X-Received: by 2002:ac8:151:: with SMTP id f17mr14536642qtg.92.1573839913365; Fri, 15 Nov 2019 09:45:13 -0800 (PST) Received: from localhost ([2620:10d:c091:480::4ef1]) by smtp.gmail.com with ESMTPSA id w5sm4347404qkf.43.2019.11.15.09.45.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Nov 2019 09:45:12 -0800 (PST) Date: Fri, 15 Nov 2019 09:45:10 -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: <20191115174510.GQ4163745@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> <20191114193736.GL4163745@devbig004.ftw2.facebook.com> <20191115174031.GA15216@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191115174031.GA15216@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 On Fri, Nov 15, 2019 at 06:40:31PM +0100, Michal Hocko wrote: > I am sorry but I do not follow. How can css_tryget_online provide the > same semantic when the css can go offline right after the tryget call > returns so it is effectivelly undistinguishable from the case when the > css was already online before the call was made. Or is my understanding > of what Roman's said earlier in the thread? It's *exactly* the same semantics as opening a file and deleting it and keeping using it vs. deleting a file and then trying to open it. You can't give out a new reference when the entity's visibility is expected to be gone already and that's the exactly the condition that tryget_online avoids. I don't know how to better explain it if the file analogy doesn't work. Thanks. -- tejun