[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f19143d-5975-05d4-3697-0218ed2881c6@kernel.org>
Date: Sat, 19 Aug 2023 09:49:25 -0600
From: David Ahern <dsahern@...nel.org>
To: Jesper Dangaard Brouer <jbrouer@...hat.com>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: brouer@...hat.com, Mina Almasry <almasrymina@...gle.com>,
netdev@...r.kernel.org, linux-media@...r.kernel.org,
dri-devel@...ts.freedesktop.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Jesper Dangaard Brouer <hawk@...nel.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>, Arnd Bergmann
<arnd@...db.de>, Sumit Semwal <sumit.semwal@...aro.org>,
Christian König <christian.koenig@....com>,
Jason Gunthorpe <jgg@...pe.ca>, Hari Ramakrishnan <rharix@...gle.com>,
Dan Williams <dan.j.williams@...el.com>, Andy Lutomirski <luto@...nel.org>,
stephen@...workplumber.org, sdf@...gle.com
Subject: Re: [RFC PATCH v2 06/11] page-pool: add device memory support
On 8/19/23 9:22 AM, Jesper Dangaard Brouer wrote:
>
> I do see the problem of depending on having a struct page, as the
> page_pool_iov isn't related to struct page. Having "page" in the name
> of "page_pool_iov" is also confusing (hardest problem is CS is naming,
> as we all know).
>
> To support more allocator types, perhaps skb->pp_recycle bit need to
> grow another bit (and be renamed skb->recycle), so we can tell allocator
> types apart, those that are page based and those whom are not.
>
>
>> I think the feedback has been strong to not multiplex yet another
>> memory type into that struct, that is not a real page. Which is why
>> we went into this direction. This latest series limits the impact largely
>> to networking structures and code.
>>
>
> Some what related what I'm objecting to: the "page_pool_iov" is not a
> real page, but this getting recycled into something called "page_pool",
> which funny enough deals with struct-pages internally and depend on the
> struct-page-refcnt.
>
> Given the approach changed way from using struct page, then I also don't
> see the connection with the page_pool. Sorry.
I do not care for the page_pool_iov name either; I presumed it was least
change to prove an idea and the name and details would evolve.
How about something like buffer_pool or netdev_buf_pool that can operate
with either pages, dma addresses, or something else in the future?
>
>> As for the LSB trick: that avoided adding a lot of boilerplate churn
>> with new type and helper functions.
>>
>
> Says the lazy programmer :-P ... sorry could not resist ;-)
Use of the LSB (or bits depending on alignment expectations) is a common
trick and already done in quite a few places in the networking stack.
This trick is essential to any realistic change here to incorporate gpu
memory; way too much code will have unnecessary churn without it.
I do prefer my earlier suggestion though where the skb_frag_t has a
union of relevant types though. Instead of `struct page *page` it could
be `void *addr` with the helpers indicating page, iov, or other.
Powered by blists - more mailing lists