Re: [PATCH 1/9] io-throttle documentation

From: Ryo Tsuruta
Date: Mon Apr 20 2009 - 05:38:27 EST


Hi Andrea,

> Implementing bio-cgroup functionality as pure infrastructure framework
> instead of a cgroup subsystem would remove all this oddity and
> complexity.
>
> For example, the actual functionality that I need for the io-throttle
> controller is just an interface to set and get the cgroup owner of a
> page. I think it should be the same also for other potential users of
> bio-cgroup.
>
> So, what about implementing the bio-cgroup functionality as cgroup "page
> tracking" infrastructure and provide the following interfaces:
>
> /*
> * Encode the cgrp->css.id in page_group->flags
> */
> void set_cgroup_page_owner(struct page *page, struct cgroup *cgrp);
>
> /*
> * Returns the cgroup owner of a page, decoding the cgroup id from
> * page_cgroup->flags.
> */
> struct cgroup *get_cgroup_page_owner(struct page *page);
>
> This also wouldn't increase the size of page_cgroup because we can
> encode the cgroup id in the unused bits of page_cgroup->flags, as
> originally suggested by Kame.
>
> And I think it could be used also by dm-ioband, even if it's not a
> cgroup-based subsystem... but I may be wrong. Ryo what's your opinion?

I looked your page_cgroup patch in io-throttle v14, It can also be used
by dm-ioband. But I'd like to eliminate lock_page_cgroup() to minimize
overhead. I'll rearrange the bio-cgroup patch according to the functions.

Thanks,
Ryo Tsuruta
--
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/