Re: NUMA: Patch for node based swapping

From: Jan-Benedict Glaw
Date: Tue Oct 12 2004 - 10:25:24 EST


On Tue, 2004-10-12 08:02:40 -0700, Christoph Lameter <clameter@xxxxxxx>
wrote in message <Pine.LNX.4.58.0410120751010.11558@xxxxxxxxxxxxxxxxxxxxxxxxx>:
> --- linux-2.6.9-rc4.orig/mm/page_alloc.c 2004-10-10 19:57:03.000000000 -0700
> +++ linux-2.6.9-rc4/mm/page_alloc.c 2004-10-11 12:54:51.000000000 -0700
> @@ -483,6 +486,13 @@
> p = &z->pageset[cpu];
> if (pg == orig) {
> z->pageset[cpu].numa_hit++;
> + /*
> + * If zone allocation leaves less than a (sysctl_node_swap * 10) %
> + * of the zone free then invoke kswapd.
> + * (to make it efficient we do (pages * sysctl_node_swap) / 1024))
> + */
> + if (z->free_pages < (z->present_pages * sysctl_node_swap) << 10)
> + wakeup_kswapd(z);
> } else {
> p->numa_miss++;
> zonelist->zones[0]->pageset[cpu].numa_foreign++;

Shouldn't the comment read "less than (sysctl_node_swap / 10) %",
because the value in sysctl_node_swap is actually percent*10, so you
need the reverse action here?!

MfG, JBG

--
Jan-Benedict Glaw jbglaw@xxxxxxxxxx . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

Attachment: signature.asc
Description: Digital signature