Re: [PATCH] memcg: drain all stocks for the cgroup before read usage

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

 



On Sun,  4 Sep 2011 04:15:33 +0300
"Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx> wrote:

> From: "Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx>
> 
> Currently, mem_cgroup_usage() for non-root cgroup returns usage
> including stocks.
> 
> Let's drain all socks before read resource counter value. It makes
> memory{,.memcg}.usage_in_bytes and memory.stat consistent.
> 
> Signed-off-by: Kirill A. Shutemov <kirill@xxxxxxxxxxxxx>

Hmm. This seems costly to me. 

If a user chesk usage_in_bytes in a memcg once per 1sec, 
the kernel will call schedule_work on cpus once per 1sec.
So, IMHO, I don't like this.

But if some other guys want this, I'll ack.

BTW, how this affects memory.stat ?

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]