From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932471AbXART5l (ORCPT ); Thu, 18 Jan 2007 14:57:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932480AbXART5l (ORCPT ); Thu, 18 Jan 2007 14:57:41 -0500 Received: from omx2-ext.sgi.com ([192.48.171.19]:52324 "EHLO omx2.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932471AbXART5j (ORCPT ); Thu, 18 Jan 2007 14:57:39 -0500 Date: Thu, 18 Jan 2007 11:56:45 -0800 (PST) From: Christoph Lameter To: Nikita Danilov cc: Paul Menage , linux-kernel@vger.kernel.org, Nick Piggin , linux-mm@kvack.org, Andi Kleen , Paul Jackson , Dave Chinner Subject: Re: [RFC 7/8] Exclude unreclaimable pages from dirty ration calculation In-Reply-To: <17839.38576.779132.455963@gargle.gargle.HOWL> Message-ID: References: <20070116054743.15358.77287.sendpatchset@schroedinger.engr.sgi.com> <20070116054819.15358.37282.sendpatchset@schroedinger.engr.sgi.com> <17839.38576.779132.455963@gargle.gargle.HOWL> 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 Thu, 18 Jan 2007, Nikita Danilov wrote: > I think that simpler solution of this problem is to use only potentially > reclaimable pages (that is, active, inactive, and free pages) to > calculate writeout threshold. This way there is no need to maintain > counters for unreclaimable pages. Below is a patch implementing this > idea, it got some testing. Hmmm... the problem is that it is expensive to calculate these numbers on larger systems. In order to calculate active and inactive pages we have to first go through all the zones of the system. In a NUMA system there could be many zones. > +/* Maximal number of pages that can be consumed by pageable caches. */ > +static unsigned long total_pageable_pages(void) > +{ > + unsigned long active; > + unsigned long inactive; > + unsigned long free; > + > + get_zone_counts(&active, &inactive, &free); > + /* +1 to never return 0. */ > + return active + inactive + free + 1; > +} An expensive function. And we need to call it whenever we calculate dirty limits. Maybe could create ZVC counters that allow an inexpensive determination of these numbers? Then we first need to make sure that the counters are not assumed to be accurate at all times. From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 18 Jan 2007 11:56:45 -0800 (PST) From: Christoph Lameter Subject: Re: [RFC 7/8] Exclude unreclaimable pages from dirty ration calculation In-Reply-To: <17839.38576.779132.455963@gargle.gargle.HOWL> Message-ID: References: <20070116054743.15358.77287.sendpatchset@schroedinger.engr.sgi.com> <20070116054819.15358.37282.sendpatchset@schroedinger.engr.sgi.com> <17839.38576.779132.455963@gargle.gargle.HOWL> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Nikita Danilov Cc: Paul Menage , linux-kernel@vger.kernel.org, Nick Piggin , linux-mm@kvack.org, Andi Kleen , Paul Jackson , Dave Chinner List-ID: On Thu, 18 Jan 2007, Nikita Danilov wrote: > I think that simpler solution of this problem is to use only potentially > reclaimable pages (that is, active, inactive, and free pages) to > calculate writeout threshold. This way there is no need to maintain > counters for unreclaimable pages. Below is a patch implementing this > idea, it got some testing. Hmmm... the problem is that it is expensive to calculate these numbers on larger systems. In order to calculate active and inactive pages we have to first go through all the zones of the system. In a NUMA system there could be many zones. > +/* Maximal number of pages that can be consumed by pageable caches. */ > +static unsigned long total_pageable_pages(void) > +{ > + unsigned long active; > + unsigned long inactive; > + unsigned long free; > + > + get_zone_counts(&active, &inactive, &free); > + /* +1 to never return 0. */ > + return active + inactive + free + 1; > +} An expensive function. And we need to call it whenever we calculate dirty limits. Maybe could create ZVC counters that allow an inexpensive determination of these numbers? Then we first need to make sure that the counters are not assumed to be accurate at all times. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org