From: "J.E.J. Bottomley" <James.Bottomley@steeleye.com>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: andmike@us.ibm.com, hch@lst.de, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] get rid of ->detect for upper layer drivers
Date: Thu, 07 Nov 2002 13:08:45 -0500 [thread overview]
Message-ID: <200211071808.gA7I8jf04237@localhost.localdomain> (raw)
In-Reply-To: Message from "Adam J. Richter" <adam@yggdrasil.com> of "Thu, 07 Nov 2002 09:47:45 PST." <200211071747.JAA29988@adam.yggdrasil.com>
adam@yggdrasil.com said:
> I would prefer bus_type.match because it slightly reduces the
> overhead of another patch that I posted to the generic device code:
> two fields in struct device_driver for having the generic device layer
> do the initial kmalloc and dma_alloc_consistent for the device (and do
> the failure if these allocations fail). This can greatly reduce the
> number of rarely tested error branches (e.g., alloc_disk failure in
> st.c does not free buffer) because of the number of drivers that can
> be cleaned up a bit by it: hundreds of drivers, thousands of lines of
> code.
This worries me: dma_alloc_consistent will always fail on fully incoherent
architectures (like some PA-RISC ones), then you have to fall back to doing
the writeback, invalidates in the driver (which we can't abstract out because
the only the driver knows the sync points). You can't really treat
dma_alloc_consistent failure as anything other than an indication that you
have to use a different dma access method.
Since dma_alloc_consistent cannot properly fail on an x86 (unless
__get_free_pages does), do we really want to clutter up the main line with
lots of fallbacks that would be useless on the predominant architecture?
James
next prev parent reply other threads:[~2002-11-07 18:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-07 17:47 [PATCH] get rid of ->detect for upper layer drivers Adam J. Richter
2002-11-07 18:08 ` J.E.J. Bottomley [this message]
2002-11-07 18:56 ` Mike Anderson
-- strict thread matches above, loose matches on Subject: below --
2002-11-07 18:42 Adam J. Richter
2002-11-07 19:02 ` J.E.J. Bottomley
2002-11-07 18:30 Adam J. Richter
2002-11-07 16:22 Adam J. Richter
2002-11-07 16:16 Adam J. Richter
[not found] <200211071532.HAA21625@freya.yggdrasil.com>
2002-11-07 15:42 ` Christoph Hellwig
2002-11-07 16:27 ` Mike Anderson
2002-11-07 12:25 Adam J. Richter
2002-11-07 14:25 ` Mike Anderson
2002-11-07 15:39 ` Christoph Hellwig
2002-11-07 15:50 ` J.E.J. Bottomley
2002-11-07 15:53 ` Christoph Hellwig
2002-11-07 19:44 ` Patrick Mansfield
2002-11-07 15:36 ` Christoph Hellwig
2002-11-07 2:49 Christoph Hellwig
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=200211071808.gA7I8jf04237@localhost.localdomain \
--to=james.bottomley@steeleye.com \
--cc=adam@yggdrasil.com \
--cc=andmike@us.ibm.com \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox