From: Hugh Dickins <hugh@veritas.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
David Howells <dhowells@redhat.com>,
Rohit Seth <rohitseth@google.com>,
linux-mm@kvack.org, agl@us.ibm.com, linux-ia64@vger.kernel.org
Subject: Re: update_mmu_cache vs. lazy_mmu_prot_update
Date: Wed, 24 May 2006 15:12:10 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0605241453340.12355@blonde.wat.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0605231433001.11697@schroedinger.engr.sgi.com>
On Tue, 23 May 2006, Christoph Lameter wrote:
> On Tue, 23 May 2006, Chen, Kenneth W wrote:
>
> > My memory recollects that it was done just like what you suggested:
> > overloading update_mmu_cache for ia64, but it was vetoed by several mm
> > experts. And as a result a new function was introduced.
>
> lazy_mmu_prot_update is always called after update_mmu_cache except
> when we change permissions (hugetlb_change_protection() and
> change_pte_range()).
>
> So if we conflate those two then arches may have to be updated to avoid
> flushing the mmu if we only modified protections.
Ah, I missed those two lone usages of lazy_mmu_prot_update, thanks.
That makes sense, and fits with Ken's recollection: to have added
update_mmu_cache in those two places would have slowed down the
other architectures.
> I think update_mmu_cache() should be dropped in page_wrprotect_one() in
> order to be consistent scheme. And avoiding mmu flushes will increase the
> performance of page_wrprotect_one.. lazy_mmu_prot_update must be there
> since we are changing permissions.
Agreed.
I'd still like to rename lazy_mmu_prot_update, and refactor it, but
that can be a later unrelated cleanup. What makes sense to me is to
call it update_mmu_cache_prot, and #define the ia64 update_mmu_cache
to that: so we can unclutter common code from most of the
lazy_mmu_prot_update lines, leaving just those two significant
instances of update_mmu_cache_prot that you highlight.
And of the two instances of update_mmu_cache in mm/fremap.c:
it seems to me that the first, in install_page, ought to have a
lazy_mmu_prot_update (and will get it automatically by the #define
I suggest); whereas the second, in install_file_pte, ought not to
have an update_mmu_cache since it's installing a !present entry.
Hugh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-05-24 14:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-22 19:31 tracking dirty pages patches Hugh Dickins
2006-05-22 20:29 ` Andrew Morton
2006-05-23 8:17 ` Nick Piggin
2006-05-23 14:55 ` Hugh Dickins
2006-05-23 16:24 ` Christoph Lameter
2006-05-23 19:21 ` Hugh Dickins
2006-05-23 19:31 ` Christoph Lameter
2006-05-23 20:34 ` Hugh Dickins
2006-05-23 21:16 ` Christoph Lameter
2006-05-23 21:17 ` Chen, Kenneth W
2006-05-23 21:40 ` update_mmu_cache vs. lazy_mmu_prot_update Christoph Lameter
2006-05-24 14:12 ` Hugh Dickins [this message]
2006-05-23 22:28 ` remove VM_LOCKED before remap_pfn_range and drop VM_SHM Christoph Lameter
2006-05-24 14:57 ` Hugh Dickins
2006-05-24 2:25 ` tracking dirty pages patches Arjan van de Ven
2006-05-24 15:10 ` Hugh Dickins
2006-05-25 2:26 ` Arjan van de Ven
2006-05-23 16:41 ` David Howells
2006-05-23 23:07 ` Peter Zijlstra
2006-05-24 14:20 ` Hugh Dickins
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=Pine.LNX.4.64.0605241453340.12355@blonde.wat.veritas.com \
--to=hugh@veritas.com \
--cc=a.p.zijlstra@chello.nl \
--cc=agl@us.ibm.com \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=dhowells@redhat.com \
--cc=kenneth.w.chen@intel.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rohitseth@google.com \
--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