Re: [PATCH] memcg: fix up documentation on global LRU.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 6 Feb 2012 12:00:49 -0800
Ying Han <yinghan@xxxxxxxxxx> wrote:

> On Sun, Feb 5, 2012 at 5:46 PM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> > On Fri, 3 Feb 2012 12:15:59 -0800
> > Ying Han <yinghan@xxxxxxxxxx> wrote:
> >
> >> On Fri, Feb 3, 2012 at 8:11 AM, Michal Hocko <mhocko@xxxxxxx> wrote:
> >> > On Thu 02-02-12 17:37:13, Ying Han wrote:
> >> >> In v3.3-rc1, the global LRU has been removed with commit
> >> >> "mm: make per-memcg LRU lists exclusive". The patch fixes up the memcg docs.
> >> >>
> >> >> Signed-off-by: Ying Han <yinghan@xxxxxxxxxx>
> >> >
> >> > For the global LRU removal
> >> > Acked-by: Michal Hocko <mhocko@xxxxxxx>
> >> >
> >> > see the comment about the swap extension bellow.
> >> >
> >> > Thanks
> >> >
> >> >> ---
> >> >>  Documentation/cgroups/memory.txt |   25 ++++++++++++-------------
> >> >>  1 files changed, 12 insertions(+), 13 deletions(-)
> >> >>
> >> >> diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
> >> >> index 4c95c00..847a2a4 100644
> >> >> --- a/Documentation/cgroups/memory.txt
> >> >> +++ b/Documentation/cgroups/memory.txt
> >> > [...]
> >> >> @@ -209,19 +208,19 @@ In this case, setting memsw.limit_in_bytes=3G will prevent bad use of swap.
> >> >>  By using memsw limit, you can avoid system OOM which can be caused by swap
> >> >>  shortage.
> >> >>
> >> >> -* why 'memory+swap' rather than swap.
> >> >> -The global LRU(kswapd) can swap out arbitrary pages. Swap-out means
> >> >> -to move account from memory to swap...there is no change in usage of
> >> >> -memory+swap. In other words, when we want to limit the usage of swap without
> >> >> -affecting global LRU, memory+swap limit is better than just limiting swap from
> >> >> -OS point of view.
> >> >> -
> >> >>  * What happens when a cgroup hits memory.memsw.limit_in_bytes
> >> >>  When a cgroup hits memory.memsw.limit_in_bytes, it's useless to do swap-out
> >> >>  in this cgroup. Then, swap-out will not be done by cgroup routine and file
> >> >> -caches are dropped. But as mentioned above, global LRU can do swapout memory
> >> >> -from it for sanity of the system's memory management state. You can't forbid
> >> >> -it by cgroup.
> >> >> +caches are dropped.
> >> >> +
> >> >> +TODO:
> >> >> +* use 'memory+swap' rather than swap was due to existence of global LRU.
> >>
> >> I wasn't sure about the initial comment while making the patch. Since
> >> it mentions something about global LRU, which i figured we need to
> >> revisit it anyway.
> >>
> >
> > The "global LRU" here means 'the health of the whole memory management".
> > memory+swap guarantees memcg will never be obstacles for routines which
> > works for system memory management.
> >
> > soft-limit _is_ a hint for global lru. but memory+swap will never be.
> 
> 
> Thank you for the clarification. So the "global LRU" should be
> interpreted as global pressure, i guess? 

You're right.

> I can imagine some extra complexities on two limit (in memory & swap) vs one limit
> (memory+swap).
> 
> I will go ahead post the first patch and leave the swap change behind.
> Apparently I don't know the initial design much, and feel free to post
> the second half.
> 

Ok, I'll check.

Thanks,
-Kame 




--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]