nvme-pci: about page_size of DMA pool

Minwoo Im minwoo.im.dev at gmail.com
Thu Feb 22 05:26:58 PST 2018


On 02/21/2018 01:06 AM, Keith Busch wrote:
>> Q1. Should dev->prp_page_pool be created with dev->ctrl.page_size
>> instead of PAGE_SIZE?
> 
> Yeah, the current method looks like it may potentially be over-allocating
> some memory for very large IO transfers. The size of the "large" pool
> ought to be the same as ctrl.page_size.
>   
>>
>> Q2. Is there any special reason why page_shift in nvme_enable_ctrl()
>> is hard-coded to 12, not PAGE_SHIFT?
> 
> Some CPU architectures have different alignment when comparing DMA mapped
> addresses with the virual address, so we have to go to the lowest common
> denominator. Previous discussion here:
> 
>    http://lists.infradead.org/pipermail/linux-nvme/2015-October/002893.html
> 

Thanks for your kind response, Keith. :)



More information about the Linux-nvme mailing list