linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] teach kswapd about higher order allocations
@ 2004-10-27  8:00 Nick Piggin
  2004-10-27  8:00 ` [PATCH 1/3] keep count of free areas Nick Piggin
  0 siblings, 1 reply; 17+ messages in thread
From: Nick Piggin @ 2004-10-27  8:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Memory Management, Linus Torvalds

Hi Andrew,

Can this get into mm please?

I haven't been able to do a huge amount of testing, because
there aren't many higher order allocations these days.

However:
I have got into situations where memory becomes completely
fragmented and the Gbe network card starts spewing a lot of
allocations failures. In some cases (eg. ifup) it will just
sit there indefinitely cranking out order:2 allocation
failures. These patches definitely fix those situations by
having kswapd free some higher order areas.

Higher order area watermarks are enforced lazily - that is,
if nobody is doing order 1 allocations, no attempt is ever
made to free order 1 areas, even if none are available. Also,
if kswapd can't free up the right amount of higher order areas,
it eventually gives up on them until being kicked again.

In this way, I don't think this patch has any overscanning
failure cases.

Note:
It generally doesn't take much work to free up memory to get
networking going because the skb allocations are transient,
so you only need some set number of higher order areas free,
and the network buffers just keep reusing them. Other allocations
don't tend to touch them much because the buddy allocator takes
low order pages first.

Linus was the only one with any real objections, but once I
explained myself better he thought this was fairly reasonable
(I think).


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

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

end of thread, other threads:[~2004-11-11 10:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-27  8:00 [PATCH 0/3] teach kswapd about higher order allocations Nick Piggin
2004-10-27  8:00 ` [PATCH 1/3] keep count of free areas Nick Piggin
2004-10-27  8:02   ` [PATCH 2/3] higher order watermarks Nick Piggin
2004-10-27  8:02     ` [PATCH 3/3] teach kswapd about higher order areas Nick Piggin
2004-10-27  8:13       ` Nick Piggin
2004-11-04  8:57     ` [PATCH 2/3] higher order watermarks Marcelo Tosatti
2004-11-04 12:20       ` Nick Piggin
2004-11-04  9:55         ` Marcelo Tosatti
2004-11-05  1:06           ` Nick Piggin
2004-11-04 22:47             ` Marcelo Tosatti
2004-11-05  2:08               ` Andrew Morton
2004-11-05  2:14               ` Nick Piggin
2004-11-04 10:02         ` Marcelo Tosatti
2004-11-05  1:12           ` Nick Piggin
2004-11-10 16:23       ` Marcelo Tosatti
2004-11-11  1:41         ` Nick Piggin
2004-11-11 10:18           ` Marcelo Tosatti

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