From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753096Ab2AWLUe (ORCPT ); Mon, 23 Jan 2012 06:20:34 -0500 Received: from zene.cmpxchg.org ([85.214.230.12]:54960 "EHLO zene.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752473Ab2AWLUd (ORCPT ); Mon, 23 Jan 2012 06:20:33 -0500 Date: Mon, 23 Jan 2012 12:20:22 +0100 From: Johannes Weiner To: Hillf Danton Cc: linux-mm@kvack.org, Michal Hocko , KAMEZAWA Hiroyuki , Ying Han , Hugh Dickins , Andrew Morton , LKML Subject: Re: [PATCH] mm: vmscan: ensure reclaiming pages on the lru lists of zone Message-ID: <20120123112022.GB1707@cmpxchg.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 23, 2012 at 12:47:34AM +0800, Hillf Danton wrote: > Hi all > > For easy review, it is re-prepared based on 3.3-rc1. > > Thanks > Hillf > > ===cut please=== > From: Hillf Danton > Subject: [PATCH] mm: vmscan: ensure reclaiming pages on the lru lists of zone > > While iterating over memory cgroup hierarchy, pages are reclaimed from each > mem cgroup, and reclaim terminates after a full round-trip. It is possible > that no pages on the lru lists of given zone are reclaimed, as termination > is checked after the reclaiming function. > > Mem cgroup iteration is rearranged a bit to make sure that pages are reclaimed > from both mem cgroups and zone. It's not only possible, it's guaranteed: with the memory controller enabled, the global per-zone lru lists are empty. Pages used to be linked on the global per-zone AND the memcg per-zone lru lists. Nowadays, they only sit on the memcg per-zone lists, which is why global reclaim does a hierarchy walk. The global per-zone lists are just an artifact for when the memory controller is not available. The plan is to make root_mem_cgroup available at all times, even without the memory controller. So I'm afraid your patch only adds a round of scanning a known-to-be empty lruvec. NAK.