public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rohit Seth <rohit.seth@intel.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Hugh Dickins <hugh@veritas.com>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: Handling spurious page fault for hugetlb region for 2.6.14-rc4-git5
Date: Wed, 19 Oct 2005 17:05:41 -0700	[thread overview]
Message-ID: <1129766741.339.141.camel@akash.sc.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0510191345420.3369@g5.osdl.org>

On Wed, 2005-10-19 at 13:53 -0700, Linus Torvalds wrote:
> 

> The fact is, the VM layer is designed for systems that do not cache 
> not-present entries in their TLB. See for example the end of do_no_page() 
> in mm/memory.c:
> 
> 	        /* no need to invalidate: a not-present page shouldn't be cached */
> 	        update_mmu_cache(vma, address, entry);
> 	        lazy_mmu_prot_update(entry);
> 	        spin_unlock(&mm->page_table_lock);
> 	out:
> 	        return ret;
> 
> which _allows_ for hardware that caches not-present pages, but the 
> architecture needs to catch them in the "update_mmu_cache()".
> 

I agree that one way would be to flush the TLB as part of
update_mmu_cache.  But that would result in too many extra global
flushes.  Instead in IA-64, we wait till fault time to do local flushes
whenever needed.

> If ia64 caches non-present TLB entries, then that would seem to be a bug 
> in the Linux ia64 port:
> 
>  - include/asm-ia64/pgtable.h:
> 	#define update_mmu_cache(vma, address, pte) do { } while (0)
> 
> (Of course, you can and maybe do handle it differently: you can also 
> decide to just take the TLB fault, and flush the TLB at fault time in your 
> handler. I don't see that either on ia64, though. Although I didn't look 
> into any of the asm code, so maybe it's hidden somewhere there).
> 

The low level page_not_present vector (asm code) flushes the stale entry
that could be sitting in TLB resulting in current page fault.


But anyways now there is another scenario that Hugh has pointed out in
the last mail that needs to be taken care of too...

-rohit


      parent reply	other threads:[~2005-10-19 23:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-18 21:15 [PATCH]: Handling spurious page fault for hugetlb region for 2.6.14-rc4-git5 Seth, Rohit
2005-10-18 21:34 ` Andrew Morton
2005-10-18 22:17   ` Rohit Seth
2005-10-19  0:25     ` Andrew Morton
2005-10-19  3:25       ` Rohit Seth
2005-10-19  4:07         ` Andrew Morton
2005-10-19 14:33           ` Adam Litke
2005-10-19 15:48           ` Hugh Dickins
2005-10-19 19:05             ` Rohit Seth
2005-10-19 20:00               ` Hugh Dickins
2005-10-19 20:19                 ` Andrew Morton
2005-10-19 20:28                   ` Hugh Dickins
2005-10-19 23:53                     ` Rohit Seth
2005-10-20  1:36                       ` Rohit Seth
2005-10-20  1:37                         ` Andrew Morton
2005-10-20  6:17                         ` Hugh Dickins
2005-10-19 15:23         ` Hugh Dickins
2005-10-19 18:47           ` Rohit Seth
2005-10-19 20:53             ` Linus Torvalds
2005-10-19 21:59               ` Tony Luck
2005-10-20  0:05               ` Rohit Seth [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=1129766741.339.141.camel@akash.sc.intel.com \
    --to=rohit.seth@intel.com \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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