Thread (18 messages) 18 messages, 3 authors, 2012-08-06

Re: [PATCH V7 2/2] mm: memcg detect no memcgs above softlimit under zone reclaim

From: Michal Hocko <hidden>
Date: 2012-08-01 08:45:57

On Tue 31-07-12 13:59:35, Ying Han wrote:
[...]
Let's say the following example where the cgroup is sorted by css_id,
and none of the cgroup's usage is above softlimit (except root)

                                        root  a  b  c  d  e f ...max
thread_1 (priority = 12)         ^
                                         iter->position = 1        (
over_softlimit = true )

                                                ^
                                                 iter->position = 2

thread_2 (priority = 12)                     ^
                                                     iter->position = 3

                                                      ....
                                                                          ^

   iter->position = 0  ( over_softlimit = false )

In this case, thread 1 gets root but not thread 2 since they share the
walk under same zone (same node) and same reclaim priority.
That is true iterator is per zone per priority if the cookie is used but
that wasn't my point.
Take a much simpler case. Just the background reclaim without any direct
reclaim. Then there is nobody to race with and so we would always visit
the whole tree including the root and so if no group is above the soft
limit we would hammer the root cgroup until priority gets down when we
ignore the limit and reclaim from all. Makes sense?

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help