Re: [PATCH 12/12] blkcg: kill the mind-bending blkg->dev

From: Vivek Goyal
Date: Thu Jan 19 2012 - 11:46:45 EST


On Thu, Jan 19, 2012 at 08:30:56AM -0800, Tejun Heo wrote:
> Hello,
>
> On Thu, Jan 19, 2012 at 10:49:19AM -0500, Vivek Goyal wrote:
> > > Let stat and conf read functions get device name from
> > > blkg->q->backing_dev_info.dev and pass it down to printing functions
> > > and remove blkg->dev.
> >
> > I think one of the reasons for not using blkg->q->backing_dev_info.dev was
> > that there were still drivers where multiple gendisks were sharing the
> > request queue.
>
> Hmmm... is that relevant? The configurations / stats are per
> cgroup-request_queue pair. How does multiple genhd's sharing a queue
> make any difference? Also, the fill_dev_details functions were using
> the same q->backing_dev_info to fill it in, so it's not like it was
> using anything different.

You are right. Looks like it should not make any difference. Also looks
like bdi->dev points to first disk on the queue and ignores later ones.

int bdi_register(struct backing_dev_info *bdi, struct device *parent,
const char *fmt, ...)
{
if (bdi->dev) /* The driver needs to use separate queues per
device */
return 0;
}

So if a queue is being shared by multiple disks, then any throttling rule
on the device will practically trated a rule on the queue and will be
effective on all the devices cumulatively. So sounds fine.

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/