[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <73ef1add-01df-7783-7982-da9e59c26330@huawei.com>
Date: Thu, 15 Jul 2021 11:49:56 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Alexander Duyck <alexander.duyck@...il.com>,
Jesper Dangaard Brouer <jbrouer@...hat.com>
CC: David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Russell King - ARM Linux <linux@...linux.org.uk>,
Marcin Wojtas <mw@...ihalf.com>, <linuxarm@...neuler.org>,
<yisen.zhuang@...wei.com>, Salil Mehta <salil.mehta@...wei.com>,
<thomas.petazzoni@...tlin.com>, <hawk@...nel.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
John Fastabend <john.fastabend@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Peter Zijlstra" <peterz@...radead.org>,
Will Deacon <will@...nel.org>,
"Matthew Wilcox" <willy@...radead.org>,
Vlastimil Babka <vbabka@...e.cz>, <fenghua.yu@...el.com>,
<guro@...com>, Peter Xu <peterx@...hat.com>,
"Feng Tang" <feng.tang@...el.com>, Jason Gunthorpe <jgg@...pe.ca>,
Matteo Croce <mcroce@...rosoft.com>,
Hugh Dickins <hughd@...gle.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
Alexander Lobakin <alobakin@...me>,
"Willem de Bruijn" <willemb@...gle.com>, <wenxu@...oud.cn>,
Cong Wang <cong.wang@...edance.com>,
Kevin Hao <haokexin@...il.com>, <nogikh@...gle.com>,
Marco Elver <elver@...gle.com>, Yonghong Song <yhs@...com>,
<kpsingh@...nel.org>, <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>, <songliubraving@...com>,
Netdev <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH rfc v5 2/4] page_pool: add interface to manipulate frag
count in page pool
On 2021/7/14 22:46, Alexander Duyck wrote:
> On Wed, Jul 14, 2021 at 3:18 AM Jesper Dangaard Brouer
> <jbrouer@...hat.com> wrote:
>>
>>
>>
>> On 14/07/2021 11.34, Yunsheng Lin wrote:
>>> As suggested by Alexander, "A DMA mapping should be page
>>> aligned anyway so the lower 12 bits would be reserved 0",
>>> so it might make more sense to repurpose the lower 12 bits
>>> of the dma address to store the frag count for frag page
>>> support in page pool for 32 bit systems with 64 bit dma,
>>> which should be rare those days.
>>
>> Do we have any real driver users with 32-bit arch and 64-bit DMA, that
>> want to use this new frag-count system you are adding to page_pool?
>>
>> This "lower 12-bit use" complicates the code we need to maintain
>> forever. My guess is that it is never used, but we need to update and
>> maintain it, and it will never be tested.
>>
>> Why don't you simply reject using page_pool flag PP_FLAG_PAGE_FRAG
>> during setup of the page_pool for this case?
>>
>> if ((pool->p.flags & PP_FLAG_PAGE_FRAG) &&
>> (sizeof(dma_addr_t) > sizeof(unsigned long)))
>> goto reject-setup;
>>
>>
>
> That sounds good to me if we want to go that route. It would simplify
> this quite a bit since essentially we could just drop these if blocks.
Ok, let's wait for a few day to see if there is anyone with 32-bit arch
and 64-bit DMA system care enough to use the frag-count support in the page
pool.
>
> Thanks.
>
> - Alex
> .
>
Powered by blists - more mailing lists