Is it time to remove ZONE_DMA?
Is it time to remove ZONE_DMA?
Posted May 7, 2018 11:44 UTC (Mon) by cborni (subscriber, #12949)Parent article: Is it time to remove ZONE_DMA?
On s390 we use GFP_DMA to allocate buffers below 2GB. This is still necessary for several hardware interfaces so we certainly need a way to allocate buffers in that region.
Posted May 7, 2018 16:13 UTC (Mon)
by willy (subscriber, #9762)
[Link] (1 responses)
Posted May 7, 2018 16:47 UTC (Mon)
by cborni (subscriber, #12949)
[Link]
Posted May 7, 2018 16:17 UTC (Mon)
by willy (subscriber, #9762)
[Link] (1 responses)
Posted May 7, 2018 17:04 UTC (Mon)
by cborni (subscriber, #12949)
[Link]
No. This is not about driver code, this is about core code that calls some classic CISC instructions that require control blocks that might have some satellite blocks via pointers. And sometimes some specific satellite blocks need to be below 2GB.
Another thing about dma mask: This does not keep this area free unless needed. GFP_DMA does that.
If the page cache now needs 2GB, it will consome the 1GB in ZONE_NORMAL and after that 1GB in ZONE_DMA. So we can still handle all DMA requests. If we have no dedicated zone then there is is higher chance that pages <2GB are used making allocation in there less likely.
So I think your understanding of ZONE_DMA usage (the x86 way) is not exactly how s390x uses it - I fear.
Is it time to remove ZONE_DMA?
Is it time to remove ZONE_DMA?
Right now ZONE_DMA is defined to be exactly that on s390x. We could of course redefine everything to be GFP_DMA32 (which does not exist yet) but this seems a pointless rename.
Is it time to remove ZONE_DMA?
Is it time to remove ZONE_DMA?
Imagine a system with 3 GB of memory.
2GB ZONE_DMA
1GB ZONE_NORMAL (or movable)