[Devel] Re: [PATCH RFC v2 3/4] memcg: rework usage of stats by soft limit

Kirill A. Shutemov kirill at shutemov.name
Mon Dec 14 23:48:09 PST 2009


On Tue, Dec 15, 2009 at 3:35 AM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu at jp.fujitsu.com> wrote:
> On Sat, 12 Dec 2009 21:46:08 +0200
> "Kirill A. Shutemov" <kirill at shutemov.name> wrote:
>
>> On Sat, Dec 12, 2009 at 4:34 PM, Daisuke Nishimura
>> <d-nishimura at mtf.biglobe.ne.jp> wrote:
>> > On Sat, 12 Dec 2009 15:06:52 +0200
>> > "Kirill A. Shutemov" <kirill at shutemov.name> wrote:
>> >
>> >> On Sat, Dec 12, 2009 at 5:50 AM, Daisuke Nishimura
>> >> <d-nishimura at mtf.biglobe.ne.jp> wrote:
>> >> > And IIUC, it's the same for your threshold feature, right ?
>> >> > I think it would be better:
>> >> >
>> >> > - discard this change.
>> >> > - in 4/4, rename mem_cgroup_soft_limit_check to mem_cgroup_event_check,
>> >> >  and instead of adding a new STAT counter, do like:
>> >> >
>> >> >        if (mem_cgroup_event_check(mem)) {
>> >> >                mem_cgroup_update_tree(mem, page);
>> >> >                mem_cgroup_threshold(mem);
>> >> >        }
>> >>
>> >> I think that mem_cgroup_update_tree() and mem_cgroup_threshold() should be
>> >> run with different frequency. How to share MEM_CGROUP_STAT_EVENTS
>> >> between soft limits and thresholds in this case?
>> >>
>> > hmm, both softlimit and your threshold count events at the same place(charge and uncharge).
>> > So, I think those events can be shared.
>> > Is there any reason they should run in different frequency ?
>>
>> SOFTLIMIT_EVENTS_THRESH is 1000. If use the same value for thresholds,
>> a threshold can
>> be exceed on 1000*nr_cpu_id pages. It's too many. I think, that 100 is
>> a reasonable value.
>>
>
> Hmm, then what amount of costs does this code add ?
>
> Do you have benchmark result ?

I've post some numbers how the patchset affects performance:
http://article.gmane.org/gmane.linux.kernel.mm/41880

Do you need any other results?
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list