From: Patrick Mansfield <patmans@us.ibm.com>
To: Luben Tuikov <luben@splentec.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] softirq queue is now list_head, eliminate bh_next
Date: Fri, 7 Mar 2003 17:43:24 -0800 [thread overview]
Message-ID: <20030307174324.A3372@beaverton.ibm.com> (raw)
In-Reply-To: <3E69317E.8030403@splentec.com>; from luben@splentec.com on Fri, Mar 07, 2003 at 06:55:42PM -0500
Hi Luben -
On Fri, Mar 07, 2003 at 06:55:42PM -0500, Luben Tuikov wrote:
> Eliminated is the double loop in scsi_softirq() -- this is
> better handled in do_softirq() and gives the system a ``breather''.
> (There are pros and cons for either side and if you guys
> think that it was better with the double loop, I'll change it and
> resubmit the patch.)
I think it is better to have one loop (per your patch) - in breather cases
when we get multiple interrupts before we can service all of them the
do_softirq() can wakeup ksoftirqd for us to run on.
> static void scsi_softirq(struct softirq_action *h)
> {
> - int cpu = smp_processor_id();
> - struct softscsi_data *queue = &softscsi_data[cpu];
> + LIST_HEAD(local_q);
>
> - while (queue->head) {
> - Scsi_Cmnd *SCpnt, *SCnext;
> + local_irq_disable();
> + list_splice_init(&done_q[smp_processor_id()], &local_q);
> + local_irq_enable();
> +
> + while (!list_empty(&local_q)) {
Why not list_for_each_safe rather than a while?
> + } /* switch (command disposition) */
> + } /* while (local queue is not emtpy) */
> +} /* end scsi_softirq() */
>
You should get rid of the comments after the }'s.
-- Patrick Mansfield
prev parent reply other threads:[~2003-03-08 1:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-07 23:55 [PATCH] softirq queue is now list_head, eliminate bh_next Luben Tuikov
2003-03-08 0:15 ` Luben Tuikov
2003-03-08 1:43 ` Patrick Mansfield [this message]
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=20030307174324.A3372@beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=luben@splentec.com \
/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