public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Robin Holt <holt@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [patch] 4 level page table bug fix in vhpt_miss
Date: Thu, 17 Nov 2005 18:51:33 +0000	[thread overview]
Message-ID: <20051117185133.GA6708@lnx-holt.americas.sgi.com> (raw)
In-Reply-To: <200511170938.jAH9cgg11411@unix-os.sc.intel.com>

This brings performance back in line with the three-level case (approx
0.2% slowdown).  Thanks for finding this.

Robin

On Thu, Nov 17, 2005 at 01:38:42AM -0800, Chen, Kenneth W wrote:
> >From source code inspection, I think there is a bug with 4 level
> page table with vhpt_miss handler.  In the code path of rechecking
> page table entry against previously read value after tlb insertion,
> *pte value in register r18 was overwritten with value newly read
> from pud pointer, render the check of new *pte against previous
> *pte completely wrong.  Though the bug is none fatal and the penalty
> is to purge the entry and retry.  For functional correctness, it
> should be fixed.  The fix is to use a different register so new
> *pud don't trash *pte.  (btw, the comments in the cmp statement is
> wrong as well, which I will address in the next patch).
> 
> Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> 
> 
> --- ./arch/ia64/kernel/ivt.S.orig	2005-11-16 23:35:27.086799703 -0800
> +++ ./arch/ia64/kernel/ivt.S	2005-11-17 00:14:51.247903555 -0800
> @@ -209,13 +209,13 @@ ENTRY(vhpt_miss)
>  	ld8 r25=[r21]				// read L4 entry again
>  	ld8 r26=[r17]				// read L3 PTE again
>  #ifdef CONFIG_PGTABLE_4
> -	ld8 r18=[r28]				// read L2 entry again
> +	ld8 r19=[r28]				// read L2 entry again
>  #endif
>  	cmp.ne p6,p7=r0,r0
>  	;;
>  	cmp.ne.or.andcm p6,p7=r26,r20		// did L3 entry change
>  #ifdef CONFIG_PGTABLE_4
> -	cmp.ne.or.andcm p6,p7=r29,r18		// did L4 PTE change
> +	cmp.ne.or.andcm p6,p7=r19,r29		// did L4 PTE change
>  #endif
>  	mov r27=PAGE_SHIFT<<2
>  	;;
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2005-11-17 18:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-17  9:38 [patch] 4 level page table bug fix in vhpt_miss Chen, Kenneth W
2005-11-17 18:51 ` Robin Holt [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=20051117185133.GA6708@lnx-holt.americas.sgi.com \
    --to=holt@sgi.com \
    --cc=linux-ia64@vger.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