On Friday 24 October 2003 00:42, Martin J. Bligh wrote: > > + * 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 ... Well I did do it a while ago and it seems I got carried away adding and subtracting info indeed. :-) Here's a simpler patch that does the same thing. Con