Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754603AbbKXNxx (ORCPT ); Tue, 24 Nov 2015 08:53:53 -0500 Received: from relay.parallels.com ([195.214.232.42]:44886 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751946AbbKXNxv (ORCPT ); Tue, 24 Nov 2015 08:53:51 -0500 Date: Tue, 24 Nov 2015 16:53:35 +0300 From: Vladimir Davydov To: Michal Hocko CC: Andrew Morton , Johannes Weiner , Vlastimil Babka , Mel Gorman , , LKML , Michal Hocko Subject: Re: [PATCH 1/2] mm, vmscan: consider isolated pages in zone_reclaimable_pages Message-ID: <20151124135335.GI29014@esperanza> References: <1448366100-11023-1-git-send-email-mhocko@kernel.org> <1448366100-11023-2-git-send-email-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1448366100-11023-2-git-send-email-mhocko@kernel.org> X-ClientProxiedBy: US-EXCH2.sw.swsoft.com (10.255.249.46) To MSK-EXCH1.sw.swsoft.com (10.67.48.55) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1968 Lines: 54 On Tue, Nov 24, 2015 at 12:54:59PM +0100, Michal Hocko wrote: > From: Michal Hocko > > zone_reclaimable_pages counts how many pages are reclaimable in > the given zone. This currently includes all pages on file lrus and > anon lrus if there is an available swap storage. We do not consider > NR_ISOLATED_{ANON,FILE} counters though which is not correct because > these counters reflect temporarily isolated pages which are still > reclaimable because they either get back to their LRU or get freed > either by the page reclaim or page migration. > > The number of these pages might be sufficiently high to confuse users of > zone_reclaimable_pages (e.g. mbind can migrate large ranges of memory at > once). Sounds reasonable to me. Reviewed-by: Vladimir Davydov Thanks, Vladimir > > Suggested-by: Johannes Weiner > Signed-off-by: Michal Hocko > --- > mm/vmscan.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index a4507ecaefbf..946d348f5040 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -197,11 +197,13 @@ static unsigned long zone_reclaimable_pages(struct zone *zone) > unsigned long nr; > > nr = zone_page_state(zone, NR_ACTIVE_FILE) + > - zone_page_state(zone, NR_INACTIVE_FILE); > + zone_page_state(zone, NR_INACTIVE_FILE) + > + zone_page_state(zone, NR_ISOLATED_FILE); > > if (get_nr_swap_pages() > 0) > nr += zone_page_state(zone, NR_ACTIVE_ANON) + > - zone_page_state(zone, NR_INACTIVE_ANON); > + zone_page_state(zone, NR_INACTIVE_ANON) + > + zone_page_state(zone, NR_ISOLATED_ANON); > > return nr; > } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/