Re: [RFC][PATCH] mm: couple rcu and memory reclaim

From: Nick Piggin
Date: Sat Sep 29 2007 - 08:45:47 EST

On Monday 24 September 2007 18:45, Peter Zijlstra wrote:
> Just an idea I had, it seems like a good idea to wait for RCU callbacks
> in reclaim so that we won't get all of memory stuck there.

I think it would be much too aggressive (_especially_ with preemptible
RCU, I would have thought?). And not just for the case of adding a lot
of idle time while other CPUs are busy not being preempted -- also
that if you have lots of CPUs reclaiming and asking to synchronize_rcu,
then you could have global RCU state getting ping-ponged.

> If this location is too aggressive we might stick it next to
> disable_swap_token().

I don't see a really good reason to add this kind of wait here. I mean,
we have to wait for RCU anyway, so we may as well scan what we can
until then?

Putting it in a slowpath at some point when we think we're heading for
OOM I think would be a bit better.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at