public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Can Linux live without DMA zone?
@ 2006-11-02  2:15 Jun Sun
  2006-11-02  9:16 ` Arjan van de Ven
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Jun Sun @ 2006-11-02  2:15 UTC (permalink / raw)
  To: linux-kernel


I am trying to reserve a block of memory (>16MB) starting from 0 and hide it 
from kernel.  A consequence is that DMA zone now has size 0.  That causes
many drivers to grief (OOMs).

I see two ways out:

1. Modify individual drivers and convince them not to alloc with GFP_DMA.
   I have been trying to do this but do not seem to see an end of it.  :)

2. Simply lie and increase MAX_DMA_ADDRESS to really big (like 1GB) so that
   the whole memory region belongs to DMA zone.

#2 sounds pretty hackish.  I am sure something bad will happen
sooner or later (like what?). But so far it appears to be working fine.

The fundamental question is: Has anybody tried to run Linux without 0 sized
DMA zone before?  Am I doing something that nobody has done before (which is
something really hard to believe these days with Linux :P)?

Cheers.

Jun

^ permalink raw reply	[flat|nested] 20+ messages in thread
* RE: Can Linux live without DMA zone?
@ 2006-11-02  3:43 Conke Hu
  2006-11-02  7:13 ` Peter Zijlstra
  0 siblings, 1 reply; 20+ messages in thread
From: Conke Hu @ 2006-11-02  3:43 UTC (permalink / raw)
  To: Jun Sun, linux-kernel

It seems a good idea.
Is dma zone is still necessay on most modern computers?

Best regards,
Conke @ AMD, Inc.

-----Original Message-----
From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Jun Sun
Sent: 2006年11月2日 10:16
To: linux-kernel@vger.kernel.org
Subject: Can Linux live without DMA zone?


I am trying to reserve a block of memory (>16MB) starting from 0 and hide it 
from kernel.  A consequence is that DMA zone now has size 0.  That causes
many drivers to grief (OOMs).

I see two ways out:

1. Modify individual drivers and convince them not to alloc with GFP_DMA.
   I have been trying to do this but do not seem to see an end of it.  :)

2. Simply lie and increase MAX_DMA_ADDRESS to really big (like 1GB) so that
   the whole memory region belongs to DMA zone.

#2 sounds pretty hackish.  I am sure something bad will happen
sooner or later (like what?). But so far it appears to be working fine.

The fundamental question is: Has anybody tried to run Linux without 0 sized
DMA zone before?  Am I doing something that nobody has done before (which is
something really hard to believe these days with Linux :P)?

Cheers.

Jun
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/




^ permalink raw reply	[flat|nested] 20+ messages in thread
* RE: Can Linux live without DMA zone?
@ 2006-11-02 10:33 Conke Hu
  2006-11-02 10:51 ` Arjan van de Ven
  2006-11-02 13:09 ` Alan Cox
  0 siblings, 2 replies; 20+ messages in thread
From: Conke Hu @ 2006-11-02 10:33 UTC (permalink / raw)
  To: Arjan van de Ven, Jun Sun; +Cc: linux-kernel

Most PCs do not have ISA or floppy, so maybe we could add an option to enable DMA zone or not.

Best regards,
Conke @ AMD, Inc.

-----Original Message-----
From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Arjan van de Ven
Sent: 2006年11月2日 17:16
To: Jun Sun
Cc: linux-kernel@vger.kernel.org
Subject: Re: Can Linux live without DMA zone?

On Wed, 2006-11-01 at 18:15 -0800, Jun Sun wrote:
> I am trying to reserve a block of memory (>16MB) starting from 0 and hide it 
> from kernel.  A consequence is that DMA zone now has size 0.  That causes
> many drivers to grief (OOMs).
> 
> I see two ways out:
> 
> 1. Modify individual drivers and convince them not to alloc with GFP_DMA.
>    I have been trying to do this but do not seem to see an end of it.  :)
> 
> 2. Simply lie and increase MAX_DMA_ADDRESS to really big (like 1GB) so that
>    the whole memory region belongs to DMA zone.
> 
> #2 sounds pretty hackish.  I am sure something bad will happen
> sooner or later (like what?). But so far it appears to be working fine.
> 
> The fundamental question is: Has anybody tried to run Linux without 0 sized
> DMA zone before?  Am I doing something that nobody has done before (which is
> something really hard to believe these days with Linux :P)?

on a PC there are still devices that need memory in the lower 16Mb.....
(like floppy)

Maybe you should reserve another area of memory instead!


-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/




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

end of thread, other threads:[~2006-11-06  2:19 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-02  2:15 Can Linux live without DMA zone? Jun Sun
2006-11-02  9:16 ` Arjan van de Ven
2006-11-02 10:32 ` Paul Mundt
2006-11-02 16:32 ` Phillip Susi
2006-11-02 16:57   ` Arjan van de Ven
2006-11-02 19:08     ` Phillip Susi
2006-11-02 20:10       ` Arjan van de Ven
2006-11-02 21:26         ` Phillip Susi
2006-11-02 22:19           ` Arjan van de Ven
2006-11-02 23:17             ` Jun Sun
2006-11-02 23:24               ` Stephen Hemminger
2006-11-06  2:19               ` Phillip Susi
2006-11-03 17:54             ` Krzysztof Halasa
2006-11-02 18:02   ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2006-11-02  3:43 Conke Hu
2006-11-02  7:13 ` Peter Zijlstra
2006-11-02 16:13   ` Christoph Lameter
2006-11-02 10:33 Conke Hu
2006-11-02 10:51 ` Arjan van de Ven
2006-11-02 13:09 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox