From: Dev Jain <dev.jain@arm.com>
To: david@redhat.com, willy@infradead.org, ziy@nvidia.com,
hughd@google.com, ryan.roberts@arm.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [QUESTION] Plain dereference and READ_ONCE() in fault handler
Date: Wed, 5 Mar 2025 15:51:59 +0530 [thread overview]
Message-ID: <20250305102159.96420-1-dev.jain@arm.com> (raw)
In __handle_mm_fault(),
1. Why is there a barrier() for the PUD logic?
2. For the PMD logic, in the if block, we use *vmf.pmd, and in the else block
we use pmdp_get_lockless(); what if someone changes the pmd just when we
have begun processing the conditions in the if block, fail in the if block
and then the else block operates on a different pmd value. Shouldn't we cache
the value of the pmd and operate on a single consistent value until we take the
lock and then finally check using pxd_same() and friends?
Thanks,
Dev
next reply other threads:[~2025-03-05 18:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 10:21 Dev Jain [this message]
2025-03-05 10:46 ` David Hildenbrand
2025-03-05 14:12 ` Matthew Wilcox
2025-03-05 15:02 ` Dev Jain
2025-03-05 19:59 ` David Hildenbrand
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=20250305102159.96420-1-dev.jain@arm.com \
--to=dev.jain@arm.com \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryan.roberts@arm.com \
--cc=willy@infradead.org \
--cc=ziy@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox