LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: Juri Lelli <juri.lelli@gmail.com>,
mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sched/rt: Rework for_each_process_thread() iterations in tg_has_rt_tasks()
Date: Wed, 25 Apr 2018 21:49:15 +0200 [thread overview]
Message-ID: <20180425194915.GH4064@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <854a5fb1-a9c1-023f-55ec-17fa14ad07d5@virtuozzo.com>
On Fri, Apr 20, 2018 at 01:06:31PM +0300, Kirill Tkhai wrote:
> @@ -2406,12 +2407,15 @@ static inline int tg_has_rt_tasks(struct task_group *tg)
> if (task_group_is_autogroup(tg))
> return 0;
>
> - for_each_process_thread(g, p) {
> - if (rt_task(p) && task_group(p) == tg)
> - return 1;
> - }
> + css_task_iter_start(&tg->css, 0, &it);
> + while ((task = css_task_iter_next(&it)))
> + if (rt_task(task)) {
> + ret = 1;
> + break;
> + }
Aside from the missing {} there, the patch looks OK I suppose.
The races found seems somewhat dodgy, but like you argue, they're not in
fact new :/
> + css_task_iter_end(&it);
>
> - return 0;
> + return ret;
> }
>
next prev parent reply other threads:[~2018-04-25 19:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 17:29 [PATCH] " Kirill Tkhai
2018-04-20 9:25 ` Juri Lelli
2018-04-20 9:43 ` Kirill Tkhai
2018-04-20 10:06 ` [PATCH v2] " Kirill Tkhai
2018-04-20 14:11 ` Juri Lelli
2018-04-20 14:30 ` Kirill Tkhai
2018-04-20 15:27 ` Juri Lelli
2018-04-25 15:42 ` Kirill Tkhai
2018-04-25 19:49 ` Peter Zijlstra [this message]
2018-04-26 9:54 ` [PATCH v3]sched/rt: Stop " Kirill Tkhai
2020-01-23 21:56 ` Phil Auld
2020-01-24 9:09 ` Kirill Tkhai
2020-01-27 16:30 ` Phil Auld
2020-01-27 16:43 ` Peter Zijlstra
2020-01-27 16:56 ` Phil Auld
2020-01-27 17:00 ` Peter Zijlstra
2020-01-27 17:45 ` Phil Auld
2018-04-20 10:58 ` [PATCH] sched/rt: Rework " Juri Lelli
2018-04-20 11:21 ` Kirill Tkhai
2018-04-25 17:55 ` Peter Zijlstra
2018-04-26 9:26 ` Kirill Tkhai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180425194915.GH4064@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=juri.lelli@gmail.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--subject='Re: [PATCH v2] sched/rt: Rework for_each_process_thread() iterations in tg_has_rt_tasks()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).