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

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

 



On Wed, Aug 1, 2012 at 1:45 AM, Michal Hocko <mhocko@xxxxxxx> wrote:
> 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?

That is true. Hmm, then two things i can do:

1. for kswapd case, make sure not counting the root cgroup
2. or check nr_scanned. I like the nr_scanned which is telling us
whether or not the reclaim ever make any attempt ?

--Ying

> --
> Michal Hocko
> SUSE Labs

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