lkml.org 
[lkml]   [2003]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Autoregulate vm swappiness 2.6.0-test8

> + * Autoregulate vm_swappiness to be application pages % -ck.
> + */
> + si_meminfo(&i);
> + si_swapinfo(&i);
> + pg_size = get_page_cache_size() - i.bufferram ;
> + vm_swappiness = 100 - (((i.freeram + i.bufferram +
> + (pg_size - swapper_space.nrpages)) * 100) /
> + (i.totalram ? i.totalram : 1));
> +
> + /*

It seems that you don't need si_swapinfo here, do you? i.freeram,
i.bufferram, and i.totalram all come from meminfo, as far as I can
see? Maybe I'm missing a bit ...

M.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.074 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site