From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivek Goyal Subject: Re: [RFC] writeback and cgroup Date: Thu, 5 Apr 2012 13:13:21 -0400 Message-ID: <20120405171321.GF23999@redhat.com> References: <20120403183655.GA23106@dhcp-172-17-108-109.mtv.corp.google.com> <20120404145134.GC12676@redhat.com> <20120404184909.GB29686@dhcp-172-17-108-109.mtv.corp.google.com> <20120405163854.GE12854@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20120405163854.GE12854-hpIqsD4AKlfQT0dZR+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: Tejun Heo Cc: Jens Axboe , ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, Jan Kara , 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, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Fengguang Wu List-Id: containers.vger.kernel.org On Thu, Apr 05, 2012 at 09:38:54AM -0700, Tejun Heo wrote: > Hey, Vivek. > > On Wed, Apr 04, 2012 at 11:49:09AM -0700, Tejun Heo wrote: > > > I am not sure what are you trying to say here. But primarily blk-throttle > > > will throttle read and direct IO. Buffered writes will go to root cgroup > > > which is typically unthrottled. > > > > Ooh, my bad then. Anyways, then the same applies to blk-throttle. > > Our current implementation essentially collapses at the face of > > write-heavy workload. > > I went through the code and couldn't find where blk-throttle is > discriminating async IOs. Were you saying that blk-throttle currently > doesn't throttle because those IOs aren't associated with the dirtying > task? Yes that's what I meant. Currently most of the async IO will come from flusher thread which is in root cgroup. So all the async IO will be in root group and we typically keep root group unthrottled. Sorry for the confusion here. > If so, note that it's different from cfq which explicitly > assigns all async IOs when choosing cfqq even if we fix tagging. Yes. So if we can properly account for submitter, and for blk-throttle, async IO will go in right cgroup. Unlike CFQ, there is no hard coded logic to keep async IO in a particular group. It is just a matter of getting the right cgroup information. Thanks Vivek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755579Ab2DESIn (ORCPT ); Thu, 5 Apr 2012 14:08:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56904 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753322Ab2DESIl (ORCPT ); Thu, 5 Apr 2012 14:08:41 -0400 Date: Thu, 5 Apr 2012 13:13:21 -0400 From: Vivek Goyal To: Tejun Heo Cc: Fengguang Wu , Jan Kara , Jens Axboe , linux-mm@kvack.org, sjayaraman@suse.com, andrea@betterlinux.com, jmoyer@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kamezawa.hiroyu@jp.fujitsu.com, lizefan@huawei.com, containers@lists.linux-foundation.org, cgroups@vger.kernel.org, ctalbott@google.com, rni@google.com, lsf@lists.linux-foundation.org Subject: Re: [RFC] writeback and cgroup Message-ID: <20120405171321.GF23999@redhat.com> References: <20120403183655.GA23106@dhcp-172-17-108-109.mtv.corp.google.com> <20120404145134.GC12676@redhat.com> <20120404184909.GB29686@dhcp-172-17-108-109.mtv.corp.google.com> <20120405163854.GE12854@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120405163854.GE12854@google.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 05, 2012 at 09:38:54AM -0700, Tejun Heo wrote: > Hey, Vivek. > > On Wed, Apr 04, 2012 at 11:49:09AM -0700, Tejun Heo wrote: > > > I am not sure what are you trying to say here. But primarily blk-throttle > > > will throttle read and direct IO. Buffered writes will go to root cgroup > > > which is typically unthrottled. > > > > Ooh, my bad then. Anyways, then the same applies to blk-throttle. > > Our current implementation essentially collapses at the face of > > write-heavy workload. > > I went through the code and couldn't find where blk-throttle is > discriminating async IOs. Were you saying that blk-throttle currently > doesn't throttle because those IOs aren't associated with the dirtying > task? Yes that's what I meant. Currently most of the async IO will come from flusher thread which is in root cgroup. So all the async IO will be in root group and we typically keep root group unthrottled. Sorry for the confusion here. > If so, note that it's different from cfq which explicitly > assigns all async IOs when choosing cfqq even if we fix tagging. Yes. So if we can properly account for submitter, and for blk-throttle, async IO will go in right cgroup. Unlike CFQ, there is no hard coded logic to keep async IO in a particular group. It is just a matter of getting the right cgroup information. Thanks Vivek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx151.postini.com [74.125.245.151]) by kanga.kvack.org (Postfix) with SMTP id EA11B6B0083 for ; Thu, 5 Apr 2012 14:08:07 -0400 (EDT) Date: Thu, 5 Apr 2012 13:13:21 -0400 From: Vivek Goyal Subject: Re: [RFC] writeback and cgroup Message-ID: <20120405171321.GF23999@redhat.com> References: <20120403183655.GA23106@dhcp-172-17-108-109.mtv.corp.google.com> <20120404145134.GC12676@redhat.com> <20120404184909.GB29686@dhcp-172-17-108-109.mtv.corp.google.com> <20120405163854.GE12854@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120405163854.GE12854@google.com> Sender: owner-linux-mm@kvack.org List-ID: To: Tejun Heo Cc: Fengguang Wu , Jan Kara , Jens Axboe , linux-mm@kvack.org, sjayaraman@suse.com, andrea@betterlinux.com, jmoyer@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kamezawa.hiroyu@jp.fujitsu.com, lizefan@huawei.com, containers@lists.linux-foundation.org, cgroups@vger.kernel.org, ctalbott@google.com, rni@google.com, lsf@lists.linux-foundation.org On Thu, Apr 05, 2012 at 09:38:54AM -0700, Tejun Heo wrote: > Hey, Vivek. > > On Wed, Apr 04, 2012 at 11:49:09AM -0700, Tejun Heo wrote: > > > I am not sure what are you trying to say here. But primarily blk-throttle > > > will throttle read and direct IO. Buffered writes will go to root cgroup > > > which is typically unthrottled. > > > > Ooh, my bad then. Anyways, then the same applies to blk-throttle. > > Our current implementation essentially collapses at the face of > > write-heavy workload. > > I went through the code and couldn't find where blk-throttle is > discriminating async IOs. Were you saying that blk-throttle currently > doesn't throttle because those IOs aren't associated with the dirtying > task? Yes that's what I meant. Currently most of the async IO will come from flusher thread which is in root cgroup. So all the async IO will be in root group and we typically keep root group unthrottled. Sorry for the confusion here. > If so, note that it's different from cfq which explicitly > assigns all async IOs when choosing cfqq even if we fix tagging. Yes. So if we can properly account for submitter, and for blk-throttle, async IO will go in right cgroup. Unlike CFQ, there is no hard coded logic to keep async IO in a particular group. It is just a matter of getting the right cgroup information. Thanks Vivek -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org