On Fri, Jan 17, 2020 at 04:15:31PM +0100, Michal Koutný wrote: > We track tasks of css_set in three different lists. The iterators > unnecessarily process each list specially. > Use an array of lists and simplify the iterator code. This is > refactoring with no intended functional change. > > Signed-off-by: Michal Koutný <mkoutny@xxxxxxxx> > --- > include/linux/cgroup-defs.h | 15 ++++--- > include/linux/cgroup.h | 4 +- > kernel/cgroup/cgroup.c | 81 +++++++++++++++++++------------------ > kernel/cgroup/debug.c | 16 ++++---- > 4 files changed, 60 insertions(+), 56 deletions(-) So, I get the urge to move the lists into an array and thought about doing that while adding the third list for sure. However, it does make code paths which don't walk all lists wordier and the code path is already tricky like hell. Given that there aren't that many places which loop over the lists, if you really wanna clean it up, maybe add an interator over the lists so that both parts of code can look lean? Thanks. -- tejun