mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] Re: softirq buggy
@ 2001-04-09 11:37 Studierende der Universitaet des Saarlandes
  0 siblings, 0 replies; 8+ messages in thread
From: Studierende der Universitaet des Saarlandes @ 2001-04-09 11:37 UTC (permalink / raw)
  To: acahalan; +Cc: linux-kernel

> > I'd prefer to inline cpu_is_idle(), but optimizing the idle 
> >code path is probably not that important ;-) 
>
> Sure it is, in one way: how fast can you get back to work? 
> (not OK to take a millisecond getting out of the idle loop) 

2 short function calls instead of 2 "if(current->need_resched)" on the
way out.

I didn't try very hard to fix the inline dependencies, could you try to
move cpu_is_idle() from kernel/sched.c into <linux/pm.h>?

I'm sure it won't be more difficult than the last "Athlon+SMP doesn't
compile" problem ;-)

--
	Manfred

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: softirq buggy [Re: Serial port latency]
@ 2001-04-08 17:58 kuznet
  2001-04-08 21:35 ` [PATCH] Re: softirq buggy Manfred Spraul
  0 siblings, 1 reply; 8+ messages in thread
From: kuznet @ 2001-04-08 17:58 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: linux-kernel

Hello!

> But with a huge overhead. I'd prefer to call it directly from within the
> idle functions, the overhead of schedule is IMHO too high.


+	if (current->need_resched) {
+		return 0;
		^^^^^^^^
+	}
+	if (softirq_active(smp_processor_id()) & softirq_mask(smp_processor_id())) {
+		do_softirq();
+		return 0;
		^^^^^^^^^
You return one value in both casesand I decided it means "schedule". 8)
Apparently you meaned return 1 in the first case. 8)

But in this case it becomes wrong. do_softirq() can raise need_reshed
and moreover irqs arrive during it. Order of check should be different.


BTW what's about overhead... I suspect it is _lower_ in the case
of schedule(). In the case of networking at least, when softirq
most likely wakes some socket.

Alexey

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-04-09 18:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-09 11:37 [PATCH] Re: softirq buggy Studierende der Universitaet des Saarlandes
  -- strict thread matches above, loose matches on Subject: below --
2001-04-08 17:58 softirq buggy [Re: Serial port latency] kuznet
2001-04-08 21:35 ` [PATCH] Re: softirq buggy Manfred Spraul
2001-04-09  8:42   ` Albert D. Cahalan
2001-04-09 13:50   ` Andrea Arcangeli
2001-04-09 15:26     ` Manfred Spraul
2001-04-09 17:31       ` Andrea Arcangeli
2001-04-09 17:48       ` kuznet
2001-04-09 18:26         ` Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®