From: Wei Yang <richardw.yang@linux.intel.com>
To: Wei Yang <richardw.yang@linux.intel.com>
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/mm: fix function name typo in pmd_read_atomic() comment
Date: Wed, 25 Sep 2019 09:59:57 +0800 [thread overview]
Message-ID: <20190925015956.GA20295@richard> (raw)
In-Reply-To: <20190925014453.20236-1-richardw.yang@linux.intel.com>
To be honest, I have a question on how this works.
As the comment says, we need to call pmd_read_atomic before using
pte_offset_map_lock to avoid data corruption.
For example, in function swapin_walk_pmd_entry:
pmd_none_or_trans_huge_or_clear_bad(pmd)
pmd_read_atomic(pmd) --- 1
pte_offset_map_lock(mm, pmd, ...) --- 2
At point 1, we are assured the content is intact. While in point 2, we would
read pmd again to calculate the pte address. How we ensure this time the
content is intact? Because pmd_none_or_trans_huge_or_clear_bad() ensures the
pte is stable, so that the content won't be changed?
Thanks for your time in advance.
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2019-09-25 2:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 1:44 [PATCH] x86/mm: fix function name typo in pmd_read_atomic() comment Wei Yang
2019-09-25 1:59 ` Wei Yang [this message]
2019-09-25 6:55 ` [PATCH] x86/mm: Clean up the pmd_read_atomic() comments Ingo Molnar
2019-09-25 7:28 ` Wei Yang
2019-09-27 8:10 ` [tip: x86/mm] x86/mm: Fix function name typo in pmd_read_atomic() comment tip-bot2 for Wei Yang
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=20190925015956.GA20295@richard \
--to=richardw.yang@linux.intel.com \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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