From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Martin Bligh <mbligh@mbligh.org>
Cc: Christoph Lameter <cl@linux-foundation.org>,
Martin Bligh <mbligh@google.com>,
MinChan Kim <minchan.kim@gmail.com>,
Chris Snook <csnook@redhat.com>,
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>,
Avi Kivity <avi@qumranet.com>,
Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>
Subject: Re: Populating multiple ptes at fault time
Date: Thu, 18 Sep 2008 15:22:39 -0700 [thread overview]
Message-ID: <48D2D4AF.2050206@goop.org> (raw)
In-Reply-To: <8f3aa8d60809181518r697b5d7cp9e154fe73f804cc7@mail.gmail.com>
Martin Bligh wrote:
>>>> My patches were only for anonymous pages not for file backed because readahead
>>>> is available for file backed mappings.
>>>>
>>> Do we populate the PTEs though? I didn't think that was batched, but I
>>> might well be wrong.
>>>
>> We do not populate the PTEs and AFAICT PTE population was assumed not to be
>> performance critical since the backing media is comparatively slow.
>>
>
> I think the times when this matters are things like glibc, which are
> heavily shared -
> we were only 'prefaulting' when the pagecache was already there. So it's a case
> for a "readahead like algorithm", not necessarily a direct hook.
>
Yes. My thought was that there should be very little cost to
opportunistically populating the pte for a page which is already
resident anyway.
> Anonymous pages seem much riskier, as presumably there's a no backing page
> except in the fork case.
>
> I presume the reason Jeremy is interested is because his pagefaults are more
> expensive than most (under virtualization), so he may well find a
> different tradeoff
> than I did (try running kernbench?)
>
Right. The faults themselves are more or less the same as the native
case, but setting a pte requires a hypercall compared to a memory write
in the native case. But I can set any number of ptes in one hypercall,
so batching would amortize the cost.
J
WARNING: multiple messages have this Message-ID (diff)
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Martin Bligh <mbligh@mbligh.org>
Cc: Christoph Lameter <cl@linux-foundation.org>,
Martin Bligh <mbligh@google.com>,
MinChan Kim <minchan.kim@gmail.com>,
Chris Snook <csnook@redhat.com>,
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>,
Avi Kivity <avi@qumranet.com>,
Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>
Subject: Re: Populating multiple ptes at fault time
Date: Thu, 18 Sep 2008 15:22:39 -0700 [thread overview]
Message-ID: <48D2D4AF.2050206@goop.org> (raw)
In-Reply-To: <8f3aa8d60809181518r697b5d7cp9e154fe73f804cc7@mail.gmail.com>
Martin Bligh wrote:
>>>> My patches were only for anonymous pages not for file backed because readahead
>>>> is available for file backed mappings.
>>>>
>>> Do we populate the PTEs though? I didn't think that was batched, but I
>>> might well be wrong.
>>>
>> We do not populate the PTEs and AFAICT PTE population was assumed not to be
>> performance critical since the backing media is comparatively slow.
>>
>
> I think the times when this matters are things like glibc, which are
> heavily shared -
> we were only 'prefaulting' when the pagecache was already there. So it's a case
> for a "readahead like algorithm", not necessarily a direct hook.
>
Yes. My thought was that there should be very little cost to
opportunistically populating the pte for a page which is already
resident anyway.
> Anonymous pages seem much riskier, as presumably there's a no backing page
> except in the fork case.
>
> I presume the reason Jeremy is interested is because his pagefaults are more
> expensive than most (under virtualization), so he may well find a
> different tradeoff
> than I did (try running kernbench?)
>
Right. The faults themselves are more or less the same as the native
case, but setting a pte requires a hypercall compared to a memory write
in the native case. But I can set any number of ptes in one hypercall,
so batching would amortize the cost.
J
--
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-18 22:22 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 17:47 Populating multiple ptes at fault time Jeremy Fitzhardinge
2008-09-17 17:47 ` Jeremy Fitzhardinge
2008-09-17 18:28 ` Rik van Riel
2008-09-17 18:28 ` Rik van Riel
2008-09-17 21:47 ` Jeremy Fitzhardinge
2008-09-17 21:47 ` Jeremy Fitzhardinge
2008-09-17 20:02 ` Chris Snook
2008-09-17 20:02 ` Chris Snook
2008-09-17 21:45 ` Jeremy Fitzhardinge
2008-09-17 21:45 ` Jeremy Fitzhardinge
2008-09-18 18:16 ` Christoph Lameter
2008-09-18 18:16 ` Christoph Lameter
2008-09-18 18:53 ` Jeremy Fitzhardinge
2008-09-18 18:53 ` Jeremy Fitzhardinge
2008-09-18 19:39 ` Christoph Lameter
2008-09-18 19:39 ` Christoph Lameter
2008-09-18 22:21 ` KOSAKI Motohiro
2008-09-18 22:21 ` KOSAKI Motohiro
2008-09-18 20:52 ` Martin Bligh
2008-09-18 20:52 ` Martin Bligh
2008-09-18 20:53 ` Chris Snook
2008-09-18 20:53 ` Chris Snook
2008-09-18 21:11 ` Martin Bligh
2008-09-18 21:11 ` Martin Bligh
2008-09-18 21:13 ` Christoph Lameter
2008-09-18 21:13 ` Christoph Lameter
2008-09-18 21:21 ` Martin Bligh
2008-09-18 21:21 ` Martin Bligh
2008-09-18 21:32 ` Christoph Lameter
2008-09-18 21:32 ` Christoph Lameter
2008-09-18 21:49 ` MinChan Kim
2008-09-18 21:49 ` MinChan Kim
2008-09-18 21:58 ` Christoph Lameter
2008-09-18 21:58 ` Christoph Lameter
2008-09-18 22:08 ` Martin Bligh
2008-09-18 22:08 ` Martin Bligh
2008-09-18 22:11 ` Christoph Lameter
2008-09-18 22:11 ` Christoph Lameter
2008-09-18 22:18 ` Martin Bligh
2008-09-18 22:18 ` Martin Bligh
2008-09-18 22:22 ` Jeremy Fitzhardinge [this message]
2008-09-18 22:22 ` Jeremy Fitzhardinge
2008-09-18 22:23 ` Chris Snook
2008-09-18 22:23 ` Chris Snook
2008-09-18 23:16 ` MinChan Kim
2008-09-18 23:16 ` MinChan Kim
2008-09-17 22:02 ` Avi Kivity
2008-09-17 22:02 ` Avi Kivity
2008-09-17 22:30 ` Jeremy Fitzhardinge
2008-09-17 22:30 ` Jeremy Fitzhardinge
2008-09-17 22:47 ` Avi Kivity
2008-09-17 22:47 ` Avi Kivity
2008-09-17 23:02 ` Jeremy Fitzhardinge
2008-09-17 23:02 ` Jeremy Fitzhardinge
2008-09-18 20:26 ` Avi Kivity
2008-09-18 20:26 ` Avi Kivity
2008-09-18 22:18 ` Jeremy Fitzhardinge
2008-09-18 22:18 ` Jeremy Fitzhardinge
2008-09-18 23:38 ` Avi Kivity
2008-09-18 23:38 ` Avi Kivity
2008-09-19 0:00 ` Jeremy Fitzhardinge
2008-09-19 0:00 ` Jeremy Fitzhardinge
2008-09-19 0:20 ` Avi Kivity
2008-09-19 0:20 ` Avi Kivity
2008-09-19 0:42 ` Jeremy Fitzhardinge
2008-09-19 0:42 ` Jeremy Fitzhardinge
2008-09-24 12:31 ` Avi Kivity
2008-09-24 12:31 ` Avi Kivity
2008-09-25 18:32 ` Jeremy Fitzhardinge
2008-09-25 18:32 ` Jeremy Fitzhardinge
2008-09-26 10:26 ` Martin Schwidefsky
2008-09-26 10:26 ` Martin Schwidefsky
2008-09-19 17:45 ` Benjamin Herrenschmidt
2008-09-19 17:45 ` Benjamin Herrenschmidt
2008-09-17 23:50 ` MinChan Kim
2008-09-17 23:50 ` MinChan Kim
2008-09-18 6:58 ` KOSAKI Motohiro
2008-09-18 6:58 ` KOSAKI Motohiro
2008-09-18 7:26 ` KAMEZAWA Hiroyuki
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=48D2D4AF.2050206@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=avi@qumranet.com \
--cc=cl@linux-foundation.org \
--cc=csnook@redhat.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mbligh@google.com \
--cc=mbligh@mbligh.org \
--cc=minchan.kim@gmail.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 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.