RE: [PATCH -v2 -mm] add extra free kbytes tunable

From: David Rientjes
Date: Tue Oct 11 2011 - 19:22:55 EST


On Tue, 11 Oct 2011, Satoru Moriya wrote:

> Actually page allocator decreases min watermark to 3/4 * min watermark
> for rt-task. But in our case some applications create a lot of
> processes and if all of them are rt-task, the amount of watermark
> bonus(1/4 * min watermark) is not enough.
>

Right, if you can exhaust (1/4 * min_wmark) of memory quickly enough,
you'll still have latency issues.

> If we can tune the amount of bonus, it may be fine. But that is
> almost all same as extra free kbytes.
>

I don't know if your test case is the only thing that Rik is looking at,
but if so, then that statement makes me believe that this patch is
definitely in the wrong direction, so NACK on it until additional
information is presented. The reasoning is simple: if tuning the bonus
given to rt-tasks in the page allocator itself would fix the issue, then
we can certainly add logic specifically for rt-tasks that can reclaim more
aggressively without needing any tunable from userspace (and _certainly_
not a global tunable that affects every application!).

> > Does there exist anything like a test case which demonstrates the need
> > for this feature?
>
> Unfortunately I don't have a real test case but just simple one.
> And in my simple test case, I can avoid direct reclaim if we set
> workload as rt-task.
>
> The simple test case I used is following:
> http://marc.info/?l=linux-mm&m=131605773321672&w=2
>

I tried proposing one of Con's patches from his BFS scheduler ("mm: adjust
kswapd nice level for high priority page") about 1 1/2 years ago that I
recall and believe may significantly help your test case. The thread is
at http://marc.info/?t=126743860700002. (There's a lot of interesting
things in Con's patchset that can be pulled into the VM, this isn't the
only one.)

The patch wasn't merged back then because we wanted a test case that was
specifically fixed by this issue, and it may be that we have just found
one. If you could try it out without any extra_free_kbytes, I think we
may be able to help your situation.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/