Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4773366ybc; Fri, 15 Nov 2019 09:50:34 -0800 (PST) X-Google-Smtp-Source: APXvYqyFD7315/7nw/ViVy8c3uFpQO5GK2bQ6gwiQeKciwuOJJOArBnXOYMYtp+Vit7z3xQKk7Dy X-Received: by 2002:a17:907:426e:: with SMTP id nx22mr2411580ejb.139.1573840234160; Fri, 15 Nov 2019 09:50:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573840234; cv=none; d=google.com; s=arc-20160816; b=G82S43iDpQtVnxjSWYvWQPbOg4w9nT0Rzmie1VzXyh9jnSQFnYtXTAc1gOSLYiQB/Z iv7dy0a0ZKot2MvYAG9HAXisgbY3wYVrFSxYMScWvn2lcZONLjwSPQGEDOG1Uy7Uu8CW /uWoEWG2bu5UZT4jAh2qHQIP/FDZOZ7h9RHBA6C3giXlMV+hd0BPHhvxznxZNChWKcwo JwCTvizC6zs+IQ/+6zhSD+xflw5PtL3zxHt0asaRCOVqATs2quW4rKuvYTHG9+Tb2+WT B9bH6GqSG2Z0Pdt9IiuqMXouLCrTXleD2BYVUj2GD5ZI0UlMOhop5MdGQibtJBGzjyJw TECw== 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=Tggz0Sup0tJF7r/miqRqPkt8QctjM6InW2y0Q0myCrA=; b=R2lA2JKEAj7R2B1n2iaVUzkL19KsEhWypnYOX4RGZCpxk4fl4xW0GjZhOT+zAACc9G ZD9vsrqon902xxZBsXuQC05wh6O19j/IrIa3bNR3pGmAlCsM83raFHNltpTtdKMI8Ajs 6XBtsVo+XAQ6bJd4f0+0V2SrsfZ4GEZUZTZUyfwgptF6V24LtpQmkb73XfXRELOtKMoS 24xI7dz2+5Z+51DECwZGfBvWdrvXrSph2u6hoo2u7dHbqm9SDW/taIQfleuZ/LoaTOzg eDSNW74kkeYTLAs1N5JYiCQ3sQHDAmwQ3Wi2k+9jrR7QX/19PPqXirE3BsCGEuf1/Wuv ywaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YRwOG6Fn; 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 a25si6087541ejb.285.2019.11.15.09.50.08; Fri, 15 Nov 2019 09:50:34 -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=YRwOG6Fn; 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 S1726599AbfKORss (ORCPT + 99 others); Fri, 15 Nov 2019 12:48:48 -0500 Received: from mail-qv1-f53.google.com ([209.85.219.53]:44857 "EHLO mail-qv1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbfKORss (ORCPT ); Fri, 15 Nov 2019 12:48:48 -0500 Received: by mail-qv1-f53.google.com with SMTP id d3so4078334qvs.11; 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=WEgISatshGoj4JR6Xu4Y57uolSISy6nVdxuUapaC5pLUbbSh0UDMOqnrkAddHCzb3E DuZ8zJIem3v+hVn3K9OikqdHzuNHj5LBExaXMDZTsgCjslNDeCUvJORD8c+3J2naD195 EFzze6fnkoFrTf5FHEY/E1doeiyEdXIxa8FWmVq1SV/6zKCtrJUW+PxRdwLeFfYWFtqQ Zea2dnrOZlre/CwKuK98/DijUn6MiOhyF0bVOSlrtZ2iBhmZayInqxDBHZkl8YpubguX 1IEl5Q1yDV+B1fo9XViaoyzWy/6t+JVaP+qlg/AY1PswCtC24cSgpjTKIV0RI2bDbMxE Q6pA== X-Gm-Message-State: APjAAAXUCblhF6NU4X7SlSwLDpLTGkuoFllE50Sj3uebkgsR/VGZFyTY zCHTGhTtCm26oiWQXzUG2T8= 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) 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: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