Re: [PATCH/RFC] sched: Remove SYSTEM_RUNNING checks from cond_resched*()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Wednesday, July 8, 2009 - 2:10 pm

> On Wed, 8 Jul 2009 09:12:30 -0700 (PDT) Linus Torvalds <torvalds@linux-foundation.org> wrote:

Agreed.  system_state is too general.

If we specifically want to know whether it is safe to call schedule() then
let's create a global boolean it_is_safe_to_call_schedule and test that,
rather than testing something which indirectly and unreliably implies "it
is safe to call schedule".  If that boolean already exists then no-brainer.

All that being said, I wonder if the netconsole code should be using
msleep(1) instead.  Spinning on cond_resched() is a bit rude.  But one
would have to verify that it is safe to call schedule() at this time, and
for the netconsole caller, this is dubious.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] sched: Make cond_resched*() available earlier, Anton Vorontsov, (Wed Jul 8, 1:45 pm)
Re: [PATCH/RFC] sched: Remove SYSTEM_RUNNING checks from c ..., Andrew Morton, (Wed Jul 8, 2:10 pm)