From: Boaz Harrosh <bharrosh@panasas.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>,
James Bottomley <James.Bottomley@SteelEye.com>,
Matthew Wilcox <willy@linux.intel.com>,
achim_leubner@adaptec.com,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 10/16] gdth: gdth_get_status() return pointer to host not its index
Date: Tue, 02 Oct 2007 13:04:23 +0200 [thread overview]
Message-ID: <470225B7.9010204@panasas.com> (raw)
In-Reply-To: <20070930212628.GC13343@infradead.org>
On Sun, Sep 30 2007 at 23:26 +0200, Christoph Hellwig <hch@infradead.org> wrote:
> On Sun, Sep 30, 2007 at 10:09:20PM +0200, Boaz Harrosh wrote:
>> - Return the interrupting host and not it's index.
>> NULL if intr is not by gdth.
>> - fix calling site
>>
>> FIXME:
>> Why are we looping on all cards? the passed dev_id
>> can be used for pinpointing the exact interrupting
>> card. The kernel is already looping on all sharing
>> cards so this code makes it O(n^2).
>
> This is just pre-historic code that makes no sense whatover in a modern
> kernel. I'd much prefer to stop doing this and use dev_id properly.
>
OK I'm attempting just that but please look in with me on the code
I have some questions.
>> What is that polling mode? can we pass dev_id to
>> gdth_get_status() and do a poll only if dev_id is
>> NULL?
>
> Just loop over all host adapters in gdth_wait instead and pass in the
> ha pointer.
>
[Issue 1]
In gdth_get_status() the first check is if(ha->irq == passed_in_irq)
if not than no status read is attempted and 0 is returned. In this
case gdth_interrupt() will return with out doing any advancement of states.
Now gdth_wait() calls with gdth_interrupt(ha->irq, ha) so it means that in
effect current code will loop on all devices but will actually read the status
of only the waiting on card.
[Q1] So am I safe in just dropping the loop even from gdth_wait() ?
[Q2] When gdth_interrupt() is called by the kernel am I guaranteed that irq will
match the ha->irq that is passed as dev_id? (Since that is what I registered
as my interrupt routine)
[Issue 2]
In gdth_wait() and gdth_interrupt() the globals
"gdth_from_wait", "wait_hanum" and "wait_index" give me the creeps.
We are talking about hotplug API and proper lucking of adapter's list
and this thing is just plain don't work with more than one card.
[Q1] Do you understand all that business with gdth_polling and gdth_wait()?
It looks like if you do gdth_polling==true than you can have only one
card. Is that true?
[Q2] Should I fix that? I thought of doing a __gdth_interrupt() that is called
by gdth_interrupt() and passes all these members on the stack as parameters
to __gdth_interrupt().
(Actually most of them will be dropped they will not be needed)
Boaz
next prev parent reply other threads:[~2007-10-02 11:04 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-30 19:44 [RFC 0/16] gdth combined patchset & call for testers Boaz Harrosh
2007-09-30 19:50 ` [PATCH 1/16] gdth: split out isa probing Boaz Harrosh
2007-10-02 17:17 ` Rolf Eike Beer
2007-10-03 16:00 ` Jeff Garzik
2007-09-30 19:50 ` [PATCH 2/16] gdth: split out eisa probing Boaz Harrosh
2007-10-02 17:20 ` Rolf Eike Beer
2007-10-03 17:27 ` Christoph Hellwig
2007-10-03 17:32 ` Rolf Eike Beer
2007-10-03 17:38 ` Christoph Hellwig
2007-10-03 17:59 ` Jeff Garzik
2007-10-03 18:05 ` Christoph Hellwig
2007-10-03 18:07 ` Jeff Garzik
2007-09-30 19:55 ` [PATCH 3/16] gdth: split out pci probing Boaz Harrosh
2007-09-30 19:57 ` [PATCH 4/16] gdth: Remove 2.4.x support, in-kernel changelog Boaz Harrosh
2007-09-30 19:58 ` [PATCH 5/16] gdth: kill gdth_{read,write}[bwl] wrappers Boaz Harrosh
2007-09-30 19:59 ` [PATCH 6/16] Reorder scsi_host_template intitializers Boaz Harrosh
2007-09-30 20:01 ` [PATCH 7/16] gdth: make some virt ctrlr code common Boaz Harrosh
2007-09-30 21:22 ` Christoph Hellwig
2007-09-30 20:03 ` [PATCH 8/16] gdth: Remove virt hosts Boaz Harrosh
2007-09-30 20:06 ` [PATCH 9/16] gdth: clean up host private data Boaz Harrosh
2007-09-30 21:23 ` Christoph Hellwig
2007-09-30 20:09 ` [PATCH 10/16] gdth: gdth_get_status() return pointer to host not its index Boaz Harrosh
2007-09-30 21:26 ` Christoph Hellwig
2007-10-02 11:04 ` Boaz Harrosh [this message]
2007-10-02 11:10 ` Boaz Harrosh
2007-09-30 20:10 ` [PATCH 11/16] gdth: switch to modern scsi host registration Boaz Harrosh
2007-09-30 20:12 ` [PATCH 12/16] gdth: Remove gdth_ctr_tab[] Boaz Harrosh
2007-09-30 20:13 ` [PATCH 13/16] gdth: Make one abuse of scsi_cmnd less obvious Boaz Harrosh
2007-09-30 21:28 ` Christoph Hellwig
2007-09-30 23:21 ` Matthew Wilcox
2007-10-01 13:56 ` Boaz Harrosh
2007-10-01 14:23 ` Jeff Garzik
2007-09-30 20:14 ` [PATCH 14/16] gdth: Setup proper per-command private data Boaz Harrosh
2007-09-30 20:16 ` [PATCH 15/16] gdth: Move members from SCp to gdth_cmndinfo, stage 2 Boaz Harrosh
2007-10-02 18:02 ` Rolf Eike Beer
2007-10-03 18:15 ` Christoph Hellwig
2007-09-30 20:17 ` [PATCH 16/16] gdth: !use_sg cleanup and use of scsi accessors Boaz Harrosh
2007-10-01 14:06 ` Boaz Harrosh
2007-10-01 14:19 ` [PATCH 16/16 ver2] " Boaz Harrosh
2007-09-30 21:00 ` [RFC 0/16] gdth combined patchset & call for testers Jeff Garzik
2007-09-30 21:07 ` Jeff Garzik
2007-09-30 21:36 ` Christoph Hellwig
2007-09-30 22:53 ` Jeff Garzik
2007-09-30 21:27 ` Jeff Garzik
2007-10-01 14:29 ` Boaz Harrosh
2007-09-30 21:33 ` Christoph Hellwig
2007-09-30 22:53 ` Jeff Garzik
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=470225B7.9010204@panasas.com \
--to=bharrosh@panasas.com \
--cc=James.Bottomley@SteelEye.com \
--cc=achim_leubner@adaptec.com \
--cc=hch@infradead.org \
--cc=jeff@garzik.org \
--cc=linux-scsi@vger.kernel.org \
--cc=willy@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.