RE: [PATCH v2 2/2] Memory notification pseudo-device module
From: leonid.moiseichuk
Date: Tue Jan 17 2012 - 09:29:36 EST
> -----Original Message-----
> From: penberg@xxxxxxxxx [mailto:penberg@xxxxxxxxx] On Behalf Of ext
> Pekka Enberg
> Sent: 17 January, 2012 15:59
...
> If you're serious about making this a generic thing, it must live in
> mm/mem_notify.c. No ifs or buts about it.
> I'm also not completely convinced we need to put memnotify policy in the
> kernel. Why can't we extend Minchan's patch to report the relevant
> numbers and let the userspace figure out when pressure is above some
> interesting threshold?
I do not insist to have it as a part mm, but if you have 1-2-3 items what should be done in this or Minchan's patch I can participate.
>From my point of view Minchan's patch is not ideal due to required:
1. depends on cgroups (at least as I see it from patch in shrink_mem_cgroup_zone()part)
2. reports only memory pressure based on relation in between free and file pages which is means by active file IO you may get lowmem
3. swapping should not produce lowmem, but active swapping - must, is it checked there?
+ if (nr[LRU_INACTIVE_ANON])
+ low_mem = true;
4. required changes in vmscan
I think, due to everyone based on his experience/working area profile has own understanding what is "low memory" (or similar situation which needs to be tracked)
it should be some generic or extendable API, not like ON/OFF trigger for something happened inside VM. From another point of view it should not be too generic due
to tasks could be solved using memcg, ionice, OOM killer or variations of soft-OOM-patches.
--
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/