lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTinacDgzZenwmG4==1gYfEaQg-YQ-g@mail.gmail.com>
Date:	Tue, 28 Jun 2011 10:40:54 +0800
From:	Yong Zhang <yong.zhang0@...il.com>
To:	Cheng Xu <chengxu@...ux.vnet.ibm.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...e.hu>, Mike Galbraith <efault@....de>
Subject: Re: [PATCH] sched: skip autogroup when looking for all rt sched groups

Sorry for my late response and comments below.

On Thu, Jun 23, 2011 at 7:21 PM, Cheng Xu <chengxu@...ux.vnet.ibm.com> wrote:
>
> This looks like it works, but seems we might be able to do that with less code...
>
> static inline struct task_group *next_task_group(struct task_group *tg)
> {
>        do {
>                tg = list_entry_rcu(tg->list.next,
>                                    typeof(struct task_group), list);
>        } while ((&tg->list != &task_groups) && (task_group_is_autogroup(tg)));
>        if (&tg->list == &task_groups)
>                tg = NULL;
>        return tg;
> }
>
> #define for_each_rt_rq(rt_rq, iter, rq) \
>        for (iter = container_of(&task_groups, typeof(*iter), list); \
>             (iter = next_task_group(iter)) && \
>             (rt_rq = iter->rt_rq[cpu_of(rq)]);)

Yeah, this works too, and it save some code.

Will update the patch based on it.

Thanks,
Yong



-- 
Only stand for myself
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ