[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <534e7752-38a9-3e7e-cb04-65789712fb66@huawei.com>
Date: Wed, 29 Nov 2023 11:17:50 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>,
Christoph Hellwig <hch@....de>
CC: Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
Michal Kubiak <michal.kubiak@...el.com>,
Larysa Zaremba <larysa.zaremba@...el.com>,
Alexander Duyck <alexanderduyck@...com>,
David Christensen <drc@...ux.vnet.ibm.com>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>,
Paul Menzel <pmenzel@...gen.mpg.de>, <netdev@...r.kernel.org>,
<intel-wired-lan@...ts.osuosl.org>, <linux-kernel@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next v5 03/14] page_pool: avoid calling no-op
externals when possible
On 2023/11/27 22:32, Alexander Lobakin wrote:
>
> Chris, any thoughts on a global flag for skipping DMA syncs ladder?
It seems there was one already in the past:
https://lore.kernel.org/netdev/7c55a4d7-b4aa-25d4-1917-f6f355bd722e@arm.com/T/
>
>>
>>
>>> +static inline bool page_pool_set_dma_addr(const struct page_pool *pool,
>>> + struct page *page,
>>> + dma_addr_t addr)
>>> {
>>> + unsigned long val = addr;
>>> +
>>> + if (unlikely(!addr)) {
>>> + page->dma_addr = 0;
>>> + return true;
>>> + }
>>
>> The above seems unrelated change?
>
> Related. We use page_put_set_dma_addr() to clear ::dma_addr as well
> (grep for it in page_pool.c). In this case, we don't want
> dma_need_sync() to be called as we explicitly pass zero. This check
> zeroes the field and exits as quickly as possible.
The question seems to be about if we need to ensure the LSB of
page->dma_addr is not set when page_pool releases a page back to page
allocator?
> In case with the call mentioned above, zero is a compile-time constant
> there, so that this little branch will be inlined with the rest dropped.
>
Powered by blists - more mailing lists