From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753559AbcFFWSL (ORCPT ); Mon, 6 Jun 2016 18:18:11 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:58222 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752457AbcFFWSJ (ORCPT ); Mon, 6 Jun 2016 18:18:09 -0400 Date: Mon, 6 Jun 2016 18:15:50 -0400 From: Johannes Weiner To: Rik van Riel Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Mel Gorman , Andrea Arcangeli , Andi Kleen , Michal Hocko , Tim Chen , kernel-team@fb.com Subject: Re: [PATCH 05/10] mm: remove LRU balancing effect of temporary page isolation Message-ID: <20160606221550.GA6665@cmpxchg.org> References: <20160606194836.3624-1-hannes@cmpxchg.org> <20160606194836.3624-6-hannes@cmpxchg.org> <1465250169.16365.147.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1465250169.16365.147.camel@redhat.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 06, 2016 at 05:56:09PM -0400, Rik van Riel wrote: > On Mon, 2016-06-06 at 15:48 -0400, Johannes Weiner wrote: > >  > > +void lru_cache_putback(struct page *page) > > +{ > > + struct pagevec *pvec = &get_cpu_var(lru_putback_pvec); > > + > > + get_page(page); > > + if (!pagevec_space(pvec)) > > + __pagevec_lru_add(pvec, false); > > + pagevec_add(pvec, page); > > + put_cpu_var(lru_putback_pvec); > > +} > > > > Wait a moment. > > So now we have a putback_lru_page, which does adjust > the statistics, and an lru_cache_putback which does > not? > > This function could use a name that is not as similar > to its counterpart :) lru_cache_add() and lru_cache_putback() are the two sibling functions, where the first influences the LRU balance and the second one doesn't. The last hunk in the patch (obscured by showing the label instead of the function name as context) updates putback_lru_page() from using lru_cache_add() to using lru_cache_putback(). Does that make sense?