[lkml]   [2002]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch-2.5.8-pre] swapinfo accounting
"Randy.Dunlap" wrote:
> It looks to me like mm/swapfile.c::si_swapinfo()
> shouldn't be adding nr_to_be_unused to total_swap_pages
> or nr_swap_pages for return in val->freeswap and
> val->totalswap.

whee, an si_swapinfo() maintainer.

Your function sucks :) I'm spending 15 CPU-seconds
in there during a kernel build. The problem appears
to be that a fix from 2.4 hasn't been propagated

2.4 has:

if (swap_info[i].flags != SWP_USED)

and 2.5 has:

if (!(swap_info[i].flags & SWP_USED))

and I think the 2.4 version will fix the accounting
problem you're seeing?

(I haven't checked whather it's the _right_ fix, but
it looks like it'll make it go away?)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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