Re: [PATCH] NOMMU: Separate out VMAs

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

 



David Howells wrote:

> +	/* we allocated a power-of-2 sized page set, so we need to trim off the
> +	 * excess */
> +	total = 1 << order;
> +	atomic_add(total, &mmap_pages_allocated);
> +
> +	point = len >> PAGE_SHIFT;
> +	while (point < total) {
> +		order = ilog2(total - point);
> +		_debug("shave %u/%lu", 1 << order, total - point);
> +		atomic_sub(1 << order, &mmap_pages_allocated);
> +		__free_pages(pages + point, order);
> +		point += 1 << order;
> +	}

Note that we've had a similar change in our kernel, and we've had to
revert it since the effect on fragmentation is just horrendous.  Without
this, we could run a complete gcc testsuite on the board; with it we'd
run out of high-order pages somewhere in the middle.

This probably wants to be dependent on something like MAP_TRIM_EXCESS.


Bernd
-- 
This footer brought to you by insane German lawmakers.
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif
-
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