public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Luben Tuikov <luben@splentec.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] SCSI Core patches
Date: Fri, 10 Jan 2003 15:05:09 -0500	[thread overview]
Message-ID: <200301102005.h0AK59x04828@localhost.localdomain> (raw)
In-Reply-To: Message from Luben Tuikov <luben@splentec.com> of "Fri, 10 Jan 2003 14:23:24 EST." <3E1F1DAC.6060207@splentec.com>

luben@splentec.com said:
> I think that the slab cache can acknowledge a GFP_DMA flag even after
> creation of the slab, but not 100% sure on this. I.e. in
> scsi_get_command() a check of host->unchecked_isa_dma can be performed
> and the kmem_flags OR-ed with GFP_DMA.

Unfortunately, not.  That's why the kmem caches that are used by kmalloc have 
two separate caches for each buddy size (one for zone normal and one for zone 
dma)---you see this in cat /proc/slabinfo.

The essential problem is that the zone flags must be known at the time slab 
gets fed from __get_free_pages().

> I've no problem changing the slab alloc. just let's decide if we want
> a slab per host (kind of inefficient) or 2 slabs (DMA, and non-DMA) or
> OR-ing the mask upon scsi_get_command(). 

The latter, I think.  We want the *ability* to have one slab per host, but 
we'd then assign each host either to the zone DMA or zone normal allocator.  
Then, when the wierd device that has a strange dma_mask comes along, it may 
use its own slab if necessary.

> Actually, I had this in the 2.5.52 version of this patch but decided
> that the LLDD code will run as normal kernel code and that the actual
> PCI HOST will never have to access the struct scsi_cmnd directly over
> the PCI bus; but will only need to access the sg list. For this reason
> I decided to leave it out. I.e. struct scsi_cmnd will alway be
> accessed in normal operation of the kernel, and thus no need for
> GFP_DMA. (I'd so much rather it be that way, so much... :-) 

I'd be happy about this too.  Just assure me that no legacy ISA drivers do dma 
from the Scsi_Cmnd structure and we can forget about the separate allocators 
and revoke the current promise that Scsi_Cmnd will be in memory dma'able by 
the driver.

James



  reply	other threads:[~2003-01-10 20:05 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-07 13:56 [PATCH] SCSI Core patches Luben Tuikov
2003-01-07 18:21 ` Patrick Mansfield
2003-01-07 19:23   ` Luben Tuikov
2003-01-07 20:33     ` Patrick Mansfield
2003-01-07 22:14       ` Luben Tuikov
2003-01-08  1:36         ` Patrick Mansfield
2003-01-08  5:13           ` Luben Tuikov
2003-01-11 18:12           ` Christoph Hellwig
2003-01-13 20:33             ` Patrick Mansfield
2003-01-13 21:30               ` Luben Tuikov
2003-01-14 18:49                 ` Patrick Mansfield
2003-01-14 19:52                   ` Luben Tuikov
2003-01-07 19:44   ` Doug Ledford
2003-01-07 22:53     ` Patrick Mansfield
2003-01-08 17:33       ` Luben Tuikov
2003-01-08 21:13         ` Mike Anderson
2003-01-10 12:35           ` Andre Hedrick
2003-01-10 17:06           ` James Bottomley
2003-01-10 19:23             ` Luben Tuikov
2003-01-10 20:05               ` James Bottomley [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-14 16:19 Martin Peschke3
2003-01-14 16:51 ` Tony Battersby
2003-01-14 18:56 ` Patrick Mansfield
2003-01-14 20:01 Martin Peschke3
2003-01-14 20:17 ` Patrick Mansfield
2003-01-14 20:37 Martin Peschke3
2003-01-14 21:27 ` Patrick Mansfield
2003-01-14 21:29 Martin Peschke3
2003-01-14 22:16 ` Patrick Mansfield
2003-01-15 15:35 Martin Peschke3
2003-01-15 15:52 ` James Bottomley
2003-01-15 17:12   ` Mike Anderson
2003-01-15 17:40     ` Luben Tuikov

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=200301102005.h0AK59x04828@localhost.localdomain \
    --to=james.bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luben@splentec.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox