All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	Tariq Toukan <tariqt@nvidia.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Eric Dumazet <edumazet@google.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Simon Horman <horms@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mina Almasry <almasrymina@google.com>,
	Yonglong Liu <liuyonglong@huawei.com>,
	Yunsheng Lin <linyunsheng@huawei.com>,
	Pavel Begunkov <asml.silence@gmail.com>,
	Matthew Wilcox <willy@infradead.org>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
	linux-rdma@vger.kernel.org, linux-mm@kvack.org,
	Qiuling Ren <qren@redhat.com>, Yuying Ma <yuma@redhat.com>
Subject: Re: [PATCH net-next v5 2/2] page_pool: Track DMA-mapped pages and unmap them when destroying the pool
Date: Tue, 01 Apr 2025 11:12:35 +0200	[thread overview]
Message-ID: <87y0wkmeik.fsf@toke.dk> (raw)
In-Reply-To: <38b9af46-0d03-424d-8ecc-461b7daf216c@redhat.com>

Paolo Abeni <pabeni@redhat.com> writes:

> On 3/28/25 1:19 PM, Toke Høiland-Jørgensen wrote:
>> @@ -463,13 +462,21 @@ page_pool_dma_sync_for_device(const struct page_pool *pool,
>>  			      netmem_ref netmem,
>>  			      u32 dma_sync_size)
>>  {
>> -	if (pool->dma_sync && dma_dev_need_sync(pool->p.dev))
>> -		__page_pool_dma_sync_for_device(pool, netmem, dma_sync_size);
>> +	if (pool->dma_sync && dma_dev_need_sync(pool->p.dev)) {
>
> Lacking a READ_ONCE() here, I think it's within compiler's right do some
> unexpected optimization between this read and the next one. Also it will
> make the double read more explicit.

Right, good point; will respin!

-Toke


      reply	other threads:[~2025-04-01  9:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28 12:19 [PATCH net-next v5 0/2] Fix late DMA unmap crash for page pool Toke Høiland-Jørgensen
2025-03-28 12:19 ` [PATCH net-next v5 1/2] page_pool: Move pp_magic check into helper functions Toke Høiland-Jørgensen
2025-03-28 12:19 ` [PATCH net-next v5 2/2] page_pool: Track DMA-mapped pages and unmap them when destroying the pool Toke Høiland-Jørgensen
2025-03-31 16:35   ` Alexander Lobakin
2025-03-31 17:27     ` Zhu Yanjun
2025-04-01  9:24       ` Yunsheng Lin
2025-04-01 11:56         ` Alexander Lobakin
2025-04-02 11:15           ` Yunsheng Lin
2025-04-01  8:56     ` Paolo Abeni
2025-04-01  9:51       ` Pavel Begunkov
2025-04-01 12:06         ` Jesper Dangaard Brouer
2025-04-01  8:52   ` Paolo Abeni
2025-04-01  9:12     ` Toke Høiland-Jørgensen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y0wkmeik.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=asml.silence@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linyunsheng@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=qren@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=willy@infradead.org \
    --cc=yuma@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.