linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Query regarding modifying the DMA Mask based on the available memory in the system
@ 2008-04-17  8:40 Prakash, Sathya
  2008-04-17  8:43 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Prakash, Sathya @ 2008-04-17  8:40 UTC (permalink / raw)
  To: linux-scsi; +Cc: James Bottomley

Hi All,
Currently the MPT Fusion drivers set DMA Mask to 64 bit if the
architecture of the system is 64bit and if the hardware supports 64 bit
DMA address. 
Also in all 64 bit systems the fusion drivers use SGESimple64_t to send
scatter gather elements to firmware. 

Even with 64 bit systems which has available memory less than 4GB the
SGESimple64_t is used, to increase the performance I am thinking of
modifying the driver to check the system memory in the system using the
function si_meminfo() and if the memory is less than 4GB, then the
driver will set the 32 bit DMA mask and will use SGESimple32_t to send
the SGE to firmware. 

I am not sure whether this change works fine? I couldn't see any SCSI
driver using the si_meminfo and this function seems not to return the
physical layout of the memory. 

Thanks
Sathya



^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Query regarding modifying the DMA Mask based on the available memory in the system
@ 2008-04-17 17:36 Prakash, Sathya
  0 siblings, 0 replies; 10+ messages in thread
From: Prakash, Sathya @ 2008-04-17 17:36 UTC (permalink / raw)
  To: Andi Kleen, James Bottomley; +Cc: linux-scsi

Thanks everyone. 
I will use the dma_get_required_mask() for deciding fusion's descriptor
format

-----Original Message-----
From: Andi Kleen [mailto:andi@firstfloor.org] 
Sent: Thursday, April 17, 2008 9:41 PM
To: James Bottomley
Cc: Prakash, Sathya; linux-scsi@vger.kernel.org
Subject: Re: Query regarding modifying the DMA Mask based on the
available memory in the system

James Bottomley wrote:
> 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.

You were right sorry, I misread the code. Your interpretation is
correct. The interface would be correct to use for fusion, although it
should be probably extended to IOMMUs too.

-Andi


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-04-17 17:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-04-17 16:10           ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2008-04-17 17:36 Prakash, Sathya

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).