From: Tejun Heo Subject: Re: [PATCH 23/24] cfq-iosched: collect stats from dead cfqgs Date: Wed, 2 Jan 2013 11:30:10 -0500 Message-ID: <20130102163010.GC11220@mtj.dyndns.org> References: <1356726946-26037-1-git-send-email-tj@kernel.org> <1356726946-26037-24-git-send-email-tj@kernel.org> <20130102162415.GA4306@redhat.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=72tsIg0WbMWk8BHj26IKIWxh92Kg06CPn3gV3HY638M=; b=iA8OnotuhqLnRjGM6FIQRt0Xd4lOMvgfomi/dxwqe4sRgBu8Nh94A8Eon4at7qd4h4 Pr/YcgOjmPXh9AaOrYb/8bBgWOUZWe3LRHesHS06crVJEvM6D/MmZaYbhwfeUf/Amu+f ts2Itoi+hLsg0CkRFU+zgAPEBGEJeBR1vLNip5FQeTfoT8PE9tFJ1UksYOSWg15xBueg yBWeVjHNOWDq/89Qn71fYtZXZgNRG5z1UZRddfM7AWem3Xap4lchr/Oo/g3Vi+6PucqQ bRkYU9fcO1FlOlmiircIkbg8DTgr8sTPyjYdv8OYHNNZO0iIgRF7X9G6ZAcBRjd87KE3 EM9w== Content-Disposition: inline In-Reply-To: <20130102162415.GA4306-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Vivek Goyal Cc: lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org, axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, rni-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org Hey, Vivek. On Wed, Jan 02, 2013 at 11:24:15AM -0500, Vivek Goyal wrote: > On Fri, Dec 28, 2012 at 12:35:45PM -0800, Tejun Heo wrote: > > To support hierarchical stats, it's necessary to remember stats from > > dead children. Add cfqg->dead_stats and make a dying cfqg transfer > > its stats to the parent's dead-stats. > > Hi Tejun, > > Why not directly transfer stats to cfqg->stats. IOW, what's the advantage > of maintaining dead_stats separately. Backward compatibility? The existing stat cgroupfs files expect to see non-recursive stats. > > + cfqg_stats_merge(&parent->dead_stats, &cfqg->stats); > > + cfqg_stats_merge(&parent->dead_stats, &cfqg->dead_stats); > > + cfqg_stats_reset(&cfqg->stats); > > + cfqg_stats_reset(&cfqg->dead_stats); > > Anyway group will be marked offline and later freed. So resetting stats > might not be required. Yeah, it isn't strictly necessary. I tried to transfer the residual IOs between offline and release first so the resetting. Kinda like them there tho. > In fact if we have a realiable way of resetting status then online/offline > infrastructure might not be required? I think per cpu stats will be a > problem though and that's why we probably require logic to online/offline > the group? Hmmm? What do you mean? Thanks. -- tejun