Re: [PATCH V3,net-next, 3/4] net: mana: Enable RX path to handle various MTU sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 15 Apr 2023 14:25:29 +0000 Haiyang Zhang wrote:
> > Allocating frag larger than a page is not safe.  
> 
>  I saw other drivers doing this - use napi_alloc_frag for size bigger than a page.
> And it returns compound page. Why it's not safe? Should we use other allocator
> when need compound pages?

I believe so. There was a thread about this within the last year.
Someone was trying to fix the page frag allocator to not fall back
to order 0 pages in case of failure if requested size is > PAGE_SIZE.
But there was push back and folks were saying that it's simply not 
a case supported by the frag allocator. 🤷️

> > Frag allocator falls back to allocating single pages, doesn't it?  
> 
> Actually I checked it. Compound page is still returned for size smaller than PAGE_SIZE,
> so I used single page allocation for that.

https://elixir.bootlin.com/linux/v6.3-rc6/source/mm/page_alloc.c#L5723

Jumbo frames should really be supported as scatter transfers, 
if possible.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux