From: Takuya Yoshikawa <yoshikawa.takuya-gVGce1chcLdL9jVzuh4AOg@public.gmane.org>
To: vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
fernando-gVGce1chcLdL9jVzuh4AOg@public.gmane.org,
balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Subject: Re: RFC: Attaching threads to cgroups is OK?
Date: Mon, 08 Sep 2008 11:58:51 +0900 [thread overview]
Message-ID: <48C494EB.4080502@oss.ntt.co.jp> (raw)
In-Reply-To: <20080905153832.GE13742-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Hi both,
Fernando is off this week, so may not be able to reply soon, sorry.
Vivek Goyal wrote:
> On Fri, Sep 05, 2008 at 09:00:17PM +0900, Hirokazu Takahashi wrote:
>> Hi, fernando,
>>
>>>> IMHO, optimizing the synchronous path alone would justify the addition
>>>> of io_context in bio. There is more to this though.
>>>>
>>>> As you point out, it would seem that aio and buffered IO would not
>>>> benefit from caching the io context in the bio itself, but there are
>>>> some subtleties here. Let's consider stacking devices and buffered IO,
>>>> for example. When a bio enters such a device it may get replicated
>>>> several times and, depending on the topology, some other derivative bios
>>>> will be created (RAID1 and parity configurations come to mind,
>>>> respectively). The problem here is that the memory allocated for the
>>>> newly created bios will be owned by the corresponding dm or md kernel
>>>> thread, not the originator of the bio we are replicating or calculating
>>>> the parity bits from.
>>> I've already tried implementing this feature. Will you take a look
>>> at the thread whose subject is "I/O context inheritance" in
>>> http://www.uwsg.iu.edu/hypermail/linux/kernel/0804.2/index.html#2857.
>> When I started to implement this, I would make each bio have two
>> io_contexts -- per-process io_context which had ionice and
>> and per-cgroup io_context.
>>
I am also trying to make bios have pointers to io_contexts and I have a
question concerning this, very simple one.
Is it OK to think bio->bi_io_context is a cache to find the io_context
of an appropriate task, an issuer of this bio, which may sometimes not be
the direct one, e.g. stacking devices case.
If so, is it same if we make bios have pointers to the issuers, tasks or
cgroups, of them and then find the io_contexts through these?
I sometimes tempted to say "this bio's io_context."
>
> Hi Hirokazu,
>
> I had a question. Why are we trying to create another io_context or why
> are we trying to mix up existing io_context (which is per task or per
> thread group) with cgroups?
>
> To me we just need to know the "cgroup id" to take a specific action with
> a bio. We don't need whole io_context strucutre. So can't we just use
> something like, page->page_cgroup->bio_cgroup->cgrou_id or something like
> that.
>
> What I mean is that the only thing which we seem to require to differentiate
> between various bio is cgroup id it belongs to and that can be a single
> "unsigned long" stored at appropriate place. Why are we looking at
> creating a full io_context structure and trying to share it among all the
> members of a cgroup?
>
> Thanks
> Vivek
next prev parent reply other threads:[~2008-09-08 2:58 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 10:38 RFC: Attaching threads to cgroups is OK? Takuya Yoshikawa
2008-08-19 11:22 ` KAMEZAWA Hiroyuki
[not found] ` <48AAA296.8050802-gVGce1chcLdL9jVzuh4AOg@public.gmane.org>
2008-08-19 11:22 ` KAMEZAWA Hiroyuki
2008-08-19 12:27 ` Balbir Singh
[not found] ` <20080819202237.edd75933.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-08-19 12:27 ` Balbir Singh
2008-08-19 12:52 ` Fernando Luis Vázquez Cao
[not found] ` <48AABC31.7070207-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-08-19 12:52 ` Fernando Luis Vázquez Cao
2008-08-20 7:12 ` Hirokazu Takahashi
[not found] ` <1219150334.14590.12.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
2008-08-20 7:12 ` Hirokazu Takahashi
[not found] ` <20080820.161247.64324924.taka-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2008-08-20 8:43 ` KAMEZAWA Hiroyuki
2008-08-20 8:43 ` KAMEZAWA Hiroyuki
2008-08-22 1:03 ` Takuya Yoshikawa
[not found] ` <20080820174334.a566a775.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-08-22 1:03 ` Takuya Yoshikawa
2008-08-20 5:52 ` Takuya Yoshikawa
2008-08-20 5:52 ` Takuya Yoshikawa
2008-08-20 11:48 ` Hirokazu Takahashi
2008-08-21 3:08 ` Fernando Luis Vázquez Cao
[not found] ` <20080820.204832.131207708.taka-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2008-08-21 3:08 ` Fernando Luis Vázquez Cao
[not found] ` <1219288081.28324.30.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
2008-08-21 3:32 ` Balbir Singh
[not found] ` <48ACE1B4.8010000-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-08-21 5:25 ` Fernando Luis Vázquez Cao
2008-08-21 10:28 ` Balbir Singh
[not found] ` <1219296306.28324.82.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
2008-08-21 10:28 ` Balbir Singh
2008-08-22 18:55 ` Vivek Goyal
2008-08-25 10:36 ` Fernando Luis Vázquez Cao
[not found] ` <1219660569.16371.161.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
2008-09-05 11:50 ` Hirokazu Takahashi
[not found] ` <20080905.205016.28412219.taka-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2008-09-05 12:00 ` Hirokazu Takahashi
2008-09-05 15:38 ` Vivek Goyal
[not found] ` <20080905153832.GE13742-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-09-08 2:58 ` Takuya Yoshikawa [this message]
[not found] ` <48C494EB.4080502-gVGce1chcLdL9jVzuh4AOg@public.gmane.org>
2008-09-08 11:52 ` Hirokazu Takahashi
2008-09-08 11:52 ` Hirokazu Takahashi
2008-09-08 12:47 ` Hirokazu Takahashi
2008-09-08 2:58 ` Takuya Yoshikawa
2008-09-08 12:47 ` Hirokazu Takahashi
[not found] ` <20080905.210017.44596963.taka-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2008-09-05 15:38 ` Vivek Goyal
2008-09-05 12:00 ` Hirokazu Takahashi
2008-09-05 11:50 ` Hirokazu Takahashi
[not found] ` <20080822185527.GD27964-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-08-25 10:36 ` Fernando Luis Vázquez Cao
2008-09-12 18:57 ` Vivek Goyal
2008-09-12 18:57 ` Vivek Goyal
2008-08-22 18:55 ` Vivek Goyal
2008-08-21 5:25 ` Fernando Luis Vázquez Cao
2008-08-21 3:32 ` Balbir Singh
2008-08-20 11:48 ` Hirokazu Takahashi
2008-08-20 7:41 ` Hirokazu Takahashi
2008-08-20 7:41 ` Hirokazu Takahashi
-- strict thread matches above, loose matches on Subject: below --
2008-08-19 10:38 Takuya Yoshikawa
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=48C494EB.4080502@oss.ntt.co.jp \
--to=yoshikawa.takuya-gvgce1chcldl9jvzuh4aog@public.gmane.org \
--cc=balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=fernando-gVGce1chcLdL9jVzuh4AOg@public.gmane.org \
--cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
/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.