Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3652671imm; Tue, 29 May 2018 10:56:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr/k19DlYhUKRLWlAtvmAE57NWmaz3AhrYUefcekgpTo53LtzEDldM5BL6911L1HcmK0bj6 X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr18249027plb.297.1527616616418; Tue, 29 May 2018 10:56:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527616616; cv=none; d=google.com; s=arc-20160816; b=jsJ+yGYIU+SKbVmT+1yM7O+iVSxx0JDZDN+6ExRLoKu2+TFc6f9xxLNb8HuMUX5jlT XCgZMMc+rjrEhIZuIrgAt3jMkZPJ4OkNA+RcWpwhQcJ8L0LrMUYQUAkJ9jFiwWcbX06D nBdgewwYsdhdcyi68qfk4QwTVCVVCMtjHAhKOUpy91U38fO23I4ngTCPNOcOPlqIUQNJ GhtpBoVDvgoTVRzbnAOJTdQzHxxPnmhaQER2fj/Z5aYbFZFMOLDCIgsJgmE1dn3DS2cJ 71dUTRwY1oYiftTS/jz8fKQyNdQZe+UA0onUyQgmCvOfHD6yXtbDClnVhCjDDhof9T4/ dU6Q== 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:arc-authentication-results; bh=fv3Epak2laIlk1APRn5SqP/VNsCZy4m948hk1blEpns=; b=vBHB+pF4NY4l6s6k1nz/lNfz7wmRs+7vEsAmCdC6yIv7U3cAtnazuTLRU3vt7xci+3 3VHNBspiX46xw8B3tCLKVy1wM+slZFdQnSDdJ/HPk9lsYrHZiMD3yut1euiZ6AmgqorR munvyUznwBPOzSR0omhl3BlYwieuzTrVF2gjUf28EDJf9w0bUT2UntlctT+Ao5WLwz7X xjve7KYxidVSyaSpIZqxesqOmRfKifayOyi7NBcalhmorGro96BxOcKrNUYxtvywRMcM ve58kzAJ4ezx7F+p9OY0iiJmOggcSPxs85ecnlXzIOvK2/8UAajFSEwXWvZNTaFH7EBU pmOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cmpxchg.org header.s=x header.b=PBGiAXPu; 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=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3-v6si3830242plb.271.2018.05.29.10.56.42; Tue, 29 May 2018 10:56:56 -0700 (PDT) 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=@cmpxchg.org header.s=x header.b=PBGiAXPu; 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=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965665AbeE2R4K (ORCPT + 99 others); Tue, 29 May 2018 13:56:10 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:52604 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965605AbeE2R4I (ORCPT ); Tue, 29 May 2018 13:56:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cmpxchg.org ; s=x; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=fv3Epak2laIlk1APRn5SqP/VNsCZy4m948hk1blEpns=; b=PBGiAXPurAwvQQ2yrwmcsWIE5p Dck3yPyNmP2Fv2gTEpelg3pq06CiLNniIB3Q6lmY1o4hPN1A+VwDdC9ecrZ3J6/twohw36PR4zpyi JUApajNmPukFI6f3fffgEO7HtZDW9qjfOlwqOWIV6bjVSaBDatkDuDv4nM8Wp9lb8glw=; Date: Tue, 29 May 2018 13:58:06 -0400 From: Johannes Weiner To: Vlastimil Babka Cc: linux-mm@kvack.org, Roman Gushchin , Michal Hocko , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Mel Gorman , Vijayanand Jitta Subject: Re: [RFC PATCH 0/5] kmalloc-reclaimable caches Message-ID: <20180529175806.GA28689@cmpxchg.org> References: <20180524110011.1940-1-vbabka@suse.cz> <20180524153225.GA7329@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 28, 2018 at 10:15:46AM +0200, Vlastimil Babka wrote: > On 05/24/2018 05:32 PM, Johannes Weiner wrote: > > On Thu, May 24, 2018 at 01:00:06PM +0200, Vlastimil Babka wrote: > >> - the vmstat/meminfo counter name is rather general and might suggest it also > >> includes reclaimable page caches, which it doesn't > >> > >> Suggestions welcome for all three points. For the last one, we might also keep > >> the counter separate from nr_slab_reclaimable, not superset. I did a superset > >> as IIRC somebody suggested that in the older threads or at LSF. > > > > Yeah, the "reclaimable" name is too generic. How about KReclaimable? > > > > The counter being a superset sounds good to me. We use this info for > > both load balancing and manual debugging. For load balancing code it's > > nice not having to worry about finding all the counters that hold > > reclaimable memory depending on kernel version; it's always simply > > user cache + user anon + kernel reclaimable. And for debugging, we can > > always add more specific subset counters later on if we need them. > > Hm, Christoph in his reply to patch 4/5 expressed a different opinion. > It's true that updating two counters has extra overhead, especially if > there are two separate critical sections: > > mod_lruvec_page_state(page, NR_SLAB_RECLAIMABLE, nr_pages); > mod_node_page_state(page_pgdat(page), NR_RECLAIMABLE, nr_pages); > > The first disables irq for CONFIG_MEMCG or defers to > mod_node_page_state() otherwise. > mod_node_page_state() is different depending on CONFIG_SMP and > CONFIG_HAVE_CMPXCHG_LOCAL. > > I don't see an easy way to make this optimal? Different counter would be > indeed simpler. /proc/vmstat would then print separate counters, but we > could have both separate and summary counter in /proc/meminfo. Would > that be enough? Yeah, that works just as well.