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 65418C432C3 for ; Fri, 15 Nov 2019 17:48:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1E9C720733 for ; Fri, 15 Nov 2019 17:48:49 +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="YRwOG6Fn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E9C720733 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 C61116B0005; Fri, 15 Nov 2019 12:48:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C121F6B0006; Fri, 15 Nov 2019 12:48:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4F1C6B0007; Fri, 15 Nov 2019 12:48:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id AE5336B0005 for ; Fri, 15 Nov 2019 12:48:48 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 722DC181AEF1E for ; Fri, 15 Nov 2019 17:48:48 +0000 (UTC) X-FDA: 76159247136.02.frogs63_12a44b5a48904 X-HE-Tag: frogs63_12a44b5a48904 X-Filterd-Recvd-Size: 4438 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 Nov 2019 17:48:47 +0000 (UTC) Received: by mail-qv1-f43.google.com with SMTP id n4so976540qvq.9 for ; Fri, 15 Nov 2019 09:48:47 -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=Tggz0Sup0tJF7r/miqRqPkt8QctjM6InW2y0Q0myCrA=; b=YRwOG6FnZpiAU/ObEKfFoLeH/BCO4X7fGLIUL0/xug+uGlbhVwQmRJuMAs4JwqSmdZ BBBEcHVid4mj6iyuE2y9bFo3+ursRhOY8/ugAfoZFQOoTb8BU2o41wtkDGZRfiXZTPS/ 5rFKFXg/Hq4c9Vbva7CFLkNwlT4AP/YwWMy+6RKbbruhfMkZTxjjQU7lMB2MIzdEEqZC kFoApnlFJS+sKduvaKlGXvm/TzT3TC4W6Pyryv8bXo+kOCLHqkOz7mDgBfRofD4ICoaD /bx/hfTcEsEURtRGNZVn3tUY9m193AYhL5Jea7wkggKhwjlM3APZflaFfE9HJXCM6D0B m94A== 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=Tggz0Sup0tJF7r/miqRqPkt8QctjM6InW2y0Q0myCrA=; b=lOmt/uVoSXNZiguZL1TtzfudNAq565ZBRWS3hRm1D664CGqP/980NzWLWv9CV5wV2K PaTyo1QOwu4SwhdIfiZse/CxBK0Nx7AjJGJXCXFK4chETQPqEzmAwFujnAIDcTT90gBE zSP98NFd4rv8TD5N8htWVYxcf41870JAmo1/YJn6u6a3aq4kd7kOuTeg0h0hgIVD5bbn uiapiLWtvziIZrE9puu0HwP0pAdQ4E6GwHkWaQUlX1tqdioJRjlpCelxsN3TDSxCGt6T p1Flwp3WO5VBvinJKacvyg/Q+in1NalgQdX5GeEJTu86mNxYx/0jBVs93nW+GZMuLLe5 cDzA== X-Gm-Message-State: APjAAAUV6o0YrRl3Xn6vU8DS2aAo+WRgvslLCKypV8IcQBDoDuv2efTt 4N0zEmCGL1Dg3Ln/3zJb9Pw= X-Google-Smtp-Source: APXvYqydPSTYxYN82kZIJOLGlcFhkq+6JEEBk7LqqlPn79KmDLe7cS/rHfO/ZD0Ur8OF3MNkOiR1lA== X-Received: by 2002:ad4:458b:: with SMTP id x11mr7704350qvu.7.1573840127172; Fri, 15 Nov 2019 09:48:47 -0800 (PST) Received: from localhost ([2620:10d:c091:480::4ef1]) by smtp.gmail.com with ESMTPSA id 76sm4642961qke.111.2019.11.15.09.48.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Nov 2019 09:48:46 -0800 (PST) Date: Fri, 15 Nov 2019 09:48:44 -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: <20191115174844.GR4163745@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> <20191115174721.GB15216@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191115174721.GB15216@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:47:21PM +0100, Michal Hocko wrote: > s@online@offline@ > > And reading after myself it turned out to sound differently than I > meant. What I wanted to say really is, what is the difference that > css_tryget_online really guarantee when the css might go offline right > after the call suceeds so more specifically what is the difference > between > if (css_tryget()) { > if (online) > DO_SOMETHING > } > and > if (css_tryget_online()) { > DO_SOMETHING > } > > both of them are racy and do not provide any guarantee wrt. online > state. It's about not giving new reference when the object is known to be delted to the user. Can you please think more about how file deletions work? Thanks. -- tejun