virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Hirokazu Takahashi <taka@valinux.co.jp>
Cc: menage@google.com, fernando@oss.ntt.co.jp,
	balbir@linux.vnet.ibm.com, containers@lists.linux-foundation.org,
	virtualization@lists.linux-foundation.org
Subject: Re: RFC: Attaching threads to cgroups is OK?
Date: Fri, 5 Sep 2008 11:38:32 -0400	[thread overview]
Message-ID: <20080905153832.GE13742@redhat.com> (raw)
In-Reply-To: <20080905.210017.44596963.taka@valinux.co.jp>

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.
> 

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

  parent reply	other threads:[~2008-09-05 15:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <48AAA296.8050802@oss.ntt.co.jp>
2008-08-19 11:22 ` RFC: Attaching threads to cgroups is OK? KAMEZAWA Hiroyuki
     [not found] ` <20080819202237.edd75933.kamezawa.hiroyu@jp.fujitsu.com>
2008-08-19 12:27   ` Balbir Singh
     [not found]   ` <48AABC31.7070207@linux.vnet.ibm.com>
2008-08-19 12:52     ` Fernando Luis Vázquez Cao
2008-08-20  5:52     ` Takuya Yoshikawa
     [not found]     ` <1219150334.14590.12.camel@sebastian.kern.oss.ntt.co.jp>
2008-08-20  7:12       ` Hirokazu Takahashi
     [not found]       ` <20080820.161247.64324924.taka@valinux.co.jp>
2008-08-20  8:43         ` KAMEZAWA Hiroyuki
2008-08-22  1:03           ` Takuya Yoshikawa
2008-08-20 11:48   ` Hirokazu Takahashi
     [not found]   ` <20080820.204832.131207708.taka@valinux.co.jp>
2008-08-21  3:08     ` Fernando Luis Vázquez Cao
     [not found]     ` <1219288081.28324.30.camel@sebastian.kern.oss.ntt.co.jp>
2008-08-21  3:32       ` Balbir Singh
     [not found]       ` <48ACE1B4.8010000@linux.vnet.ibm.com>
2008-08-21  5:25         ` Fernando Luis Vázquez Cao
     [not found]         ` <1219296306.28324.82.camel@sebastian.kern.oss.ntt.co.jp>
2008-08-21 10:28           ` Balbir Singh
2008-08-22 18:55           ` Vivek Goyal
     [not found]           ` <20080822185527.GD27964@redhat.com>
2008-08-25 10:36             ` Fernando Luis Vázquez Cao
2008-09-05 11:50               ` Hirokazu Takahashi
     [not found]               ` <20080905.205016.28412219.taka@valinux.co.jp>
2008-09-05 12:00                 ` Hirokazu Takahashi
     [not found]                 ` <20080905.210017.44596963.taka@valinux.co.jp>
2008-09-05 15:38                   ` Vivek Goyal [this message]
2008-09-08  2:58                     ` Takuya Yoshikawa
     [not found]                     ` <48C494EB.4080502@oss.ntt.co.jp>
2008-09-08 11:52                       ` Hirokazu Takahashi
2008-09-08 12:47                     ` Hirokazu Takahashi
2008-09-12 18:57             ` Vivek Goyal
2008-08-20  7:41 ` Hirokazu Takahashi
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=20080905153832.GE13742@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=fernando@oss.ntt.co.jp \
    --cc=menage@google.com \
    --cc=taka@valinux.co.jp \
    --cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).