lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0705231011000.19822@schroedinger.engr.sgi.com>
Date:	Wed, 23 May 2007 10:15:10 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Russell King <rmk+lkml@....linux.org.uk>
cc:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	jens.axboe@...cle.com
Subject: Re: Define CONFIG_BOUNCE to avoid useless inclusion of bounce buffer
 logic.

On Wed, 23 May 2007, Russell King wrote:

> > That is wrong. ppc should have ZONE_NORMAL and no ZONE_DMA.
> > Otherwise you cannot switch off ZONE_DMA and you cannot switch off 
> > bounce. ZONE_DMA is a zone for exceptional allocs. If you do not have 
> > those then you only have normal allocs -> ZONE_NORMAL.
> 
> That sounds very wrong to me.  Since about 1995 ARM has always placed
> all DMA-able memory in the DMA zone, and none in the normal zone.
> 
> The reason for doing this is that normal allocations fall back to DMA
> allocations when the normal zone becomes full/empty.  However, DMA
> allocations can never be satisfied by allocations from the normal zone.

Usually DMA is done via ZONE_NORMAL allocations. GFP_DMA allocs and 
ZONE_DMA are for devices that cannot performa DMA to all of memory.

There is no need to fall back if you do not have such devices. So no need 
for ZONE_DMA.

> Moreover, special casing the "doesn't use __GFP_DMA allocations on this
> machine so places all memory in ZONE_NORMAL" is just too complicated -
> I've no idea which of the 100+ ARM machine support currently merged
> into the Linux kernel uses __GFP_DMA allocations and which don't.

GFP_DMA allocations are an exception and that exception can be removed 
from the core VM by not defining ZONE_DMA. You cannot switch off the 
NORMAL zone.

> The DMA zone is for memory allocations _for_ _DMA_.  If all your memory
> is DMA-able then it belongs in the DMA zone.

Nope. The DMA zone is for crappy DMA devices that can only use a portion 
of memory.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ