lkml.org 
[lkml]   [2004]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: NUMA: Patch for node based swapping
On Tue, 2004-10-12 08:02:40 -0700, Christoph Lameter <clameter@sgi.com>
wrote in message <Pine.LNX.4.58.0410120751010.11558@schroedinger.engr.sgi.com>:
> --- 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@lug-owl.de . +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));[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2011 Jasper Spaans