From: Jeff Garzik <jeff@garzik.org>
To: Alan <alan@lxorguk.ukuu.org.uk>, benh@kernel.crashing.org
Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp>,
linux-ide@vger.kernel.org, linuxppc-dev@ozlabs.org,
kou.ishizaki@toshiba.co.jp, arnd@arndb.de, paulus@samba.org,
linas@austin.ibm.com
Subject: Re: [PATCH 2/4] libata-core.c: add another IRQ calls
Date: Tue, 16 Jan 2007 17:04:27 -0500 [thread overview]
Message-ID: <45AD4BEB.4070507@garzik.org> (raw)
In-Reply-To: <20070116120335.59b4491d@localhost.localdomain>
Alan wrote:
> Jeff - at some point we could eliminate a lot of the NULL checks like
> these by having the registration code fill in the defaults where
> appropriate ?
libata policy up until this point has been to require all drivers fill
in the hook, either with the commonly-used default, or with their own
variant. Thus, no NULL checks for required hooks, and you get an oops
if you fail this requirement. I like that better than defaults buried
inside libata-core, where it is easier for programmers to forget them.
But actually, it's an open question for the compiler guys whether this
case is preferred:
if (ap->ops->hook)
ap->ops->hook(foo, bar);
else
commonly_used_default(foo, bar);
or this:
ap->ops->hook(foo, bar);
With advanced branch prediction in modern CPUs, ISTR the first case may
be worth considering, even with the branch.
If the second case is preferred, then Akira should make a bombing run
through each driver, applying the patch
+ .irq_on = ata_irq_on
No NULL checks or registration code bother, in that case.
Comments welcome...
Jeff
WARNING: multiple messages have this Message-ID (diff)
From: Jeff Garzik <jeff@garzik.org>
To: Alan <alan@lxorguk.ukuu.org.uk>, benh@kernel.crashing.org
Cc: arnd@arndb.de, linuxppc-dev@ozlabs.org,
linux-ide@vger.kernel.org, paulus@samba.org
Subject: Re: [PATCH 2/4] libata-core.c: add another IRQ calls
Date: Tue, 16 Jan 2007 17:04:27 -0500 [thread overview]
Message-ID: <45AD4BEB.4070507@garzik.org> (raw)
In-Reply-To: <20070116120335.59b4491d@localhost.localdomain>
Alan wrote:
> Jeff - at some point we could eliminate a lot of the NULL checks like
> these by having the registration code fill in the defaults where
> appropriate ?
libata policy up until this point has been to require all drivers fill
in the hook, either with the commonly-used default, or with their own
variant. Thus, no NULL checks for required hooks, and you get an oops
if you fail this requirement. I like that better than defaults buried
inside libata-core, where it is easier for programmers to forget them.
But actually, it's an open question for the compiler guys whether this
case is preferred:
if (ap->ops->hook)
ap->ops->hook(foo, bar);
else
commonly_used_default(foo, bar);
or this:
ap->ops->hook(foo, bar);
With advanced branch prediction in modern CPUs, ISTR the first case may
be worth considering, even with the branch.
If the second case is preferred, then Akira should make a bombing run
through each driver, applying the patch
+ .irq_on = ata_irq_on
No NULL checks or registration code bother, in that case.
Comments welcome...
Jeff
next prev parent reply other threads:[~2007-01-16 22:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-16 10:46 [PATCH 2/4] libata-core.c: add another IRQ calls Akira Iguchi
2007-01-16 12:03 ` Alan
2007-01-16 12:03 ` Alan
2007-01-16 22:04 ` Jeff Garzik [this message]
2007-01-16 22:04 ` Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2007-01-17 9:24 Mikael Pettersson
2007-01-17 9:24 ` Mikael Pettersson
2007-01-17 16:49 ` Jeff Garzik
2007-01-17 16:49 ` Jeff Garzik
2007-01-17 20:31 ` Mikael Pettersson
2007-01-17 20:31 ` Mikael Pettersson
2007-01-18 0:55 ` Akira Iguchi
2007-01-25 1:17 ` Jeff Garzik
2007-01-25 1:17 ` Jeff Garzik
2007-01-18 0:55 ` Akira Iguchi
2007-01-16 10:46 Akira Iguchi
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=45AD4BEB.4070507@garzik.org \
--to=jeff@garzik.org \
--cc=akira2.iguchi@toshiba.co.jp \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=kou.ishizaki@toshiba.co.jp \
--cc=linas@austin.ibm.com \
--cc=linux-ide@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/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.