mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* KSWAPD Algorithm - 100% CPU
@ 2008-12-03  7:04 wassim dagash
  2008-12-03  7:20 ` KAMEZAWA Hiroyuki
  2008-12-03  9:20 ` KOSAKI Motohiro
  0 siblings, 2 replies; 5+ messages in thread
From: wassim dagash @ 2008-12-03  7:04 UTC (permalink / raw)
  To: linux-kernel

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 contiguous 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 tries
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)?

NOTE: I WANT TO BE CC'ed TO THE THREAD!

Regards,

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-12-05  2:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-03  7:04 KSWAPD Algorithm - 100% CPU wassim dagash
2008-12-03  7:20 ` KAMEZAWA Hiroyuki
2008-12-03  9:20 ` KOSAKI Motohiro
2008-12-04 14:02   ` Nick Piggin
2008-12-05  2:53     ` KOSAKI Motohiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®