[Devel] Re: [RFC] IO Controller

Gui Jianfeng guijianfeng at cn.fujitsu.com
Mon May 4 20:18:40 PDT 2009


Nauman Rafique wrote:
...
> Hi Gui,
> This patch should solve the problems reported by you. Please let me know if it does not work.
> @Vivek, this has a few more changes after the patch I sent you separately.
> 

  Hi Nauman,

  I'v tried your patch, seems the bug has been fixed. thanks!

> DESC
> Add ref counting for io_group.
> EDESC
>     
>         Reference counting for io_group solves many problems, most of which
>         occured when we tried to delete the cgroup. Earlier, ioqs were being
>         moved out of cgroup to root cgroup. That is problematic in many ways:
>         First, the pending requests in queues might get unfair service, and
>         will also cause unfairness for other cgroups at the root level. This
>         problem can become signficant if cgroups are created and destroyed
>         relatively frequently. Second, moving queues to root cgroups was
>         complicated and was causing many BUG_ON's to trigger. Third, there is
>         a single io queue in AS, Deadline and Noop within a cgroup; and it
>         does not make sense to move it to the root cgroup. The same is true of
>         async queues.
>     
>         Requests already keep a reference on ioq, so queues keep a reference on
>         cgroup. For async queues in CFQ, and single ioq in other schedulers,
>         io_group also keeps are reference on io_queue. This reference on ioq
>         is dropped when the queue is released (elv_release_ioq). So the queue
>         can be freed.
>     
>         When a queue is released, it puts the reference to io_group and the
>         io_group is released after all the queues are released. Child groups
>         also take reference on parent groups, and release it when they are
>         destroyed.
>     
>         Also we no longer need to maintain a seprate linked list of idle
>         entities, which was maintained only to help release the ioq references
>         during elevator switch. The code for releasing io_groups is reused for
>         elevator switch, resulting in simpler and tight code.
> 
 

-- 
Regards
Gui Jianfeng

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




More information about the Devel mailing list