[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <PH7PR21MB311608F7EF4F951C82DDF3ADCA9C9@PH7PR21MB3116.namprd21.prod.outlook.com>
Date: Mon, 17 Apr 2023 19:52:01 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Dexuan Cui <decui@...rosoft.com>,
KY Srinivasan <kys@...rosoft.com>,
Paul Rosswurm <paulros@...rosoft.com>,
"olaf@...fle.de" <olaf@...fle.de>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"leon@...nel.org" <leon@...nel.org>,
Long Li <longli@...rosoft.com>,
"ssengar@...ux.microsoft.com" <ssengar@...ux.microsoft.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"daniel@...earbox.net" <daniel@...earbox.net>,
"john.fastabend@...il.com" <john.fastabend@...il.com>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"ast@...nel.org" <ast@...nel.org>,
Ajay Sharma <sharmaajay@...rosoft.com>,
"hawk@...nel.org" <hawk@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V3,net-next, 3/4] net: mana: Enable RX path to handle
various MTU sizes
> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Monday, April 17, 2023 1:52 PM
> To: Haiyang Zhang <haiyangz@...rosoft.com>
> Cc: linux-hyperv@...r.kernel.org; netdev@...r.kernel.org; Dexuan Cui
> <decui@...rosoft.com>; KY Srinivasan <kys@...rosoft.com>; Paul Rosswurm
> <paulros@...rosoft.com>; olaf@...fle.de; vkuznets@...hat.com;
> davem@...emloft.net; wei.liu@...nel.org; edumazet@...gle.com;
> pabeni@...hat.com; leon@...nel.org; Long Li <longli@...rosoft.com>;
> ssengar@...ux.microsoft.com; linux-rdma@...r.kernel.org;
> daniel@...earbox.net; john.fastabend@...il.com; bpf@...r.kernel.org;
> ast@...nel.org; Ajay Sharma <sharmaajay@...rosoft.com>;
> hawk@...nel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH V3,net-next, 3/4] net: mana: Enable RX path to handle
> various MTU sizes
>
> 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. 🤷️
Thanks, I will use other allocator for compound pages.
>
> > > 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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Felixir
> .bootlin.com%2Flinux%2Fv6.3-
> rc6%2Fsource%2Fmm%2Fpage_alloc.c%23L5723&data=05%7C01%7Chaiyan
> gz%40microsoft.com%7C00ca9f15ae314a4aa2ee08db3f6c8699%7C72f988
> bf86f141af91ab2d7cd011db47%7C1%7C0%7C638173507608724670%7C
> Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJB
> TiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=87QqFbWrxU
> BMtqYpC397nlQxOJfU7lkt2%2FKAOGUjzjw%3D&reserved=0
>
> Jumbo frames should really be supported as scatter transfers,
> if possible.
Our HW has much bigger overhead for scatter transfer on RX, so I use compound
Page.
Thanks,
- Haiyang
Powered by blists - more mailing lists