[Devel] Re: css_id numbering

Ryo Tsuruta ryov at valinux.co.jp
Thu May 21 03:36:06 PDT 2009


Hi Kamezawa-san and Kosaki-san,

> > I have a suggestion for css_id numbering. How about using the same
> > numbering scheme as process ID for css_id instead of idr? It prevents
> > the same ID from being reused quickly.
> 
> process ID is not "short"(2bytes).
> 
> > blkio-cgroup can benefit from it. If some pages still have an old ID,
> > it can somewhat prevents IOs associated with those pages from being
> > charged for a new cgroup which are reusing the old ID.
> 
> plz see memcg's code. no reuse if id is still used.

blkio-cgroup embeds css_id into page_cgroup->flags, and the ID in the
flags still remain even after the cgroup which marks up the page is
removed.

The current numbering scheme of css_id choose the lowest number from
available IDs. When a cgroup is created right after another cgroup is
removed (no one referes to the cgroup), the same number will be reused
for the new cgroup.

When an IO associated with the page is issued, an IO controller which
uses blkio-cgroup charges the new cgroup according to the ID in the
page_cgroup->flags, instead of the removed cgroup. If css_id is simply
incremented by one like process ID, I think we could avoid such wrong
charges in many cases.

> it seems bogus solusion.
> pid rule also can make conflict. I think blkio-cgroup should be fixed.

This solution is reasonable for accuracy, even conflicts occur.
I think keeping down the overhead of blkio-cgroup is more important.

Thanks,
Ryo Tsuruta
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list