From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: [patch] softirq performance fixes, cleanups, 2.4.10.
Date: Fri, 28 Sep 2001 03:29:13 +0400 [thread overview]
Message-ID: <E15mkaf-0000ms-00@mail.tv-sign.ru> (raw)
Hello.
I am trying to understand the basics of softirq handling.
It seems to me that ksoftirqd()'s loop can be cleanuped a bit
with following (untested) patch on top of 2.4.10-softirq-A7.
It also removes the 'mask' variable in do_softirq().
Oleg
--- 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 */
@@ -381,26 +380,22 @@
#endif
current->nice = 19;
- schedule();
- __set_current_state(TASK_INTERRUPTIBLE);
ksoftirqd_task(cpu) = current;
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);
+ }
}
static __init int spawn_ksoftirqd(void)
next reply other threads:[~2001-09-27 23:29 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-27 23:29 Oleg Nesterov [this message]
2001-09-28 0:03 ` Andrea Arcangeli
2001-09-28 6:57 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2001-09-28 2:50 Oleg Nesterov
2001-09-28 7:56 ` Ingo Molnar
2001-09-26 16:44 Ingo Molnar
2001-09-26 17:48 ` Mike Kravetz
2001-09-26 18:48 ` Ingo Molnar
2001-09-26 18:55 ` Russell King
2001-09-26 19:14 ` Ingo Molnar
2001-09-27 23:31 ` Andrea Arcangeli
2001-09-28 3:20 ` Andrea Arcangeli
2001-09-28 7:34 ` Ingo Molnar
2001-09-28 15:17 ` Andrea Arcangeli
2001-09-28 16:18 ` kuznet
2001-09-28 16:31 ` Ingo Molnar
2001-09-28 17:04 ` kuznet
2001-09-28 17:21 ` Rik van Riel
2001-09-28 17:31 ` Andrea Arcangeli
2001-09-28 17:41 ` kuznet
2001-09-28 17:46 ` Ingo Molnar
2001-09-28 18:39 ` Josh MacDonald
2001-09-28 17:31 ` Ingo Molnar
2001-09-28 17:56 ` kuznet
2001-09-28 18:28 ` Ingo Molnar
2001-09-28 19:23 ` kuznet
2001-09-28 19:48 ` Ingo Molnar
2001-09-29 16:35 ` kuznet
2001-09-30 9:37 ` Kai Henningsen
2001-09-30 9:01 ` Ingo Molnar
2001-09-28 19:39 ` kuznet
2001-09-28 20:03 ` Ingo Molnar
2001-09-28 18:51 ` Benjamin LaHaise
2001-09-28 16:32 ` Andrea Arcangeli
2001-09-28 16:46 ` Ingo Molnar
2001-09-28 16:58 ` Andrea Arcangeli
2001-09-29 11:03 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E15mkaf-0000ms-00@mail.tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®