From: Avi Kivity <avi@redhat.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
Hugh Dickens <hugh@veritas.com>,
Linux Memory Management List <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: Populating multiple ptes at fault time
Date: Wed, 24 Sep 2008 15:31:56 +0300 [thread overview]
Message-ID: <48DA333C.2050900@redhat.com> (raw)
In-Reply-To: <48D2F571.4010504@goop.org>
Jeremy Fitzhardinge wrote:
> Avi Kivity wrote:
>
>>> The only direct use of pte_young() is in zap_pte_range, within a
>>> mmu_lazy region. So syncing the A bit state on entering lazy mmu mode
>>> would work fine there.
>>>
>>>
>>>
>> Ugh, leaving lazy pte.a mode when entering lazy mmu mode?
>>
>
> Well, sort of but not quite. The kernel's announcing its about to start
> processing a batch of ptes, so the hypervisor can take the opportunity
> to update their state before processing. "Lazy-mode" is from the
> perspective of the kernel lazily updating some state the hypervisor
> might care about, and the sync happens when leaving mode.
>
> The flip-side is when the hypervisor is lazily updating some state the
> kernel cares about, so it makes sense that the sync when the kernel
> enters its lazy mode. But the analogy isn't very good because we don't
> really have an explicit notion of "hypervisor lazy mode", or a formal
> handoff of shared state between the kernel and hypervisor. But in this
> case the behaviour isn't too bad.
>
>
Handwavy. I think the two notions are separate <insert handwavy
counter-arguments>.
>>> The call via page_referenced_one() doesn't seem to have a very
>>> convenient hook though. Perhaps putting something in
>>> page_check_address() would do the job.
>>>
>>>
>>>
>> Why there?
>>
>> Why not explicitly in the callers? We need more than to exit lazy
>> pte.a mode, we also need to enter it again later.
>>
>>
>
> Because that's the code that actually walks the pagetable and has the
> address of the pte; it just returns a pte_t, not a pte_t *. It depends
> on whether you want fetch the A bit via ptep or vaddr (in general we
> pass mm, ptep and vaddr to ops which operate on the current pagetable).
>
pte_clear_flush_young_notify_etc() seems even closer.
--
error compiling committee.c: too many arguments to function
--
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:[~2008-09-24 12:31 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 17:47 Jeremy Fitzhardinge
2008-09-17 18:28 ` Rik van Riel
2008-09-17 21:47 ` Jeremy Fitzhardinge
2008-09-17 20:02 ` Chris Snook
2008-09-17 21:45 ` Jeremy Fitzhardinge
2008-09-18 18:16 ` Christoph Lameter
2008-09-18 18:53 ` Jeremy Fitzhardinge
2008-09-18 19:39 ` Christoph Lameter
2008-09-18 22:21 ` KOSAKI Motohiro
2008-09-18 20:52 ` Martin Bligh
2008-09-18 20:53 ` Chris Snook
2008-09-18 21:11 ` Martin Bligh
2008-09-18 21:13 ` Christoph Lameter
2008-09-18 21:21 ` Martin Bligh
2008-09-18 21:32 ` Christoph Lameter
2008-09-18 21:49 ` MinChan Kim
2008-09-18 21:58 ` Christoph Lameter
2008-09-18 22:08 ` Martin Bligh
2008-09-18 22:11 ` Christoph Lameter
2008-09-18 22:18 ` Martin Bligh
2008-09-18 22:22 ` Jeremy Fitzhardinge
2008-09-18 22:23 ` Chris Snook
2008-09-18 23:16 ` MinChan Kim
2008-09-17 22:02 ` Avi Kivity
2008-09-17 22:30 ` Jeremy Fitzhardinge
2008-09-17 22:47 ` Avi Kivity
2008-09-17 23:02 ` Jeremy Fitzhardinge
2008-09-18 20:26 ` Avi Kivity
2008-09-18 22:18 ` Jeremy Fitzhardinge
2008-09-18 23:38 ` Avi Kivity
2008-09-19 0:00 ` Jeremy Fitzhardinge
2008-09-19 0:20 ` Avi Kivity
2008-09-19 0:42 ` Jeremy Fitzhardinge
2008-09-24 12:31 ` Avi Kivity [this message]
2008-09-25 18:32 ` Jeremy Fitzhardinge
2008-09-26 10:26 ` Martin Schwidefsky
2008-09-19 17:45 ` Benjamin Herrenschmidt
2008-09-17 23:50 ` MinChan Kim
2008-09-18 6:58 ` KOSAKI Motohiro
2008-09-18 7:26 ` KAMEZAWA Hiroyuki
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=48DA333C.2050900@redhat.com \
--to=avi@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hugh@veritas.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mtosatti@redhat.com \
--cc=nickpiggin@yahoo.com.au \
--cc=riel@redhat.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