From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivek Goyal Subject: Re: [RFC] writeback and cgroup Date: Wed, 11 Apr 2012 11:45:31 -0400 Message-ID: <20120411154531.GE16692__16975.1494694085$1334159165$gmane$org@redhat.com> References: <20120403183655.GA23106@dhcp-172-17-108-109.mtv.corp.google.com> <20120404145134.GC12676@redhat.com> <20120407080027.GA2584@quack.suse.cz> <20120410180653.GJ21801@redhat.com> <20120410210505.GE4936@quack.suse.cz> <20120410212041.GP21801@redhat.com> <20120410222425.GF4936@quack.suse.cz> <20120411154005.GD16692@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20120411154005.GD16692-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 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 To: Jan Kara Cc: Jens Axboe , ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, rni-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, andrea-oIIqvOZpAevzfdHfmsDf5w@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, sjayaraman-IBi9RG/b67k@public.gmane.org, lsf-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tejun Heo , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Fengguang Wu List-Id: containers.vger.kernel.org On Wed, Apr 11, 2012 at 11:40:05AM -0400, Vivek Goyal wrote: > On Wed, Apr 11, 2012 at 12:24:25AM +0200, Jan Kara wrote: > > [..] > > > I have implemented and posted patches for per bdi per cgroup congestion > > > flag. The only problem I see with that is that a group might be congested > > > for a long time because of lots of other IO happening (say direct IO) and > > > if you keep on backing off and never submit the metadata IO (transaction), > > > you get starved. And if you go ahead and submit IO in a congested group, > > > we are back to serialization issue. > > Clearly, we mustn't throttle metadata IO once it gets to the block layer. > > That's why we discuss throttling of processes at transaction start after > > all. But I agree starvation is an issue - I originally thought blk-throttle > > throttles synchronously which wouldn't have starvation issues. Current bio throttling is asynchrounous. Process can submit the bio and go back and wait for bio to finish. That bio will be queued at device queue in a per cgroup queue and will be dispatched to device according to configured IO rate for cgroup. The additional feature for buffered throttle (which never went upstream), was synchronous in nature. That is we were actively putting writer to sleep on a per cgroup wait queue in the request queue and wake it up when it can do further IO based on cgroup limits. Thanks Vivek