lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110905085913.8f84278e.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Mon, 5 Sep 2011 08:59:13 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	"Kirill A. Shutemov" <kirill@...temov.name>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Balbir Singh <bsingharora@...il.com>,
	Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] memcg: drain all stocks for the cgroup before read
 usage

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

> From: "Kirill A. Shutemov" <kirill@...temov.name>
> 
> 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@...temov.name>

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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ