[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140817152549.GA17984@redhat.com>
Date: Sun, 17 Aug 2014 17:25:49 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Rik van Riel <riel@...hat.com>,
Mike Galbraith <umgwanakikbuti@...il.com>,
Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>,
Frank Mayhar <fmayhar@...gle.com>,
Frederic Weisbecker <fweisbec@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Sanjay Rao <srao@...hat.com>,
Larry Woodman <lwoodman@...hat.com>,
linux-kernel@...r.kernel.org, Kirill Tkhai <tkhai@...dex.ru>
Subject: [PATCH 0/2] sched: tasklist_lock cleanups (Was: don't use
while_each_thread())
On 08/13, Oleg Nesterov wrote:
>
> Peter, could you take these simple patches ?
>
> Better later than never... per-file, but please feel free to join
> them in a single patch.
>
> read_lock_irq*(tasklist_lock) in kernel/sched/ files looks strange.
> Why? I'll recheck, but this looks unneeded.
Yes, please consider these minor cleanups on top of for_each_thread
conversions.
read_lock_irq(tasklist) in normalize_rt_tasks() doesn't really hurt,
but it looks confusing. If we really have a reason to disable irqs
this (subtle) reason should be documented.
And I can't understand tg_has_rt_tasks(). Don't we need something
like the patch below? If not, please do not ask me why I think so,
I don't understand this black magic ;) But the usage of the global
"runqueues" array looks suspicious.
Oleg.
--- x/kernel/sched/core.c
+++ x/kernel/sched/core.c
@@ -7354,7 +7354,7 @@ static inline int tg_has_rt_tasks(struct
struct task_struct *g, *p;
for_each_process_thread(g, p) {
- if (rt_task(p) && task_rq(p)->rt.tg == tg)
+ if (rt_task(p) && task_group(p) == tg)
return 1;
}
--
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