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-next>] [day] [month] [year] [list]
Message-Id: <20110721192525.56721c52.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Thu, 21 Jul 2011 19:25:25 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Michal Hocko <mhocko@...e.cz>
Cc:	linux-mm@...ck.org, Balbir Singh <bsingharora@...il.com>,
	Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] memcg: unify sync and async per-cpu charge cache
 draining

On Thu, 21 Jul 2011 09:50:00 +0200
Michal Hocko <mhocko@...e.cz> wrote:

> Currently we have two ways how to drain per-CPU caches for charges.
> drain_all_stock_sync will synchronously drain all caches while
> drain_all_stock_async will asynchronously drain only those that refer to
> a given memory cgroup or its subtree in hierarchy.
> Targeted async draining has been introduced by 26fe6168 (memcg: fix
> percpu cached charge draining frequency) to reduce the cpu workers
> number.
> 
> sync draining is currently triggered only from mem_cgroup_force_empty
> which is triggered only by userspace (mem_cgroup_force_empty_write) or
> when a cgroup is removed (mem_cgroup_pre_destroy). Although these are
> not usually frequent operations it still makes some sense to do targeted
> draining as well, especially if the box has many CPUs.
> 
> This patch unifies both methods to use the single code (drain_all_stock)
> which relies on the original async implementation and just adds
> flush_work to wait on all caches that are still under work for the sync
> mode.
> We are using FLUSHING_CACHED_CHARGE bit check to prevent from waiting on
> a work that we haven't triggered.
> Please note that both sync and async functions are currently protected
> by percpu_charge_mutex so we cannot race with other drainers.
> 
> Signed-off-by: Michal Hocko <mhocko@...e.cz>

hmm..maybe good.
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>


--
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