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] [3/21] Pass gfp to scsi_allocate_command
Date: Sun, 16 Nov 2008 23:21:17 +0100	[thread overview]
Message-ID: <20081116222117.GD6703@one.firstfloor.org> (raw)
In-Reply-To: <1226849345.3556.7.camel@localhost.localdomain>

On Sun, Nov 16, 2008 at 09:29:05AM -0600, James Bottomley wrote:
> On Sun, 2008-11-16 at 00:11 +0100, Andi Kleen wrote:
> > -static void scsi_put_host_cmd_pool(gfp_t gfp_mask)
> > +static void scsi_put_host_cmd_pool(struct Scsi_Host *shost)
> >  {
> >         struct scsi_host_cmd_pool *pool;
> >  
> >         mutex_lock(&host_cmd_pool_mutex);
> > -       pool = (gfp_mask & __GFP_DMA) ? &scsi_cmd_dma_pool :
> > +       pool = (shost && shost->unchecked_isa_dma) ?
> > &scsi_cmd_dma_pool :
> >                 &scsi_cmd_pool;
> 
> There's a conceptual problem with this:  The API is designed to be used
> on host setup (i.e. when allocating a host based command for the driver)
> so the scsi_host may not be available (or at least not fully set up)
> when this is called.

I think it wasn't a problem on the ISA drivers I changed.

> 
> What about making it take a mask instead?  That should always be known
> by the driver.

Ok. 

-Andi

  reply	other threads:[~2008-11-16 22:11 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 [this message]
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
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=20081116222117.GD6703@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