From: Gabriel Paubert <paubert@iram.es>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: ppc-dev <linuxppc-dev@ozlabs.org>,
Dave Liu <r63238@freescale.com>,
Paul Mackerras <paulus@samba.org>,
Kumar Gala <galak@gate.crashing.org>
Subject: Re: fsl booke MM vs. SMP questions
Date: Tue, 22 May 2007 10:46:46 +0200 [thread overview]
Message-ID: <20070522084645.GA12009@iram.es> (raw)
In-Reply-To: <1179785273.32247.742.camel@localhost.localdomain>
On Tue, May 22, 2007 at 08:07:52AM +1000, Benjamin Herrenschmidt wrote:
>
> > > The tlb miss handler does:
> > >
> > > - tlbbusy = 1
> > > - barrier (make sure the following read is in order vs. the previous
> > > store to tlbbusy)
> > > - read linux PTE value
> > > - write it to the HW TLB
> >
> > and write the linux PTE with referenced bit?
>
> I've kept the reference bit rewrite out of that pseudo-code because I
> was approaching a different issue but yes. The idea i have there is to
> do break down the linux PTE operation that way:
>
> 1 - rX = read PTE value (normal load)
> 2 - if (!_PAGE_PRESENT)) -> out
> 3 - rY = rX | _PAGE_ACCESSED
> 4 - if (rX != rY)
> 5 - rZ = lwarx PTE value
> 6 - if (rZ != rX)
> 7 - stdcx. PTE, rZ (rewrite just read value to clear reserv)
Why do you want to clear the reservation here?
Coming out of some code path with the reservation still held
can only affect buggy code (someone doing st[dw]cx. before
l[dw]arx) AFAIK.
> 8 - goto 1 (try again)
> 9 - stdcx. PTE, rY
> 10 - if failed -> goto 1 (try again)
> 11 - that's it !
>
> In addition, I suppose performance can be improved by also dealing with
> dirty bit right in the TLB refill if the access is a write and the page
> is writeable rather than taking a double fault.
Regards,
Gabriel
next prev parent reply other threads:[~2007-05-22 8:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-21 7:06 fsl booke MM vs. SMP questions Benjamin Herrenschmidt
[not found] ` <1179741447.3660.7.camel@localhost.localdomain>
[not found] ` <1179742083.32247.689.camel@localhost.localdomain>
2007-05-21 11:37 ` Dave Liu
2007-05-21 22:07 ` Benjamin Herrenschmidt
2007-05-22 3:09 ` Benjamin Herrenschmidt
2007-05-22 10:56 ` Dave Liu
2007-05-22 22:42 ` Benjamin Herrenschmidt
2007-05-23 2:38 ` Dave Liu
2007-05-23 3:08 ` Benjamin Herrenschmidt
2007-05-28 9:05 ` Liu Dave-r63238
2007-05-28 9:24 ` Benjamin Herrenschmidt
2007-05-28 9:37 ` Liu Dave-r63238
2007-05-28 10:00 ` Benjamin Herrenschmidt
2007-05-28 10:23 ` Gabriel Paubert
2007-05-28 10:28 ` Benjamin Herrenschmidt
2007-05-22 8:46 ` Gabriel Paubert [this message]
2007-05-22 9:14 ` Benjamin Herrenschmidt
2007-05-22 10:02 ` Gabriel Paubert
2007-05-22 10:05 ` Benjamin Herrenschmidt
2007-05-23 9:12 ` Gabriel Paubert
2007-05-22 3:03 ` Kumar Gala
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=20070522084645.GA12009@iram.es \
--to=paubert@iram.es \
--cc=benh@kernel.crashing.org \
--cc=galak@gate.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=r63238@freescale.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;
as well as URLs for NNTP newsgroup(s).