From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932220AbWGRODX (ORCPT ); Tue, 18 Jul 2006 10:03:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932221AbWGRODX (ORCPT ); Tue, 18 Jul 2006 10:03:23 -0400 Received: from omx2-ext.sgi.com ([192.48.171.19]:34263 "EHLO omx2.sgi.com") by vger.kernel.org with ESMTP id S932220AbWGRODW (ORCPT ); Tue, 18 Jul 2006 10:03:22 -0400 Date: Tue, 18 Jul 2006 07:03:12 -0700 (PDT) From: Christoph Lameter To: "Martin J. Bligh" cc: Peter Zijlstra , linux-mm , Linus Torvalds , Andrew Morton , linux-kernel Subject: Re: [PATCH] mm: inactive-clean list In-Reply-To: <44BCE86A.4030602@mbligh.org> Message-ID: References: <1153167857.31891.78.camel@lappy> <1153224998.2041.15.camel@lappy> <44BCE86A.4030602@mbligh.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Jul 2006, Martin J. Bligh wrote: > > Adding logic to determine the number of clean pages is not necessary. The > > number of clean pages in the pagecache can be determined by: > > > > global_page_state(NR_FILE_PAGES) - global_page_state(NR_FILE_DIRTY) > > It's not that simple. We also need to deal with other types of non-freeable > pages, such as memlocked. mlocked is an exceptional case. The problem is that the information if a page is mlocked is only available via the vma. One has to scan the reverse list and check all the vmas for the flag. Is mlock that important? What other types of non freeable pages could exist? Maybe slab allocations and direct kernel allocations? We have only limited means to reclaim those pages.