From: Vivek Goyal <vgoyal@redhat.com>
To: Ryo Tsuruta <ryov@valinux.co.jp>
Cc: dhaval@linux.vnet.ibm.com, snitzer@redhat.com,
peterz@infradead.org, dm-devel@redhat.com, dpshah@google.com,
jens.axboe@oracle.com, agk@redhat.com, balbir@linux.vnet.ibm.com,
paolo.valente@unimore.it, guijianfeng@cn.fujitsu.com,
fernando@oss.ntt.co.jp, mikew@google.com, jmoyer@redhat.com,
nauman@google.com, m-ikeda@ds.jp.nec.com, lizf@cn.fujitsu.com,
fchecconi@gmail.com, akpm@linux-foundation.org,
containers@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, s-uchida@ap.jp.nec.com,
righi.andrea@gmail.com, jbaron@redhat.com
Subject: Re: [PATCH 15/20] io-controller: map async requests to appropriate cgroup
Date: Fri, 29 May 2009 09:38:04 -0400 [thread overview]
Message-ID: <20090529133804.GA26962@redhat.com> (raw)
In-Reply-To: <20090529.121737.189708024.ryov@valinux.co.jp>
On Fri, May 29, 2009 at 12:17:37PM +0900, Ryo Tsuruta wrote:
> Hi Vivek,
>
> Vivek Goyal <vgoyal@redhat.com> wrote:
> > On Thu, May 28, 2009 at 06:27:40PM +0900, Ryo Tsuruta wrote:
> > > Hi Vivek,
> > >
> > > > +#ifdef CONFIG_TRACK_ASYNC_CONTEXT
> > > > + if (elv_bio_sync(bio)) {
> > > > + /* sync io. Determine cgroup from submitting task context. */
> > > > + cgroup = task_cgroup(current, io_subsys_id);
> > > > + return cgroup;
> > > > + }
> > > > +
> > > > + /* Async io. Determine cgroup from with cgroup id stored in page */
> > > > + bio_cgroup_id = get_blkio_cgroup_id(bio);
> > > > +
> > > > + if (!bio_cgroup_id)
> > > > + return NULL;
> > > > +
> > > > + cgroup = blkio_cgroup_lookup(bio_cgroup_id);
> > > > +#else
> > > > + cgroup = task_cgroup(current, io_subsys_id);
> > > > +#endif
> > > > + return cgroup;
> > > > +}
> > >
> > > There is a case where a kernel thread (such as device-mapper drivers)
> > > submits a sync IO instead of a task which originates the IO. I think
> > > you should always use get_blkio_cgroup_id() to determine cgroup.
> > >
> >
> > Hi Ryo,
> >
> > Ok. Can you give some examples of drivers which are submitting reads in
> > different context al-together. You mentioned in the past that dm-crypt
> > looks like the one. How does current CFQ takes care of that. So if a
> > BE prio 7 or an RT prio 0, task is submitting a READ, CFQ will not know it
> > and it will put that READ in the queue of the READ submitting device
> > mapper thread (may be BE prio 3 or 4)?
>
> In the case of READ, dm-raid1 submits read IOs in differenct context
> under some conditions. dm-ioband also does it.
>
> > Always determining the cgroup from bio, will make things slower at the
> > same time complicated from the CFQ point of view. Right now cfq creates
> > and caches the queue pointer in the io context of the bio submitting task
> > and assumes sync requests are coming from that task/io context. Currently
> > there can only be one sync queue associated with one context. So if a single
> > thread is submitting reads (may be a worker thread) on behalf of other
> > processes, then we loose the io context information. In fact currently we
> > don't even carry ioprio and io class information in bio.
> >
> > So looks like we need to carry task io context information also in bio
> > to be able to associate the bio to right queue at CFQ level. This makes
> > it bit more complicated. For the time being I will keep it in my TODO
> > list and handle it once other more severe problems have been taken care
> > of.
>
> There is a patchset which makes every bio points the iocontext of the
> process which is originally generated an IO request.
>
> Date Tue, 22 Apr 2008 22:51:31 +0900 (JST)
> Subject [RFC][PATCH 1/10] I/O context inheritance
> From Hirokazu Takahashi <>
> http://lkml.org/lkml/2008/4/22/195
Ok, Thanks. This is good. So once above patches make to upstream, I will
just forward port my patches to make use of this infrastructure.
Thanks
Vivek
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Ryo Tsuruta <ryov@valinux.co.jp>
Cc: linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org, dm-devel@redhat.com,
jens.axboe@oracle.com, nauman@google.com, dpshah@google.com,
lizf@cn.fujitsu.com, mikew@google.com, fchecconi@gmail.com,
paolo.valente@unimore.it, fernando@oss.ntt.co.jp,
s-uchida@ap.jp.nec.com, taka@valinux.co.jp,
guijianfeng@cn.fujitsu.com, jmoyer@redhat.com,
dhaval@linux.vnet.ibm.com, balbir@linux.vnet.ibm.com,
righi.andrea@gmail.com, m-ikeda@ds.jp.nec.com, jbaron@redhat.com,
agk@redhat.com, snitzer@redhat.com, akpm@linux-foundation.org,
peterz@infradead.org
Subject: Re: [PATCH 15/20] io-controller: map async requests to appropriate cgroup
Date: Fri, 29 May 2009 09:38:04 -0400 [thread overview]
Message-ID: <20090529133804.GA26962@redhat.com> (raw)
In-Reply-To: <20090529.121737.189708024.ryov@valinux.co.jp>
On Fri, May 29, 2009 at 12:17:37PM +0900, Ryo Tsuruta wrote:
> Hi Vivek,
>
> Vivek Goyal <vgoyal@redhat.com> wrote:
> > On Thu, May 28, 2009 at 06:27:40PM +0900, Ryo Tsuruta wrote:
> > > Hi Vivek,
> > >
> > > > +#ifdef CONFIG_TRACK_ASYNC_CONTEXT
> > > > + if (elv_bio_sync(bio)) {
> > > > + /* sync io. Determine cgroup from submitting task context. */
> > > > + cgroup = task_cgroup(current, io_subsys_id);
> > > > + return cgroup;
> > > > + }
> > > > +
> > > > + /* Async io. Determine cgroup from with cgroup id stored in page */
> > > > + bio_cgroup_id = get_blkio_cgroup_id(bio);
> > > > +
> > > > + if (!bio_cgroup_id)
> > > > + return NULL;
> > > > +
> > > > + cgroup = blkio_cgroup_lookup(bio_cgroup_id);
> > > > +#else
> > > > + cgroup = task_cgroup(current, io_subsys_id);
> > > > +#endif
> > > > + return cgroup;
> > > > +}
> > >
> > > There is a case where a kernel thread (such as device-mapper drivers)
> > > submits a sync IO instead of a task which originates the IO. I think
> > > you should always use get_blkio_cgroup_id() to determine cgroup.
> > >
> >
> > Hi Ryo,
> >
> > Ok. Can you give some examples of drivers which are submitting reads in
> > different context al-together. You mentioned in the past that dm-crypt
> > looks like the one. How does current CFQ takes care of that. So if a
> > BE prio 7 or an RT prio 0, task is submitting a READ, CFQ will not know it
> > and it will put that READ in the queue of the READ submitting device
> > mapper thread (may be BE prio 3 or 4)?
>
> In the case of READ, dm-raid1 submits read IOs in differenct context
> under some conditions. dm-ioband also does it.
>
> > Always determining the cgroup from bio, will make things slower at the
> > same time complicated from the CFQ point of view. Right now cfq creates
> > and caches the queue pointer in the io context of the bio submitting task
> > and assumes sync requests are coming from that task/io context. Currently
> > there can only be one sync queue associated with one context. So if a single
> > thread is submitting reads (may be a worker thread) on behalf of other
> > processes, then we loose the io context information. In fact currently we
> > don't even carry ioprio and io class information in bio.
> >
> > So looks like we need to carry task io context information also in bio
> > to be able to associate the bio to right queue at CFQ level. This makes
> > it bit more complicated. For the time being I will keep it in my TODO
> > list and handle it once other more severe problems have been taken care
> > of.
>
> There is a patchset which makes every bio points the iocontext of the
> process which is originally generated an IO request.
>
> Date Tue, 22 Apr 2008 22:51:31 +0900 (JST)
> Subject [RFC][PATCH 1/10] I/O context inheritance
> From Hirokazu Takahashi <>
> http://lkml.org/lkml/2008/4/22/195
Ok, Thanks. This is good. So once above patches make to upstream, I will
just forward port my patches to make use of this infrastructure.
Thanks
Vivek
next prev parent reply other threads:[~2009-05-29 13:38 UTC|newest]
Thread overview: 138+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-26 22:41 [RFC] IO scheduler based IO controller V3 Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 01/20] io-controller: Documentation Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
2009-05-29 15:42 ` Balbir Singh
2009-05-29 15:42 ` Balbir Singh
[not found] ` <20090529154252.GD5587-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org>
2009-05-29 15:53 ` Vivek Goyal
2009-05-29 15:53 ` Vivek Goyal
2009-05-29 15:53 ` Vivek Goyal
[not found] ` <1243377729-2176-2-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-29 15:42 ` Balbir Singh
[not found] ` <1243377729-2176-1-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-26 22:41 ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 02/20] io-controller: Common flat fair queuing code in elevaotor layer Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
2009-05-27 20:53 ` Nauman Rafique
2009-05-27 20:53 ` Nauman Rafique
2009-05-28 8:52 ` Fabio Checconi
[not found] ` <e98e18940905271353kc6890dbxa1ea63026c8faec1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-28 8:52 ` Fabio Checconi
2009-05-28 16:00 ` Vivek Goyal
2009-05-28 16:00 ` Vivek Goyal
2009-05-28 16:00 ` Vivek Goyal
2009-05-28 19:41 ` Nauman Rafique
2009-05-28 19:41 ` Nauman Rafique
2009-05-29 16:06 ` Vivek Goyal
2009-05-29 16:06 ` Vivek Goyal
[not found] ` <20090529160610.GC26962-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-29 16:57 ` Fabio Checconi
2009-05-29 16:57 ` Fabio Checconi
2009-05-29 19:06 ` Nauman Rafique
2009-05-29 19:06 ` Nauman Rafique
[not found] ` <e98e18940905291206p2e05bc5cxf499479270e34074-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-29 19:16 ` Vivek Goyal
2009-05-29 19:16 ` Vivek Goyal
2009-05-29 19:16 ` Vivek Goyal
[not found] ` <20090529165716.GB18141-f9ZlEuEWxVeACYmtYXMKmw@public.gmane.org>
2009-05-29 19:06 ` Nauman Rafique
[not found] ` <e98e18940905281241v4aa24716j91f351a828af604a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-29 16:06 ` Vivek Goyal
[not found] ` <20090528160003.GA4335-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-28 19:41 ` Nauman Rafique
2009-06-08 1:08 ` Gui Jianfeng
[not found] ` <4A2C649C.8070806-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-06-08 12:58 ` Vivek Goyal
2009-06-08 12:58 ` Vivek Goyal
2009-06-08 12:58 ` Vivek Goyal
[not found] ` <1243377729-2176-3-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-27 20:53 ` Nauman Rafique
2009-06-08 1:08 ` Gui Jianfeng
2009-06-08 7:44 ` Gui Jianfeng
2009-06-08 7:44 ` Gui Jianfeng
2009-06-08 13:56 ` Vivek Goyal
2009-06-08 13:56 ` Vivek Goyal
[not found] ` <4A2CC15F.2010708-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-06-08 13:56 ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 03/20] io-controller: Charge for time slice based on average disk rate Vivek Goyal
2009-05-26 22:41 ` [PATCH 04/20] io-controller: Modify cfq to make use of flat elevator fair queuing Vivek Goyal
2009-05-26 22:41 ` [PATCH 05/20] io-controller: Common hierarchical fair queuing code in elevaotor layer Vivek Goyal
2009-05-26 22:41 ` [PATCH 06/20] io-controller: cfq changes to use " Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 07/20] io-controller: Export disk time used and nr sectors dipatched through cgroups Vivek Goyal
2009-05-26 22:41 ` [PATCH 08/20] io-controller: idle for sometime on sync queue before expiring it Vivek Goyal
2009-05-26 22:41 ` [PATCH 09/20] io-controller: Separate out queue and data Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 10/20] io-conroller: Prepare elevator layer for single queue schedulers Vivek Goyal
2009-05-26 22:42 ` [PATCH 11/20] io-controller: noop changes for hierarchical fair queuing Vivek Goyal
2009-05-26 22:42 ` [PATCH 12/20] io-controller: deadline " Vivek Goyal
2009-05-26 22:42 ` [PATCH 13/20] io-controller: anticipatory " Vivek Goyal
2009-05-26 22:42 ` [PATCH 14/20] blkio_cgroup patches from Ryo to track async bios Vivek Goyal
2009-05-26 22:42 ` [PATCH 15/20] io-controller: map async requests to appropriate cgroup Vivek Goyal
2009-05-26 22:42 ` [PATCH 16/20] io-controller: IO group refcounting support Vivek Goyal
2009-05-26 22:42 ` [PATCH 17/20] io-controller: Per cgroup request descriptor support Vivek Goyal
2009-05-26 22:42 ` [PATCH 18/20] io-controller: Support per cgroup per device weights and io class Vivek Goyal
2009-05-26 22:42 ` [PATCH 19/20] io-controller: Debug hierarchical IO scheduling Vivek Goyal
2009-05-26 22:42 ` [PATCH 20/20] io-controller: experimental debug patch for async queue wait before expiry Vivek Goyal
2009-05-26 22:41 ` [PATCH 03/20] io-controller: Charge for time slice based on average disk rate Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 04/20] io-controller: Modify cfq to make use of flat elevator fair queuing Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 05/20] io-controller: Common hierarchical fair queuing code in elevaotor layer Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
[not found] ` <1243377729-2176-6-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-05 9:36 ` Gui Jianfeng
2009-06-05 9:36 ` Gui Jianfeng
2009-06-05 9:36 ` Gui Jianfeng
[not found] ` <4A28E710.5080307-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-06-05 13:21 ` Vivek Goyal
2009-06-05 13:21 ` Vivek Goyal
2009-06-05 13:21 ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 07/20] io-controller: Export disk time used and nr sectors dipatched through cgroups Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 08/20] io-controller: idle for sometime on sync queue before expiring it Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 10/20] io-conroller: Prepare elevator layer for single queue schedulers Vivek Goyal
2009-05-26 22:41 ` Vivek Goyal
2009-06-05 9:17 ` Gui Jianfeng
2009-06-05 9:17 ` Gui Jianfeng
[not found] ` <4A28E293.90402-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-06-05 13:22 ` Vivek Goyal
2009-06-05 13:22 ` Vivek Goyal
2009-06-05 13:22 ` Vivek Goyal
[not found] ` <1243377729-2176-11-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-05 9:17 ` Gui Jianfeng
2009-05-26 22:42 ` [PATCH 11/20] io-controller: noop changes for hierarchical fair queuing Vivek Goyal
2009-05-26 22:42 ` Vivek Goyal
2009-05-26 22:42 ` [PATCH 12/20] io-controller: deadline " Vivek Goyal
2009-05-26 22:42 ` Vivek Goyal
2009-05-26 22:42 ` [PATCH 13/20] io-controller: anticipatory " Vivek Goyal
2009-05-26 22:42 ` Vivek Goyal
2009-05-26 22:42 ` [PATCH 14/20] blkio_cgroup patches from Ryo to track async bios Vivek Goyal
2009-05-26 22:42 ` Vivek Goyal
2009-05-26 22:42 ` [PATCH 15/20] io-controller: map async requests to appropriate cgroup Vivek Goyal
2009-05-26 22:42 ` Vivek Goyal
2009-05-28 9:27 ` Ryo Tsuruta
2009-05-28 9:27 ` Ryo Tsuruta
[not found] ` <20090528.182740.193697101.ryov-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2009-05-28 16:57 ` Vivek Goyal
2009-05-28 16:57 ` Vivek Goyal
2009-05-28 16:57 ` Vivek Goyal
2009-05-28 18:04 ` Nauman Rafique
2009-05-28 18:04 ` Nauman Rafique
2009-05-29 3:17 ` Ryo Tsuruta
2009-05-29 3:17 ` Ryo Tsuruta
2009-05-29 13:38 ` Vivek Goyal [this message]
2009-05-29 13:38 ` Vivek Goyal
2009-06-01 11:25 ` Ryo Tsuruta
[not found] ` <20090529133804.GA26962-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-01 11:25 ` Ryo Tsuruta
[not found] ` <20090529.121737.189708024.ryov-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2009-05-29 13:38 ` Vivek Goyal
[not found] ` <20090528165710.GB4335-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-29 3:17 ` Ryo Tsuruta
[not found] ` <1243377729-2176-16-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-28 9:27 ` Ryo Tsuruta
2009-05-26 22:42 ` [PATCH 16/20] io-controller: IO group refcounting support Vivek Goyal
2009-05-26 22:42 ` Vivek Goyal
[not found] ` <1243377729-2176-17-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-08 2:03 ` Gui Jianfeng
2009-06-08 2:03 ` Gui Jianfeng
[not found] ` <4A2C716C.8070808-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-06-08 13:53 ` Vivek Goyal
2009-06-08 13:53 ` Vivek Goyal
2009-06-08 13:53 ` Vivek Goyal
2009-05-26 22:42 ` [PATCH 17/20] io-controller: Per cgroup request descriptor support Vivek Goyal
2009-05-26 22:42 ` Vivek Goyal
2009-05-26 22:42 ` [PATCH 18/20] io-controller: Support per cgroup per device weights and io class Vivek Goyal
2009-05-26 22:42 ` Vivek Goyal
2009-05-26 22:42 ` [PATCH 19/20] io-controller: Debug hierarchical IO scheduling Vivek Goyal
2009-05-26 22:42 ` Vivek Goyal
2009-05-26 22:42 ` [PATCH 20/20] io-controller: experimental debug patch for async queue wait before expiry Vivek Goyal
2009-05-26 22:42 ` Vivek Goyal
-- strict thread matches above, loose matches on Subject: below --
2009-06-19 20:37 [RFC] IO scheduler based io controller (V5) Vivek Goyal
[not found] ` <1245443858-8487-1-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-19 20:37 ` [PATCH 15/20] io-controller: map async requests to appropriate cgroup Vivek Goyal
2009-06-19 20:37 ` Vivek Goyal
2009-06-19 20:37 ` Vivek Goyal
2009-06-22 1:45 ` Gui Jianfeng
[not found] ` <4A3EE245.7030409-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-06-22 15:39 ` Vivek Goyal
2009-06-22 15:39 ` Vivek Goyal
2009-06-22 15:39 ` Vivek Goyal
[not found] ` <1245443858-8487-16-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-22 1:45 ` Gui Jianfeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090529133804.GA26962@redhat.com \
--to=vgoyal@redhat.com \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=containers@lists.linux-foundation.org \
--cc=dhaval@linux.vnet.ibm.com \
--cc=dm-devel@redhat.com \
--cc=dpshah@google.com \
--cc=fchecconi@gmail.com \
--cc=fernando@oss.ntt.co.jp \
--cc=guijianfeng@cn.fujitsu.com \
--cc=jbaron@redhat.com \
--cc=jens.axboe@oracle.com \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=m-ikeda@ds.jp.nec.com \
--cc=mikew@google.com \
--cc=nauman@google.com \
--cc=paolo.valente@unimore.it \
--cc=peterz@infradead.org \
--cc=righi.andrea@gmail.com \
--cc=ryov@valinux.co.jp \
--cc=s-uchida@ap.jp.nec.com \
--cc=snitzer@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.