Re: [PATCH 4/8][for -mm] mem_notify v6: memory_pressure_notify()caller

From: Andrew Morton
Date: Tue Feb 12 2008 - 17:59:38 EST


On Sun, 10 Feb 2008 00:24:28 +0900
"KOSAKI Motohiro" <kosaki.motohiro@xxxxxxxxxxxxxx> wrote:

> the notification point to happen whenever the VM moves an
> anonymous page to the inactive list - this is a pretty good indication
> that there are unused anonymous pages present which will be very likely
> swapped out soon.
>
> and, It is judged out of trouble at the fllowing situations.
> o memory pressure decrease and stop moves an anonymous page to the
> inactive list.
> o free pages increase than (pages_high+lowmem_reserve)*2.

This seems rather arbitrary. Why choose this stage in the page
reclaimation process rather than some other stage?

If this feature is useful then I'd expect that some applications would want
notification at different times, or at different levels of VM distress. So
this semi-randomly-chosen notification point just won't be strong enough in
real-world use.

Does this change work correctly and appropriately for processes which are
running in a cgroup memory controller?

Given the amount of code which these patches add, and the subsequent
maintenance burden, and the unlikelihood of getting many applications to
actually _use_ the interface, it is not obvious to me that inclusion in the
kernel is justifiable, sorry.


memory_pressure_notify() is far too large to be inlined.

Some of the patches were wordwrapped.


--
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/