Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966Ab1FGHxc (ORCPT ); Tue, 7 Jun 2011 03:53:32 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:53580 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712Ab1FGHxa (ORCPT ); Tue, 7 Jun 2011 03:53:30 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Tue, 7 Jun 2011 16:46:16 +0900 From: KAMEZAWA Hiroyuki To: Greg Thelen Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, containers@lists.osdl.org, linux-fsdevel@vger.kernel.org, Andrea Righi , Balbir Singh , Daisuke Nishimura , Minchan Kim , Johannes Weiner , Ciju Rajan K , David Rientjes , Wu Fengguang , Vivek Goyal , Dave Chinner Subject: Re: [PATCH v8 09/12] memcg: create support routines for writeback Message-Id: <20110607164616.d31b0649.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <1307117538-14317-10-git-send-email-gthelen@google.com> References: <1307117538-14317-1-git-send-email-gthelen@google.com> <1307117538-14317-10-git-send-email-gthelen@google.com> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 3.1.0 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1428 Lines: 32 On Fri, 3 Jun 2011 09:12:15 -0700 Greg Thelen wrote: > Introduce memcg routines to assist in per-memcg writeback: > > - mem_cgroups_over_bground_dirty_thresh() determines if any cgroups need > writeback because they are over their dirty memory threshold. > > - should_writeback_mem_cgroup_inode() determines if an inode is > contributing pages to an over-limit memcg. A new writeback_control > field determines if shared inodes should be written back. > > - mem_cgroup_writeback_done() is used periodically during writeback to > update memcg writeback data. > > These routines make use of a new over_bground_dirty_thresh bitmap that > indicates which mem_cgroup are over their respective dirty background > threshold. As this bitmap is indexed by css_id, the largest possible > css_id value is needed to create the bitmap. So move the definition of > CSS_ID_MAX from cgroup.c to cgroup.h. This allows users of css_id() to > know the largest possible css_id value. This knowledge can be used to > build such per-cgroup bitmaps. > > Signed-off-by: Greg Thelen Acked-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/