Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	axboe@kernel.dk, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] [6/21] Remove unchecked_isa_dma in advansys.c
Date: Sun, 16 Nov 2008 23:33:08 +0100	[thread overview]
Message-ID: <20081116223308.GF6703@one.firstfloor.org> (raw)
In-Reply-To: <1226854581.3556.14.camel@localhost.localdomain>

On Sun, Nov 16, 2008 at 11:56:21AM -0500, James Bottomley wrote:
> On Sun, 2008-11-16 at 00:11 +0100, Andi Kleen wrote:
> > That patch is a little more complicated than the others. advansys
> > was the only ISA driver who actually passed ->cmnd to the firmware.
> > So I implemented a simple own bounce buffer scheme for this case.
> > Also did sense_buffer bouncing in the driver while I was at it;
> > which means it doesn't require the mid layer to do this anymore.
> > 
> > - allocate hostdata with GFP_DMA separately for the ISA case
> > - Tell block layer explicitely to bounce for ISA case
> > - remove unchecked_isa_dma
> > 
> > Untested due to lack of hardware
> > 
> > v2: use dma api for all allocations
> 
> Just a minute:  this is another driver where you allocate coherent
> memory for the host structure but fail to use it for I/O as far as I can
> tell.
> 
> What's going on here?  If this is just a ploy to get GFP_DMA memory,
> then this isn't the way to do it.  Firstly, it doesn't seem to be needed

It's just that the structure was in GFP_DMA before due to unchecked_isa_dma
so I wanted to do a equivalent convertion

> and secondly, coherent memory is hard (or impossible) to manufacture on
> certain platforms.  You should only use it for DMA mailboxes and other
> register exchanges between the device and main memory ... expanding its
> use is asking for resource exhaustion.

It's not expanding it, in fact it lowers it because they allocate
less in GFP_DMA now than with unchecked_isa_dma (e.g. no more commands
and sense buffers)

-Andi

-- 
ak@linux.intel.com

  reply	other threads:[~2008-11-16 22:23 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-15 23:11 [PATCH] [0/21] Remove isa_unchecked_dma and some more GFP_DMAs in the mid layer v5 Andi Kleen
2008-11-15 23:11 ` [PATCH] [1/21] Add the alloc/get_pages_mask calls Andi Kleen
2008-11-15 23:11 ` [PATCH] [2/21] Add blk_q_mask Andi Kleen
2008-11-16 14:21   ` James Bottomley
2008-11-16 17:40     ` Theodore Tso
2008-11-16 22:19     ` Andi Kleen
2008-11-15 23:11 ` [PATCH] [3/21] Pass gfp to scsi_allocate_command Andi Kleen
2008-11-16 15:29   ` James Bottomley
2008-11-16 22:21     ` Andi Kleen
2008-11-15 23:11 ` [PATCH] [4/21] Add sense_buffer_isa to host template Andi Kleen
2008-11-15 23:11 ` [PATCH] [5/21] Remove unchecked_isa in BusLogic Andi Kleen
2008-11-16 15:46   ` James Bottomley
2008-11-16 22:31     ` Andi Kleen
2008-11-17 11:03       ` James Bottomley
2008-11-15 23:11 ` [PATCH] [6/21] Remove unchecked_isa_dma in advansys.c Andi Kleen
2008-11-16 16:56   ` James Bottomley
2008-11-16 22:33     ` Andi Kleen [this message]
2008-11-17 11:32       ` James Bottomley
2008-11-15 23:11 ` [PATCH] [7/21] Remove unchecked_isa_dma in gdth Andi Kleen
2008-11-15 23:11 ` [PATCH] [8/21] Remove unchecked_isa_dma in eata.c Andi Kleen
2008-11-15 23:11 ` [PATCH] [9/21] Remove unchecked_isa_dma in aha1542 Andi Kleen
2008-11-15 23:11 ` [PATCH] [10/21] Remove unchecked_isa_dma in aha152x/wd7000/sym53c416/u14-34f/NCR53c406a Andi Kleen
2008-11-15 23:11 ` [PATCH] [11/21] Remove GFP_DMA uses in st/osst Andi Kleen
2008-11-15 23:11 ` [PATCH] [12/21] Remove unchecked_isa_dma support for hostdata Andi Kleen
2008-11-15 23:11 ` [PATCH] [13/21] Use blk_q_mask/get_pages_mask in sg driver Andi Kleen
2008-11-16  2:11   ` Douglas Gilbert
2008-11-16 22:17     ` Andi Kleen
2008-11-17  5:11       ` FUJITA Tomonori
2008-11-17 10:22         ` Andi Kleen
2008-11-17 11:07           ` FUJITA Tomonori
2008-11-17 11:23             ` Andi Kleen
2008-11-17 11:22               ` FUJITA Tomonori
2008-11-17 11:43                 ` Andi Kleen
2008-11-17 11:47                   ` FUJITA Tomonori
2008-11-15 23:11 ` [PATCH] [14/21] Rely on block layer bouncing for ISA DMA devices scanning Andi Kleen
2008-11-15 23:11 ` [PATCH] [15/21] Don't disable direct_io for unchecked_isa_dma in st.c Andi Kleen
2008-11-15 23:11 ` [PATCH] [16/21] Remove automatic block layer bouncing for unchecked_isa_dma Andi Kleen
2008-11-15 23:11 ` [PATCH] [17/21] Remove GFP_DMA use in sr.c Andi Kleen
2008-11-15 23:11 ` [PATCH] [18/21] Remove unchecked_isa_dma from sysfs Andi Kleen
2008-11-15 23:11 ` [PATCH] [19/21] Switch to a single SCSI command pool Andi Kleen
2008-11-15 23:11 ` [PATCH] [20/21] Finally kill unchecked_isa_dma Andi Kleen
2008-11-15 23:11 ` [PATCH] [21/21] Convert DMA buffers in ch.c to allocate via the block layer Andi Kleen

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=20081116223308.GF6703@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=axboe@kernel.dk \
    --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