Re: [PATCH v2 2/2] vmscan: take at least one pass with shrinkers

From
Glauber Costa <hidden>
Date
2012-12-22 23:56:56
Also in
linux-fsdevel, linux-mm
Reply to
Dave Chinner, 2012-12-22
On 12/23/2012 03:53 AM, Dave Chinner wrote:
On Fri, Dec 21, 2012 at 02:46:50PM +0400, Glauber Costa wrote:
quoted
In very low free kernel memory situations, it may be the case that we
have less objects to free than our initial batch size. If this is the
case, it is better to shrink those, and open space for the new workload
then to keep them and fail the new allocations.

More specifically, this happens because we encode this in a loop with
the condition: "while (total_scan >= batch_size)". So if we are in such
a case, we'll not even enter the loop.

This patch modifies turns it into a do () while {} loop, that will
guarantee that we scan it at least once, while keeping the behaviour
exactly the same for the cases in which total_scan > batch_size.

Signed-off-by: Glauber Costa <redacted>
Acked-by: Dave Chinner <david@fromorbit.com>
I think you'll find I said:

Reviewed-by: Dave Chinner <redacted>

That has a significantly different meaning to Acked-by, so you
should be careful to correctly transcribe tags back to the
patches...
Ooops

You are right Dave. That was obviously just lack of attention on my
side, not any attempt to upgrade your tag.

Thanks for spotting

Thread (8 messages) 8 messages, 4 authors, last reply 2013-01-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help