linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: "Prakash, Sathya" <Sathya.Prakash@lsi.com>, linux-scsi@vger.kernel.org
Subject: Re: Query regarding modifying the DMA Mask based on the available memory in the system
Date: Thu, 17 Apr 2008 10:36:47 -0500	[thread overview]
Message-ID: <1208446607.3150.16.camel@localhost.localdomain> (raw)
In-Reply-To: <4807678A.8020906@firstfloor.org>

On Thu, 2008-04-17 at 17:06 +0200, Andi Kleen wrote:
> James Bottomley wrote:
> > On Thu, 2008-04-17 at 16:44 +0200, Andi Kleen wrote:
> >>> For drivers that can alter their descriptor types, we have this
> >>> function:
> >>>
> >>> dma_get_required_mask()
> >> Are you sure we have it? It seems to be in drivers/base/platform.c
> >> conditional on ARCH_HAS_DMA_GET_REQUIRED_MASK, but according to my
> >> grep no architecture ever sets that flag.
> > 
> > Yes ... positive.  That's the default and correct implementation based
> > on the largest addressable physical memory.
> 
> Ok but still the whole thing is completely useless right now.

Why?  At least for aic it performs as advertised: allows the driver to
select the most efficient descriptor format.

> >> I don't think it would be very hard to implement on x86 at least,
> >> mind you. Just nobody seems to have done it so far.
> > 
> > Really, only machines with IOMMUs that want to restrict this need
> > implement it. 
> 
> I don't think so. For once in the scenario described by the original
> poster it makes some sense even without IOMMU.

OK, perhaps I don't understand something then:  The fusion is
essentially similar to the aic except it doesn't have the 39 bit packed
descriptor format, so it wants to use the 32 bit format (which is
faster) if no physical memory will be over 4GB.  That's what the
dma_get_required_mask() was exactly designed for and how it is currently
being used.

If a machine has no iommu how can the required mask be different from
the lowest mask that will reach all of physical memory?

James



  reply	other threads:[~2008-04-17 15:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17  8:40 Query regarding modifying the DMA Mask based on the available memory in the system Prakash, Sathya
2008-04-17  8:43 ` David Miller
2008-04-17 10:06 ` Andi Kleen
2008-04-17 14:18 ` James Bottomley
2008-04-17 14:44   ` Andi Kleen
2008-04-17 15:03     ` James Bottomley
2008-04-17 15:06       ` Andi Kleen
2008-04-17 15:36         ` James Bottomley [this message]
2008-04-17 16:10           ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2008-04-17 17:36 Prakash, Sathya

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=1208446607.3150.16.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=Sathya.Prakash@lsi.com \
    --cc=andi@firstfloor.org \
    --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;
as well as URLs for NNTP newsgroup(s).