From: Mark Fortescue <mark@mtfhpc.demon.co.uk>
To: David Miller <davem@davemloft.net>
Cc: linuxppc-dev@ozlabs.org, wli@holomorphy.com, linux-mm@kvack.org,
andrea@suse.de, sparclinux@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: vm changes from linux-2.6.14 to linux-2.6.15
Date: Tue, 1 May 2007 02:45:15 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.61.0705010223040.3556@mtfhpc.demon.co.uk> (raw)
In-Reply-To: <20070430.173806.112621225.davem@davemloft.net>
On Mon, 30 Apr 2007, David Miller wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Date: Tue, 01 May 2007 10:00:19 +1000
>
>>
>>>> Interesting - thanks for working that out. Let's keep linux-mm on cc please.
>>>
>>> You can't elide the update_mmu_cache() call on sun4c because that will
>>> miss some critical TLB setups which are performed there.
>>>
>>> The sun4c TLB has two tiers of entries:
>>>
>>> 1) segment maps, these hold ptes for a range of addresses
>>> 2) ptes, mapped into segment maps
>>>
>>> update_mmu_cache() on sun4c take care of allocating and setting
>>> up the segment maps, so if you elide the call this never happens
>>> and we fault forever.
>>
>> Maybe we can move that logic to ptep_set_access_flags()... in fact, the
>> tlb flush logic should be done there too imho.
>>
>> There would still be the update_mmu_cache() that we don't want on
>> powerpc in all cases I suppose. That can be done by having
>> ptep_set_access_flags() return a boolean indicating wether
>> update_mmu_cache() shall be called or not ...
>
> Always doing ptep_set_access_flags() and returning a boolean like
> that might be a good idea.
At present, update_mmu_cache() and lazy_mmu_prot_update() are always
called when ptep_set_access_flags() is called so why not move them into
ptep_set_access_flags() and change ptep_set_access_flags() to have an
additional boolean parameter (__update) that would when set, cause
update_mmu_cache() and lazy_mmu_prot_update() to be called.
On sun4c, an architecture specific function would be installed that
always treats the __update parameter as set at all times.
The generic function would change to somthing along the lines:
#define ptep_set_access_flags(__vma, __address, \
__ptep, __entry, __dirty, __update)
do { \
if (__update) { \
set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \
flush_tlb_page(__vma, __address); \
update_mmu_cache(__vma, __address, __entry); \
lazy_mmu_prot_update(__entry); \
} else if (__dirty) {
flush_tlb_page(__vma, __address); \
} \
} while (0)
The code in mm/memory.c and mm/hugetlb.c and the architecture specific
versions of ptep_set_access_flags would then be changed acordingly.
Regards
Mark Fortescue.
next prev parent reply other threads:[~2007-05-01 1:45 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.61.0704291345480.690@mtfhpc.demon.co.uk>
[not found] ` <1177852457.4390.26.camel@localhost.localdomain>
2007-04-30 21:36 ` vm changes from linux-2.6.14 to linux-2.6.15 Mark Fortescue
2007-04-30 21:54 ` Andrew Morton
2007-04-30 22:04 ` David Miller
2007-04-30 22:33 ` Mark Fortescue
2007-04-30 22:42 ` David Miller
2007-05-01 0:00 ` Benjamin Herrenschmidt
2007-05-01 0:38 ` David Miller
2007-05-01 1:45 ` Mark Fortescue [this message]
2007-05-01 2:05 ` Benjamin Herrenschmidt
2007-05-01 13:58 ` Mark Fortescue
2007-05-01 21:31 ` Benjamin Herrenschmidt
2007-05-01 23:08 ` Mark Fortescue
2007-05-09 19:44 ` Mark Fortescue
2007-05-09 22:48 ` Benjamin Herrenschmidt
2007-05-10 6:19 ` Andrew Morton
2007-05-10 6:29 ` Benjamin Herrenschmidt
2007-05-10 7:12 ` David Miller
2007-05-14 19:19 ` Hugh Dickins
2007-05-14 21:07 ` Benjamin Herrenschmidt
2007-05-15 6:56 ` Benjamin Herrenschmidt
2007-05-21 14:27 ` Tom "spot" Callaway
2007-05-21 22:09 ` Benjamin Herrenschmidt
2007-05-22 6:28 ` [PATCH/RFC] Rework ptep_set_access_flags and fix sun4c Benjamin Herrenschmidt
2007-05-22 17:04 ` Hugh Dickins
2007-05-22 22:59 ` Benjamin Herrenschmidt
2007-05-22 23:04 ` Tom "spot" Callaway
2007-05-23 4:03 ` Hugh Dickins
2007-05-23 4:21 ` Benjamin Herrenschmidt
2007-05-22 21:52 ` Mark Fortescue
2007-05-22 21:53 ` David Miller
2007-05-22 23:29 ` Benjamin Herrenschmidt
2007-05-22 23:28 ` Benjamin Herrenschmidt
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.61.0705010223040.3556@mtfhpc.demon.co.uk \
--to=mark@mtfhpc.demon.co.uk \
--cc=akpm@linux-foundation.org \
--cc=andrea@suse.de \
--cc=davem@davemloft.net \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=sparclinux@vger.kernel.org \
--cc=wli@holomorphy.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).