[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090528.182740.193697101.ryov@valinux.co.jp>
Date: Thu, 28 May 2009 18:27:40 +0900 (JST)
From: Ryo Tsuruta <ryov@...inux.co.jp>
To: vgoyal@...hat.com
Cc: linux-kernel@...r.kernel.org,
containers@...ts.linux-foundation.org, dm-devel@...hat.com,
jens.axboe@...cle.com, nauman@...gle.com, dpshah@...gle.com,
lizf@...fujitsu.com, mikew@...gle.com, fchecconi@...il.com,
paolo.valente@...more.it, fernando@....ntt.co.jp,
s-uchida@...jp.nec.com, taka@...inux.co.jp,
guijianfeng@...fujitsu.com, jmoyer@...hat.com,
dhaval@...ux.vnet.ibm.com, balbir@...ux.vnet.ibm.com,
righi.andrea@...il.com, m-ikeda@...jp.nec.com, jbaron@...hat.com,
agk@...hat.com, snitzer@...hat.com, akpm@...ux-foundation.org,
peterz@...radead.org
Subject: Re: [PATCH 15/20] io-controller: map async requests to appropriate
cgroup
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.
Thanks,
Ryo Tsuruta
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists