Re: [PATCH net-next v2 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-02-03 Thread Kevin Hao
On Tue, Feb 02, 2021 at 08:19:54AM -0800, Alexander Duyck wrote: > On Sat, Jan 30, 2021 at 11:54 PM Kevin Hao wrote: > > > > In the current implementation of page_frag_alloc(), it doesn't have > > any align guarantee for the returned buffer address. But for some > > hardwares they do require the D

Re: [PATCH net-next v2 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-02-02 Thread Alexander Duyck
On Sat, Jan 30, 2021 at 11:54 PM Kevin Hao wrote: > > In the current implementation of page_frag_alloc(), it doesn't have > any align guarantee for the returned buffer address. But for some > hardwares they do require the DMA buffer to be aligned correctly, > so we would have to use some workaroun

Re: [PATCH net-next v2 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-02-02 Thread Ioana Ciornei
On Tue, Feb 02, 2021 at 12:48:28PM +0100, Vlastimil Babka wrote: > On 2/2/21 12:36 PM, Ioana Ciornei wrote: > > On Sun, Jan 31, 2021 at 03:44:23PM +0800, Kevin Hao wrote: > >> In the current implementation of page_frag_alloc(), it doesn't have > >> any align guarantee for the returned buffer addres

Re: [PATCH net-next v2 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-02-02 Thread Vlastimil Babka
On 2/2/21 12:36 PM, Ioana Ciornei wrote: > On Sun, Jan 31, 2021 at 03:44:23PM +0800, Kevin Hao wrote: >> In the current implementation of page_frag_alloc(), it doesn't have >> any align guarantee for the returned buffer address. But for some >> hardwares they do require the DMA buffer to be aligned

Re: [PATCH net-next v2 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-02-02 Thread Ioana Ciornei
On Sun, Jan 31, 2021 at 03:44:23PM +0800, Kevin Hao wrote: > In the current implementation of page_frag_alloc(), it doesn't have > any align guarantee for the returned buffer address. But for some > hardwares they do require the DMA buffer to be aligned correctly, > so we would have to use some wor

[PATCH net-next v2 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-01-30 Thread Kevin Hao
In the current implementation of page_frag_alloc(), it doesn't have any align guarantee for the returned buffer address. But for some hardwares they do require the DMA buffer to be aligned correctly, so we would have to use some workarounds like below if the buffers allocated by the page_frag_alloc