From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [RFD] Merge task counter into memcg Date: Wed, 11 Apr 2012 16:21:42 -0300 Message-ID: <4F85D9C6.5000202@parallels.com> References: <20120411185715.GA4317@somewhere.redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120411185715.GA4317-oHC15RC7JGTpAmv0O++HtFaTQe2KTcn/@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Frederic Weisbecker Cc: "Daniel P. Berrange" , Containers , Daniel Walsh , Hugh Dickins , LKML , Johannes Weiner , Tejun Heo , Cgroups , Andrew Morton On 04/11/2012 03:57 PM, Frederic Weisbecker wrote: > So if we choose the second solution, this overhead will be added unconditionally > to memcg. > But I don't expect every users of memcg will need the task counter. So perhaps > the overhead should be kept in its own separate subsystem. What we're usually doing with kmem paths, like the upcoming slab tracking, is do not account if it is not limited. So if you are not limited in a particular cgroup, you jut don't bother with accounting. If this suits your need, you can probably do the same, and then pay the price just for the users that are interested on it. Now, whether or not this should be considered memory, is a different story. You can say it is memory yes, but I bet you can very well find a bunch of arguments to consider it "cpu" as well. Against the memcg, consider this: Your counter would probably be the first non-page based data in memcg. At least raises a flag.