Skip to content

RFC Optional ZONE_DMA

Christoph Lameter lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Add CONFIG_ZONE_DMA to all archesMarch/cris/Kconfig arch/frv/Kconfig arch/h8300/Kconfig +7 more+39 -03 replies
2/8slab allocator: Make DMA support configurableinclude/linux/slab.h mm/slab.c+24 -20 replies
3/8eventcounters: Optional ZONE_DMAinclude/linux/vmstat.h mm/vmstat.c+23 -50 replies
4/8page allocator: Optional ZONE_DMAinclude/linux/mmzone.h mm/mempolicy.c mm/page_alloc.c+18 -12 replies
5/8x86_64 without ZONE_DMAarch/x86_64/Kconfig arch/x86_64/kernel/Makefile arch/x86_64/mm/init.c+29 -164 replies
6/8i386 without ZONE_DMAarch/i386/Kconfig arch/i386/kernel/Makefile arch/i386/kernel/setup.c+17 -70 replies
7/8Single zone optimizationsinclude/linux/mmzone.h kernel/sysctl.c mm/page_alloc.c +1 more+33 -31 reply
8/8Optimize mempolicies for a single zoneinclude/linux/mempolicy.h mm/mempolicy.c+8 -01 reply

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by.

PatchChristoph Lameter
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8Siged-off-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 0/8] Optional ZONE_DMA

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.