small patch for cpu_idle?
It appears to me that our cpu_idle is not quite right... what do you guys think about this:
Index: process.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/process.c,v retrieving revision 1.38
10/21 17:46:53 renamed from 10/09 19:43:35 1.38 +2 -2
@@ -67,8 +67,8 @@ current->counter = -100; while (1) { - while (!current->need_resched) { - } + while (!current->need_resched) + continue; schedule(); check_pgt_cache(); }
otherwise when cpu_idle gets called we might get stuck in an inf loop (which happens, for example, when fsck requires manual intervention on startup).
randolph
Signature · 4 lines
@..@ http://www.TauSq.org/ (----) ( >__< ) ^^ ~~ ^^
Quoted 11 lines · Randolph Chung
It appears to me that our
cpu_idleis not quite right... what do you guys think about this:while (1) {10/21 17:46:53 renamed from 10/09 19:43:35 1.38 +2
-2- while (!current->need_resched) { - } + while (!current->need_resched) + continue; schedule(); check_pgt_cache(); }
Quoted 3 lines
otherwise when
cpu_idlegets called we might get stuck in an inf loop (which happens, for example, when fsck requires manual intervention on startup).
I don't see any difference between
while (foo) { }
and
while (foo) continue;
need_resched is volatile:
volatile long need_resched;
so I don't see that your change should have any effect. Does it actually generate different code?
Signature · 1 line
Revolutions do not require corporate support.
Quoted 7 lines
I don't see any difference between
while (foo) { }
and
while (foo) continue;
i was obviously smoking something funny :-(
ok, i'll look into more why i get a hang in cpu_idle when fsck requires manual intervention on startup.
randolph
Signature · 2 lines
Debian Developer <[email protected]> http://www.TauSq.org/