lkml.org 
[lkml]   [2001]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] softirq performance fixes, cleanups, 2.4.10.
On Fri, Sep 28, 2001 at 03:29:13AM +0400, Oleg Nesterov wrote:
> --- 2.4.10-softirq-A7/kernel/softirq.c.orig Thu Sep 27 22:31:06 2001
> +++ 2.4.10-softirq-A7/kernel/softirq.c Thu Sep 27 22:54:37 2001
> @@ -85,7 +85,7 @@
> {
> int max_restart = MAX_SOFTIRQ_RESTART;
> int cpu = smp_processor_id();
> - __u32 pending, mask;
> + __u32 pending;
> long flags;
>
> if (in_interrupt())
> @@ -98,7 +98,6 @@
> if (pending) {
> struct softirq_action *h;
>
> - mask = ~pending;
> local_bh_disable();
> restart:
> /* Reset the pending bitmask before enabling irqs */

correct.

> @@ -381,26 +380,22 @@
> #endif
>
> current->nice = 19;
> - schedule();
> - __set_current_state(TASK_INTERRUPTIBLE);

buggy (check cpus_allowed).

> for (;;) {
> -back:
> + schedule();
> + __set_current_state(TASK_INTERRUPTIBLE);
> +
> do {
> do_softirq();
> if (current->need_resched)
> goto preempt;
> } while (softirq_pending(cpu));
> - schedule();
> - __set_current_state(TASK_INTERRUPTIBLE);
> - }
>
> + continue;
> preempt:
> - __set_current_state(TASK_RUNNING);
> - schedule();
> - __set_current_state(TASK_INTERRUPTIBLE);
> - goto back;
> + __set_current_state(TASK_RUNNING);
> + }
> }

you dropped Ingo's optimization (but you resurrected the strictier /proc
statistics).

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.069 / U:4.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site