From: Nick Piggin <nickpiggin@yahoo.com.au>
To: rohitseth@google.com
Cc: 'Mike Stroyan' <mike.stroyan@hp.com>,
'Andrew Morton' <akpm@linux-foundation.org>,
'Hugh Dickins' <hugh@veritas.com>,
"'Luck, Tony'" <tony.luck@intel.com>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Fw: [PATCH] ia64: race flushing icache in do_no_page path
Date: Wed, 02 May 2007 01:57:40 +0000 [thread overview]
Message-ID: <4637F014.7080409@yahoo.com.au> (raw)
In-Reply-To: <1178066178.19466.67.camel@galaxy.corp.google.com>
Rohit Seth wrote:
> On Tue, 2007-05-01 at 21:39 +1000, Nick Piggin wrote:
>
>>Rohit Seth wrote:
>
>
>>>If a user is requesting kernel to do (for example) write on a page that is
>>>already mapped with execute and write permissions then it should be treated
>>>as if the user space is doing modifications to that page. There is no
>>>change in protections so lazy_prot_mmu_update shouldn't be called even
>>>though PG_arch_1 is (I think) set. Does it answer your concern?
>>
>>I'm not sure that I would agree. For direct modifications of memory via
>>a passed in user virtual address, perhaps. For operations on pagecache,
>>we may not even have a handle to issue the flush cache instruction on (ie.
>>a user virtual address), let alone know whether anyone else is mapping
>>the page.
>>
>
>
> Can you please describe the page cache scenario in more detail? IMO, if
> a page is user mapped with at least one execute and write permission
> then the responsibility of update caches lies with user.
What if a different user write(2)s the underlying page?
>>>>What if you were to say remove all the PG_arch_1 code, and do
>>>>something really simple like flush icache in
>>>>flush_dcache_page? Would performance suffer horribly?
>>>
>>>
>>>On Itanium, I think it will have some performance penalty (horrible or not I
>>>don't know) as you will be invalidating the caches more often. And they
>>>alsways look for last 0.1% performance that they can get.
>>
>>Sure, but if we _only_ flushed when page_mapcount was raised,
>
>
> You will need this every time there is change in protection (e.g.
> mprotect) not only when page_mapcount is raised.
Yeah, you would retain the flush on fault, I meant you would
introduce a flush in flush_dcache_page for when mapcount is raised.
--
SUSE Labs, Novell Inc.
WARNING: multiple messages have this Message-ID (diff)
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: rohitseth@google.com
Cc: "'Mike Stroyan'" <mike.stroyan@hp.com>,
"'Andrew Morton'" <akpm@linux-foundation.org>,
"'Hugh Dickins'" <hugh@veritas.com>,
"'Luck, Tony'" <tony.luck@intel.com>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Fw: [PATCH] ia64: race flushing icache in do_no_page path
Date: Wed, 02 May 2007 11:57:40 +1000 [thread overview]
Message-ID: <4637F014.7080409@yahoo.com.au> (raw)
In-Reply-To: <1178066178.19466.67.camel@galaxy.corp.google.com>
Rohit Seth wrote:
> On Tue, 2007-05-01 at 21:39 +1000, Nick Piggin wrote:
>
>>Rohit Seth wrote:
>
>
>>>If a user is requesting kernel to do (for example) write on a page that is
>>>already mapped with execute and write permissions then it should be treated
>>>as if the user space is doing modifications to that page. There is no
>>>change in protections so lazy_prot_mmu_update shouldn't be called even
>>>though PG_arch_1 is (I think) set. Does it answer your concern?
>>
>>I'm not sure that I would agree. For direct modifications of memory via
>>a passed in user virtual address, perhaps. For operations on pagecache,
>>we may not even have a handle to issue the flush cache instruction on (ie.
>>a user virtual address), let alone know whether anyone else is mapping
>>the page.
>>
>
>
> Can you please describe the page cache scenario in more detail? IMO, if
> a page is user mapped with at least one execute and write permission
> then the responsibility of update caches lies with user.
What if a different user write(2)s the underlying page?
>>>>What if you were to say remove all the PG_arch_1 code, and do
>>>>something really simple like flush icache in
>>>>flush_dcache_page? Would performance suffer horribly?
>>>
>>>
>>>On Itanium, I think it will have some performance penalty (horrible or not I
>>>don't know) as you will be invalidating the caches more often. And they
>>>alsways look for last 0.1% performance that they can get.
>>
>>Sure, but if we _only_ flushed when page_mapcount was raised,
>
>
> You will need this every time there is change in protection (e.g.
> mprotect) not only when page_mapcount is raised.
Yeah, you would retain the flush on fault, I meant you would
introduce a flush in flush_dcache_page for when mapcount is raised.
--
SUSE Labs, Novell Inc.
next prev parent reply other threads:[~2007-05-02 1:57 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070425205548.fd51b301.akpm@linux-foundation.org>
2007-04-26 7:53 ` Fw: [PATCH] ia64: race flushing icache in do_no_page path Nick Piggin
2007-04-26 7:53 ` Nick Piggin
2007-04-26 17:35 ` Mike Stroyan
2007-04-26 17:35 ` Mike Stroyan
2007-04-27 11:55 ` Nick Piggin
2007-04-27 11:55 ` Nick Piggin
2007-04-27 14:18 ` Hugh Dickins
2007-04-27 14:18 ` Hugh Dickins
2007-04-27 17:02 ` David Mosberger-Tang
2007-04-27 17:02 ` David Mosberger-Tang
2007-04-28 1:31 ` Rohit Seth
2007-04-28 1:31 ` Rohit Seth
2007-04-28 5:34 ` Hugh Dickins
2007-04-28 5:34 ` Hugh Dickins
2007-04-28 2:16 ` Nick Piggin
2007-04-28 2:16 ` Nick Piggin
2007-04-28 1:24 ` Rohit Seth
2007-04-28 1:24 ` Rohit Seth
2007-04-28 2:00 ` Nick Piggin
2007-04-28 2:00 ` Nick Piggin
2007-04-26 0:16 ` Mike Stroyan
2007-04-26 0:16 ` Mike Stroyan
2007-04-28 17:57 ` Fw: " Rohit Seth
2007-04-28 17:57 ` Rohit Seth
2007-05-01 11:39 ` Nick Piggin
2007-05-01 11:39 ` Nick Piggin
2007-05-02 0:36 ` Rohit Seth
2007-05-02 0:36 ` Rohit Seth
2007-05-02 1:57 ` Nick Piggin [this message]
2007-05-02 1:57 ` Nick Piggin
2007-04-28 18:05 ` Rohit Seth
2007-04-28 18:05 ` Rohit Seth
2007-05-01 11:43 ` Nick Piggin
2007-05-01 11:43 ` Nick Piggin
2007-05-04 21:32 ` Mike Stroyan
2007-05-04 21:32 ` Mike Stroyan
2007-04-28 18:17 ` Rohit Seth
2007-04-28 18:17 ` Rohit Seth
2007-05-01 11:52 ` Nick Piggin
2007-05-01 11:52 ` Nick Piggin
2007-05-02 0:36 ` Rohit Seth
2007-05-02 0:36 ` Rohit Seth
2007-05-02 2:05 ` Nick Piggin
2007-05-02 2:05 ` Nick Piggin
2007-04-28 18:30 ` Rohit Seth
2007-04-28 18:30 ` Rohit Seth
2007-05-01 11:47 ` Nick Piggin
2007-05-01 11:47 ` Nick Piggin
2007-05-02 0:36 ` Rohit Seth
2007-05-02 0:36 ` Rohit Seth
2007-07-04 14:24 ` Zoltan Menyhart
2007-07-04 14:24 ` Zoltan Menyhart
2007-07-04 16:58 ` KAMEZAWA Hiroyuki
2007-07-04 16:58 ` KAMEZAWA Hiroyuki
2007-07-05 8:57 ` Zoltan Menyhart
2007-07-05 8:57 ` Zoltan Menyhart
2007-07-05 17:36 ` Mike Stroyan
2007-07-05 17:36 ` Mike Stroyan
2007-04-28 3:04 ` Nick Piggin
2007-04-28 3:04 ` Nick Piggin
2007-04-28 5:20 ` Hugh Dickins
2007-04-28 5:20 ` Hugh Dickins
2007-04-28 6:03 ` Nick Piggin
2007-04-28 6:03 ` Nick Piggin
2007-04-28 4:11 ` Nick Piggin
2007-04-28 4:11 ` Nick Piggin
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=4637F014.7080409@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@linux-foundation.org \
--cc=hugh@veritas.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.stroyan@hp.com \
--cc=rohitseth@google.com \
--cc=tony.luck@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.