From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Thelen Subject: Re: [RFC][PATCH v7 08/14] writeback: add memcg fields to writeback_control Date: Sun, 15 May 2011 12:53:08 -0700 Message-ID: References: <1305276473-14780-1-git-send-email-gthelen@google.com> <1305276473-14780-9-git-send-email-gthelen@google.com> <20110513184120.0f9444bc.kamezawa.hiroyu@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE 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 To: KAMEZAWA Hiroyuki Return-path: Received: from smtp-out.google.com ([216.239.44.51]:11152 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378Ab1EOTxf convert rfc822-to-8bit (ORCPT ); Sun, 15 May 2011 15:53:35 -0400 Received: from kpbe20.cbf.corp.google.com (kpbe20.cbf.corp.google.com [172.25.105.84]) by smtp-out.google.com with ESMTP id p4FJrUhu005401 for ; Sun, 15 May 2011 12:53:30 -0700 Received: from qwb8 (qwb8.prod.google.com [10.241.193.72]) by kpbe20.cbf.corp.google.com with ESMTP id p4FJrSEo020303 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 15 May 2011 12:53:29 -0700 Received: by qwb8 with SMTP id 8so2804803qwb.11 for ; Sun, 15 May 2011 12:53:28 -0700 (PDT) In-Reply-To: <20110513184120.0f9444bc.kamezawa.hiroyu@jp.fujitsu.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, May 13, 2011 at 2:41 AM, KAMEZAWA Hiroyuki wrote: > On Fri, 13 May 2011 01:47:47 -0700 > Greg Thelen wrote: > >> Add writeback_control fields to differentiate between bdi-wide and >> per-cgroup writeback. =A0Cgroup writeback is also able to differenti= ate >> between writing inodes isolated to a particular cgroup and inodes sh= ared >> by multiple cgroups. >> >> Signed-off-by: Greg Thelen > > Personally, I want to see new flags with their usage in a patch... Ok. Next version will merge the flag definition with first usage of th= e flag. >> --- >> =A0include/linux/writeback.h | =A0 =A02 ++ >> =A01 files changed, 2 insertions(+), 0 deletions(-) >> >> diff --git a/include/linux/writeback.h b/include/linux/writeback.h >> index d10d133..4f5c0d2 100644 >> --- a/include/linux/writeback.h >> +++ b/include/linux/writeback.h >> @@ -47,6 +47,8 @@ struct writeback_control { >> =A0 =A0 =A0 unsigned for_reclaim:1; =A0 =A0 =A0 =A0 /* Invoked from = the page allocator */ >> =A0 =A0 =A0 unsigned range_cyclic:1; =A0 =A0 =A0 =A0/* range_start i= s cyclic */ >> =A0 =A0 =A0 unsigned more_io:1; =A0 =A0 =A0 =A0 =A0 =A0 /* more io t= o be dispatched */ >> + =A0 =A0 unsigned for_cgroup:1; =A0 =A0 =A0 =A0 =A0/* enable cgroup= writeback */ >> + =A0 =A0 unsigned shared_inodes:1; =A0 =A0 =A0 /* write inodes span= ning cgroups */ >> =A0}; > > > If shared_inode is really rare case...we don't need to have this shar= ed_inodes > flag and do writeback shared_inode always.....No ? > > Thanks, > -Kame The shared_inodes field is present to avoid punishing cgroups that are not sharing, if they are run on a system that also includes sharing. This issue is being debated in another thread: "[RFC][PATCH v7 00/14] memcg: per cgroup dirty page accounting". Depending on the decision, we may be able to delete the shared_inode fields if we choose to always write shared inodes in both cgroup foreground and cgroup background writeback. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html