Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-01-2008, 07:57 AM
|
#1
|
LQ Newbie
Registered: Dec 2008
Posts: 3
Rep:
|
kswapd 100% CPU
Hi All,
Description:
I countered a weird problem with kswapd:
it runs in some infinite loop trying to swap until order 10 of zone highmem is OK, While zone higmem (as I understand) has nothing to do with continuous memory (cause there is no 1-1 mapping) which means kswapd will continue to try to balance order 10 of zone highmem forever (or until someone release a very large chunk of highmem).
Can anyone please explain me the algorithm of kswapd and why it trys to balance order 10 of zone higmem ?
Details:
I build an instrumented kernel with debug messages in "zone_watermark_ok" function, and from the code and debug messages I see that "zone_watermark_ok" returns 0 when kswapd invokes it (through balance_pgdat) in order to decide if zone highmem is balanced or not, which lead in some configurations to infinite loop of kswapd ( if no large chunks of highmem released) . I added a condition to "balance_pgdat" so it doesn't try to balance order higher than 1 in zone highmem and this conditon solved the problem, what are the risks with such solution? isn't it a bug that kswapd is looking for continuous memory in zone highmem ( as I understand there is no 1-1 mapping in zone highmem which is meaningless in kswapd)?
|
|
|
12-02-2008, 05:50 PM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,417
|
I'm wondering, does only one specific or more kernel versions exhibit this behaviour? Did you ever go on the LKML with this?
|
|
|
12-03-2008, 12:51 AM
|
#3
|
LQ Newbie
Registered: Dec 2008
Posts: 3
Original Poster
Rep:
|
KSWAPD algorithm
First thank you for your reply 
I encountered it on kernel 2.6.18, I don't know how to reach the people in LKML cause as I see it it might be a bug in the KSWAPD algorithm.
|
|
|
12-03-2008, 04:12 PM
|
#4
|
Moderator
Registered: May 2001
Posts: 29,417
|
Quote:
Originally Posted by wassim_dagash
I encountered it on kernel 2.6.18
|
Better try a recent one first then?
Quote:
Originally Posted by wassim_dagash
I don't know how to reach the people in LKML
|
The LKML is at lkml.org. Maybe read http://www.kernel.org/pub/linux/docs/lkml/ before posting.
|
|
|
11-09-2010, 10:31 AM
|
#5
|
LQ Newbie
Registered: Nov 2010
Posts: 3
Rep:
|
Is this problem fixed in later versions of Linux
Quote:
Originally Posted by wassim_dagash
I build an instrumented kernel with debug messages in "zone_watermark_ok" function, and from the code and debug messages I see that "zone_watermark_ok" returns 0 when kswapd invokes it (through balance_pgdat) in order to decide if zone highmem is balanced or not, which lead in some configurations to infinite loop of kswapd ( if no large chunks of highmem released) . I added a condition to "balance_pgdat" so it doesn't try to balance order higher than 1 in zone highmem and this conditon solved the problem, what are the risks with such solution? isn't it a bug that kswapd is looking for continuous memory in zone highmem ( as I understand there is no 1-1 mapping in zone highmem which is meaningless in kswapd)?
|
I know this is years later, but I'm having what seems like a similar problem with Linux kernel version 2.6.18 although I don't have the capability to instrument the kernel to be sure.
There is a patch available titled "prevent kswapd from freeing excessive amounts of lowmem", which I think is in the 2.6.24 kernel.
wassim_dagash, did a later version of Linux fix your problem?
Ben Slade
|
|
|
11-10-2010, 01:27 AM
|
#6
|
LQ Newbie
Registered: Dec 2008
Posts: 3
Original Poster
Rep:
|
Hey,
Version 2.6.18 does NOT include any patches regarding this issue, if I recall correctly it would be added on 2.6.32 or later.
|
|
|
All times are GMT -5. The time now is 01:39 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|