Re: page_alloc strange mask += mask

Zlatko Calusic (Zlatko.Calusic@CARNet.hr)
06 Aug 1998 11:21:40 +0200


Andrea Arcangeli <arcangeli@mbox.queen.it> writes:

> Continuing my trail in the mm internals I didn' t understood this point
> (and a lot of other things of course ;-). Using mask += mask some low bits
> got lost by the mask. Was that intentional?
>

Speaking of MM, if I remember correctly you're the guy who had
complaints about cp bigfile /dev/null, and recent kernels memory
policies.

I tried to resolve some problems with this simple patch. Could you
please try it and tell us about results.

Patched with this, your kernel will still age named pages, but will do
that harder, so page cache pages will be reused faster and less pages
will get swapped out.

Comments welcome.

diff -urN --exclude-from=exclude linux-old/mm/filemap.c linux/mm/filemap.c
--- linux-old/mm/filemap.c Mon Aug 3 13:10:57 1998
+++ linux/mm/filemap.c Tue Aug 4 16:10:03 1998
@@ -171,6 +171,11 @@
touch_page(page);
break;
}
+ /* Age named pages aggresively, so page cache
+ * doesn't grow too fast. -zcalusic
+ */
+ age_page(page);
+ age_page(page);
age_page(page);
if (page->age)
break;

Later,

-- 
Posted by Zlatko Calusic           E-mail: <Zlatko.Calusic@CARNet.hr>
---------------------------------------------------------------------
	  One way to stop a run away horse is to bet on him.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html