Skip to contentSkip to conversation

is_head_of_free_region slowing down swsusp

DISCUSSION Pavel Machek 3 participants 5 messages Aug 12, 2004 – Aug 13, 2004

lore
Share & tools
lore
#0 lore raw

Hi!

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()".

I asked Lukas (who is seeing this problem) to kill locking from is_head_of_free_region [we are running singlethreaded at this point, so it should be ok]. Do you have any other ideas?
Pavel

Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
#1 lore raw

Hi Pavel.

Quoted 6 lines · Pavel Machek

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

Signature · 6 lines
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.
#2 lore raw

Hi!

Quoted 10 lines
Quoted 6 lines

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.

I've seen that solution (thanks)... I'd like to do something simpler.

Pavel

Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
#3 lore raw

Hi.

Quoted 5 lines · Pavel Machek
Quoted 3 lines

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.

I've seen that solution (thanks)... I'd like to do something simpler.

Umm. Okay. I didn't think it was complicated.

Nigel

Signature · 6 lines
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.
#4 lore raw
In reply to Pavel Machek

Hi!

Quoted 10 lines

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()".

I asked Lukas (who is seeing this problem) to kill locking from is_head_of_free_region [we are running singlethreaded at this point, so it should be ok]. Do you have any other ideas?

Thanks to Lukas Horalek for some timing info....

I now reproduced in on my machine. updatedb is enough to trigger 40seconds of copying. Killing locking does not help :-(.

Pavel

Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!