lkml.org 
[lkml]   [2004]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: is_head_of_free_region slowing down swsusp
From
Date
Hi Pavel.

On Fri, 2004-08-13 at 08:23, Pavel Machek wrote:
> is_head_of_free_region with count_and_copy_zone results results in
> pretty nasty O(number_of_free_regions^2) behaviour, and some users see
> cpu spending 40 seconds there :-(.
>
> Actually count_and_copy_zone would probably be happy with
> "is_free_page()".

Take a look at my implementation. I do a one-time pass through the slow
path, building a bitmap of free pages. is_head_of_free_region is then
simply a O(1) loop through the bitmap.

Nigel
--
Nigel Cunningham
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

Many today claim to be tolerant. But true tolerance can cope with others
being intolerant.

-
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 14:05    [W:0.067 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site