From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932848AbcFGOLd (ORCPT ); Tue, 7 Jun 2016 10:11:33 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:58352 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932270AbcFGOLa (ORCPT ); Tue, 7 Jun 2016 10:11:30 -0400 Date: Tue, 7 Jun 2016 10:11:24 -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 06/10] mm: remove unnecessary use-once cache bias from LRU balancing Message-ID: <20160607141124.GC9978@cmpxchg.org> References: <20160606194836.3624-1-hannes@cmpxchg.org> <20160606194836.3624-7-hannes@cmpxchg.org> <1465266031.16365.153.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465266031.16365.153.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 10:20:31PM -0400, Rik van Riel wrote: > On Mon, 2016-06-06 at 15:48 -0400, Johannes Weiner wrote: > > When the splitlru patches divided page cache and swap-backed pages > > into separate LRU lists, the pressure balance between the lists was > > biased to account for the fact that streaming IO can cause memory > > pressure with a flood of pages that are used only once. New page > > cache > > additions would tip the balance toward the file LRU, and repeat > > access > > would neutralize that bias again. This ensured that page reclaim > > would > > always go for used-once cache first. > > > > Since e9868505987a ("mm,vmscan: only evict file pages when we have > > plenty"), page reclaim generally skips over swap-backed memory > > entirely as long as there is used-once cache present, and will apply > > the LRU balancing when only repeatedly accessed cache pages are left > > - > > at which point the previous use-once bias will have been neutralized. > > > > This makes the use-once cache balancing bias unnecessary. Remove it. > > > > The code in get_scan_count() still seems to use the statistics > of which you just removed the updating. > > What am I overlooking? As I mentioned in 5/10, page reclaim still does updates for each scanned page and rotated page at this point in the series. This merely removes the pre-reclaim bias for cache.