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 0D3ECC43215 for ; Fri, 15 Nov 2019 17:45:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C96A02073A for ; Fri, 15 Nov 2019 17:45:15 +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="pPGEq/7Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C96A02073A 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 6220B6B0005; Fri, 15 Nov 2019 12:45:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D2B26B0006; Fri, 15 Nov 2019 12:45:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4E8736B0007; Fri, 15 Nov 2019 12:45:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0120.hostedemail.com [216.40.44.120]) by kanga.kvack.org (Postfix) with ESMTP id 42CFC6B0005 for ; Fri, 15 Nov 2019 12:45:15 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id BF15D181AEF1E for ; Fri, 15 Nov 2019 17:45:14 +0000 (UTC) X-FDA: 76159238148.03.grass74_850c2912cd925 X-HE-Tag: grass74_850c2912cd925 X-Filterd-Recvd-Size: 4439 Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 Nov 2019 17:45:14 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id n4so11678213qte.2 for ; 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=GhptFf5b2dSTwPnLpM8gXuffh2QjviMLcOg3GY6Od5S1GslWRhD8CkrT728wgH+dCL ijIHcOQklFeRDl1TgroCq+Zsnv0OqjKH9GEtepIh80o72TOvbI1jzFbb5mZU5zl9+E2t 3/LkFg6jDKNZpf0q1uqtSXnVEc7tX1DawzRCuwUCurTvO66u7J0XWbmjwuYatE8ey1Sm PJO8Kcll8T4QW117SfHpL2c1KKW3/GsTcZtDKM57AyFNU1o1i+tYg6A5NYp+hWtAg62G f1nMy+i4n5nTCCc9991t9EI9WceNCaqoCEGH70ajojuQzyPRJI8al6mFGr+cGCyoVX0k 3TBw== X-Gm-Message-State: APjAAAVB/j82cfQTemKR4hrzLFlO+JUocHjslMv/xCPGeFAzYEpwQCq/ oY+crMZp/BC9xJnRo2REn+I= X-Google-Smtp-Source: APXvYqxgWGBD0NsPXWgJtmgUpYkbJPfQov6z2QUrwYyNakgEJcyuhrIgXufSFdsr+gbVuvan+NoQAg== 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) 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: 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