Re: [RFC 7/8] Exclude unreclaimable pages from dirty ration calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux