[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0701181152020.11639@schroedinger.engr.sgi.com>
Date: Thu, 18 Jan 2007 11:56:45 -0800 (PST)
From: Christoph Lameter <clameter@....com>
To: Nikita Danilov <nikita@...sterfs.com>
cc: Paul Menage <menage@...gle.com>, linux-kernel@...r.kernel.org,
Nick Piggin <nickpiggin@...oo.com.au>, linux-mm@...ck.org,
Andi Kleen <ak@...e.de>, Paul Jackson <pj@....com>,
Dave Chinner <dgc@....com>
Subject: Re: [RFC 7/8] Exclude unreclaimable pages from dirty ration calculation
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists