2.6.22 - Suspend and Weird Load Averages
For the first time since 1997 I have a machine (Mac Mini) running a stock kernel which I am suspending/resuming for 2 days now without any problems. Amongst the various hardware and kernel versions that I've used so far this combination is the first to suspend/resume without issues!
But one thing that annoys me a bit is that the load averages spike up quite a bit after resume although it doesn't feel like the machine is loaded -
Before Resume -
parag@parag-desktop:~$ uptime 09:35:14 up 5:18, 2 users, load average: 0.08, 0.87, 1.00 After Resume - parag@parag-desktop:~$ uptime 09:36:37 up 5:18, 2 users, load average: 12.53, 3.83, 1.98 parag@parag-desktop:~$
Is this a known problem? Worth fixing?
Thanks
Parag
Quoted 11 lines · Parag Warudkar
For the first time since 1997 I have a machine (Mac Mini) running a stock kernel which I am suspending/resuming for 2 days now without any problems. Amongst the various hardware and kernel versions that I've used so far this combination is the first to suspend/resume without issues!
But one thing that annoys me a bit is that the load averages spike up quite a bit after resume although it doesn't feel like the machine is loaded -
Before Resume -
Quoted 8 lines
parag@parag-desktop:~$ uptime 09:35:14 up 5:18, 2 users, load average: 0.08, 0.87, 1.00 After Resume - parag@parag-desktop:~$ uptime 09:36:37 up 5:18, 2 users, load average: 12.53, 3.83, 1.98 parag@parag-desktop:~$Is this a known problem?
I think so.
This probably is due to the freezing of tasks. Namely, the frozen tasks are in TASK_UNINTERRUPTIBLE and add to the load average.
Quoted 1 line
Worth fixing?
Cartainly.
Greetings,
Rafael
Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth
Quoted 21 lines · Rafael J. Wysocki
Quoted 11 lines · Parag Warudkar
For the first time since 1997 I have a machine (Mac Mini) running a stock kernel which I am suspending/resuming for 2 days now without any problems. Amongst the various hardware and kernel versions that I've used so far this combination is the first to suspend/resume without issues!
But one thing that annoys me a bit is that the load averages spike up quite a bit after resume although it doesn't feel like the machine is loaded -
Before Resume -
Quoted 8 lines
parag@parag-desktop:~$ uptime 09:35:14 up 5:18, 2 users, load average: 0.08, 0.87, 1.00 After Resume - parag@parag-desktop:~$ uptime 09:36:37 up 5:18, 2 users, load average: 12.53, 3.83, 1.98 parag@parag-desktop:~$Is this a known problem?
Quoted 8 lines
I think so.
This probably is due to the freezing of tasks. Namely, the frozen tasks are in
TASK_UNINTERRUPTIBLEand add to the load average.Quoted 1 line
Worth fixing?
Cartainly.
s/Cartainly/Certainly/
Hi!
Quoted 21 lines
For the first time since 1997 I have a machine (Mac Mini) running a stock kernel which I am suspending/resuming for 2 days now without any problems. Amongst the various hardware and kernel versions that I've used so far this combination is the first to suspend/resume without issues!
But one thing that annoys me a bit is that the load averages spike up quite a bit after resume although it doesn't feel like the machine is loaded -
Before Resume -
parag@parag-desktop:~$ uptime 09:35:14 up 5:18, 2 users, load average: 0.08, 0.87, 1.00 After Resume - parag@parag-desktop:~$ uptime 09:36:37 up 5:18, 2 users, load average: 12.53, 3.83, 1.98 parag@parag-desktop:~$
Quoted 1 line
Is this a known problem? Worth fixing?
Known, and Rafael/Nigel have patches to fix that.
OTOH I'm not sure it is a problem -- lets just say that suspend is hard work and therefore it raises load avg?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi Pavel!
Quoted 1 line · Pavel Machek
Known, and Rafael/Nigel have patches to fix that.
Thanks for the info - Rafael/Nigel do you have any patches for me to try/modify - I am just curious to see what approach the patches take to fix this - I had started thinking about TASK_SUSPENDED which would be equivalent to TASK_UNINTERRUPTIBLE for all purposes except load calculation (not counted in nr_uninterruptible) but somehow I think there might be a less intrusive / more correct way to do this.
Quoted 4 lines
OTOH I'm not sure it is a problem -- lets just say that suspend is hard work and therefore it raises load avg?
Pavel
Hehe, nope - that would be inefficient suspend for me! Any way I understand it's purely a cosmetic problem but if we could be cosmetically correct to report the right uptime after suspend sans the sleep time (unlike other OSes which include sleep time when reporting it) I think we should also fix this one to report correct load averages.
Cheers
Parag
Quoted 8 lines · Parag Warudkar
Hi Pavel!
Quoted 1 line · Pavel Machek
Known, and Rafael/Nigel have patches to fix that.
Thanks for the info - Rafael/Nigel do you have any patches for me to try/modify -
Well, I don't.
Quoted 5 lines
I am just curious to see what approach the patches take
to fix this - I had started thinking aboutTASK_SUSPENDEDwhich would be equivalent toTASK_UNINTERRUPTIBLEfor all purposes except load calculation (not counted innr_uninterruptible) but somehow I think there might be a less intrusive / more correct way to do this.
We wanted to save the pre-suspend load averages and restore them during the resume.
Greetings,
Rafael
Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth
Quoted 11 lines · Rafael J. Wysocki
Quoted 8 lines · Parag Warudkar
Hi Pavel!
Quoted 1 line · Pavel Machek
Known, and Rafael/Nigel have patches to fix that.
Thanks for the info - Rafael/Nigel do you have any patches for me to try/modify -
Well, I don't.
Okay, someone did, sorry for confusion. It should be in linux-pm archives.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html