* Re: [RFC 0/8] Optional ZONE_DMA
[not found] <fa.3mXwB3pXW7L2KpeFW2PO8SBLhJA@ifi.uio.no>
@ 2006-07-08 17:59 ` Robert Hancock
2006-07-09 3:21 ` Christoph Lameter
2006-07-10 0:02 ` Andi Kleen
0 siblings, 2 replies; 4+ messages in thread
From: Robert Hancock @ 2006-07-08 17:59 UTC (permalink / raw)
To: Christoph Lameter
Cc: linux-kernel, Nick Piggin, Christoph Hellwig, Marcelo Tosatti,
Arjan van de Ven, Martin Bligh, KAMEZAWA Hiroyuki, Andi Kleen
Christoph Lameter wrote:
> Optional ZONE_DMA
>
> ZONE_DMA is usually used for ISA DMA devices. Typically modern hardware
> does not have any of these anymore. We frequently do not need
> the zone anymore.
>
> This patch allows to make the configuration of the kernel for
> ZONE_DMA dependend on the user choosing to support ISA DMA.
> If ISA DMA is not supported then i386 systems f.e. can be
> configured using a single ZONE_NORMAL. The overhead of maintaining
> multiple zones and balancing page use between the different
> zone is then gone. My i386 system now runs with a single zone.
>
> On x86_64 systems also usually we do not need ZONE_DMA since there
> are barely any ISA DMA devices around (or are you still using a floppy?).
> So for most cases the zone can be dropped. Also if the x86_64 systems
> has less than 4G RAM or DMA controllers that actually can do 64 bit
> then we also do not need ZONE_DMA32. My x86_64 system has 1G of
> memory therefore I can run with a single zone.
Keep in mind that:
-LPC devices like the floppy controller, maybe enhanced parallel, etc.
may have 24-bit DMA restrictions even if there is no physical ISA bus.
-Even in totally ISA and LPC-free systems, some PCI devices (like those
that were a quick hack of an ISA device onto PCI) still have 24-bit
address restrictions. There are other devices that have sub-32-bit DMA
capabilities, like Broadcom wireless chips that only address 31 bits
(although I think they are fixing this in the driver). Without the DMA
zone there is no way to ensure that these requests can be satisfied.
So I don't think it is safe to make this conditional on ISA or even the
ISA DMA API. Only if all devices on the system have addressing
capability of a full 32 bits (or at least of all installed RAM) can this
zone be removed.
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RFC 0/8] Optional ZONE_DMA
2006-07-08 17:59 ` [RFC 0/8] Optional ZONE_DMA Robert Hancock
@ 2006-07-09 3:21 ` Christoph Lameter
2006-07-10 0:02 ` Andi Kleen
1 sibling, 0 replies; 4+ messages in thread
From: Christoph Lameter @ 2006-07-09 3:21 UTC (permalink / raw)
To: Robert Hancock
Cc: linux-kernel, Nick Piggin, Christoph Hellwig, Marcelo Tosatti,
Arjan van de Ven, Martin Bligh, KAMEZAWA Hiroyuki, Andi Kleen
On Sat, 8 Jul 2006, Robert Hancock wrote:
> -LPC devices like the floppy controller, maybe enhanced parallel, etc. may
> have 24-bit DMA restrictions even if there is no physical ISA bus.
Yes, I noticed that the floppy drivers has no dependency set but fails
to build if GENERIC_ISA_DMA is not set.
> -Even in totally ISA and LPC-free systems, some PCI devices (like those that
> were a quick hack of an ISA device onto PCI) still have 24-bit address
> restrictions. There are other devices that have sub-32-bit DMA capabilities,
> like Broadcom wireless chips that only address 31 bits (although I think they
> are fixing this in the driver). Without the DMA zone there is no way to ensure
> that these requests can be satisfied.
These all have to use GFP_DMA and/or GFP_DMA. So if I leave that flag
undefined then it will be obvious if something is amiss and we can leave
this experimental for awhile.
> So I don't think it is safe to make this conditional on ISA or even the ISA
> DMA API. Only if all devices on the system have addressing capability of a
> full 32 bits (or at least of all installed RAM) can this zone be removed.
Its safe in the sense that compilation/linking will fail (ISA dma chip
control functions are not present). Some of the dependencies set right now
do not correctly express these dependencies. But this could be fixed.
The question is though: Is it worth to do now? Or do we do this later? At
some point the legacy DMA I/O will become too much of a bother.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC 0/8] Optional ZONE_DMA
2006-07-08 17:59 ` [RFC 0/8] Optional ZONE_DMA Robert Hancock
2006-07-09 3:21 ` Christoph Lameter
@ 2006-07-10 0:02 ` Andi Kleen
1 sibling, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2006-07-10 0:02 UTC (permalink / raw)
To: Robert Hancock
Cc: Christoph Lameter, linux-kernel, Nick Piggin, Christoph Hellwig,
Marcelo Tosatti, Arjan van de Ven, Martin Bligh,
KAMEZAWA Hiroyuki
> > On x86_64 systems also usually we do not need ZONE_DMA since there
> > are barely any ISA DMA devices around (or are you still using a floppy?).
> > So for most cases the zone can be dropped. Also if the x86_64 systems
> > has less than 4G RAM or DMA controllers that actually can do 64 bit
> > then we also do not need ZONE_DMA32. My x86_64 system has 1G of
> > memory therefore I can run with a single zone.
>
> Keep in mind that:
Yes we can't really make it optional. There are reasons to use GFP_DMA
even without ISA. Also on x86-64 CONFIG_ISA is never set so it would
completely eliminate GFP_DMA, which we can't do.
That said however nearly users of GFP_DMA outside arch/* are wrong.
They should be all audited and convered to use the PCI DMA API instead.
> -LPC devices like the floppy controller, maybe enhanced parallel, etc.
> may have 24-bit DMA restrictions even if there is no physical ISA bus.
>
> -Even in totally ISA and LPC-free systems, some PCI devices (like those
> that were a quick hack of an ISA device onto PCI) still have 24-bit
> address restrictions. There are other devices that have sub-32-bit DMA
> capabilities, like Broadcom wireless chips that only address 31 bits
> (although I think they are fixing this in the driver). Without the DMA
> zone there is no way to ensure that these requests can be satisfied.
There are also devices with 31 or 30 bits that also fall back to GFP_DMA
and a couple of other cases.
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
* [RFC 0/8] Optional ZONE_DMA
@ 2006-07-08 0:05 Christoph Lameter
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Lameter @ 2006-07-08 0:05 UTC (permalink / raw)
To: linux-kernel
Cc: Nick Piggin, Christoph Hellwig, Marcelo Tosatti, Arjan van de Ven,
Martin Bligh, Christoph Lameter, KAMEZAWA Hiroyuki, Andi Kleen
Optional ZONE_DMA
ZONE_DMA is usually used for ISA DMA devices. Typically modern hardware
does not have any of these anymore. We frequently do not need
the zone anymore.
This patch allows to make the configuration of the kernel for
ZONE_DMA dependend on the user choosing to support ISA DMA.
If ISA DMA is not supported then i386 systems f.e. can be
configured using a single ZONE_NORMAL. The overhead of maintaining
multiple zones and balancing page use between the different
zone is then gone. My i386 system now runs with a single zone.
On x86_64 systems also usually we do not need ZONE_DMA since there
are barely any ISA DMA devices around (or are you still using a floppy?).
So for most cases the zone can be dropped. Also if the x86_64 systems
has less than 4G RAM or DMA controllers that actually can do 64 bit
then we also do not need ZONE_DMA32. My x86_64 system has 1G of
memory therefore I can run with a single zone.
SGI's ia64 systems only use one zone. A numa system with a single
zone will have one zone per node which makes the association between
nodes and zones simpler.
This patchset is build on top of the "Reduce Zones" patchset V1 that was
posted earlier today. It will make ZONE_DMA configurable like
the other zones. Then it introduces a SINGLE_ZONE macro that is set
if the system has only a single zone.
Single zone systems do no need the loops over all zones. We can also return
constants for a lot of important VM macros. Finally the policy zone
determination in the mempolicy layer becomes trivial.
Note that this is an RFC only. In order for this to work cleanly we need to
mark all device drives according to what type of DMA controller they support.
If its a ISA DMA controller then we would need to enable ZONE_DMA. If its
a 32 bit controller and we support >4G of memory then we need to enable ZONE_DMA32.
This was tested on i386 and x86_64 in UP and SMP mode.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-10 0:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <fa.3mXwB3pXW7L2KpeFW2PO8SBLhJA@ifi.uio.no>
2006-07-08 17:59 ` [RFC 0/8] Optional ZONE_DMA Robert Hancock
2006-07-09 3:21 ` Christoph Lameter
2006-07-10 0:02 ` Andi Kleen
2006-07-08 0:05 Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox