From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: yunfeng zhang <zyf.zeroos@gmail.com>
Cc: David Miller <davem@davemloft.net>, linux-kernel@vger.kernel.org
Subject: Re: BUG: about flush TLB during unmapping a page in memory subsystem
Date: Fri, 20 Oct 2006 15:54:27 +1000 [thread overview]
Message-ID: <1161323667.10524.147.camel@localhost.localdomain> (raw)
In-Reply-To: <4df04b840610192210x3d7de930k7be7dbf9e38819bd@mail.gmail.com>
On Fri, 2006-10-20 at 13:10 +0800, yunfeng zhang wrote:
> Maybe, the solution is below
>
> ...
> // >>> ptep_clear((__vma)->vm_mm, __address, __ptep);
> // >>> flush_tlb_page(__vma, __address);
> // >>> __ptep;
> ...
>
> And even so, we also get a pte with present = 0 AND its dirty = 1, an odd pte.
>
> Remember B dirtied the pte before A executes flush_tlb_page.
It's very much architecture specific. I suppose x86 must have some HW
requirements of checking if the PTE is still present atomically when
setting the dirty bit but I can't tell for sure :)
On PowerPC, we don't use HW dirty bits, we use SW for that, thus the
ptep_get_and_clear will be enough to prevent any further dirty bit to be
set.
Ben.
prev parent reply other threads:[~2006-10-20 5:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-20 2:47 BUG: about flush TLB during unmapping a page in memory subsystem yunfeng zhang
2006-10-20 3:02 ` David Miller
2006-10-20 5:10 ` yunfeng zhang
2006-10-20 5:54 ` Benjamin Herrenschmidt [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=1161323667.10524.147.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=zyf.zeroos@gmail.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