Re: [PATCH] cgroup: minor optimization around the usage of cur_tasks_head

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Yafang.

On Wed, Jan 26, 2022 at 02:17:05PM +0000, Yafang Shao <laoar.shao@xxxxxxxxx> wrote:
> As the usage of cur_tasks_head is within the function
> css_task_iter_advance(), we can make it as a local variable. That could
> make it more clear and easier to understand. Another benefit is we don't
> need to carry it in css_task_iter.

It looks correct. When refactoring in the sake of understandibility
(disputable :), wouldn't it be better to avoid the double-pointer arg
passed into css_task_iter_advance_css_set() and just return the new
cur_tasks_head (the input value doesn't seem relevant)?

Thanks,
Michal



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux