From: Jeremy Fitzhardinge <jeremy@goop.org>
To: schwidefsky@de.ibm.com
Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
virtualization@lists.osdl.org, akpm@osdl.org,
nickpiggin@yahoo.com.au, frankeh@watson.ibm.com,
hugh@veritas.com
Subject: Re: [patch 6/6] Guest page hinting: s390 support.
Date: Wed, 12 Mar 2008 10:48:33 -0700 [thread overview]
Message-ID: <47D81771.5070400@goop.org> (raw)
In-Reply-To: <1205341164.8851.44.camel@localhost>
[-- Attachment #1: Type: text/plain, Size: 2397 bytes --]
Martin Schwidefsky wrote:
> On Wed, 2008-03-12 at 09:44 -0700, Jeremy Fitzhardinge wrote:
>
>> Martin Schwidefsky wrote:
>>
>>> That is the first block of state transitions: {Ur,Sr,Vr,Pr}
>>> You can go from any of the four states to any of the remaining three.
>>>
>>>
>> You only mention page_set_{unused,stable,volatile}. Is
>> page_set_stable_if_present() the fourth. And shouldn't that be
>> "stable_if_clean":
>>
>
> page_set_volatile has a "writable" argument. For writable==0 you get a
> Vx page, for writable==1 you get a Px page.
>
Hm. But a Vx page is writable isn't it? It's just that its contents
can go away at any time. Or does the kernel treat Vx pages as strictly
RO cached copies of other things?
It also seems to me that given you talking about "potentially volatile"
as a distinct state, it would would be best to have a distinct
state-setting function associated with it, so there's a 1:1
correspondence between the code and the description.
> With stable_if_clean you are refering to stable_if_present?
No. I misunderstood and thought that stable_if_present sets the Px
state. I'd overlooked the writable flag on page_set_volatile().
> If yes the
> answer is that this operation is used to get a page from Vx/Px back to
> Sx but only if the page has not been discarded.
So you mean it will change Vr/Pr to Sr but everything else will fail?
Are there there any other non-discarded states for Vx/Px?
> The operation will fail
> if the page state is Vz/Pz.
Do mean just Vz here? You say that Pz is never used.
> Your understanding is good, but how can I make this less confusing? A Px
> page that is dirty may not be discarded which makes it basically stable.
> The guest state still is potential volatile though as it does not have a
> state of Sx.
>
Mainly, use identical terminology in code and description so they can be
easily compared. I found the diagram was quite helpful in understanding
what's going on; feel free to include it in your documentation.
Updated .dot attached; I've updated it to include the page_set_volatile
writable argument and the stable_if_present transitions; commented it,
removed the self-edges which were cluttering things up.
Also, does a page go from Vz->Vr on guest memory write? If so, does a
clean page which goes from Pr->Vz->Vr lose its Px state in the process?
J
[-- Attachment #2: gph.dot --]
[-- Type: text/plain, Size: 1274 bytes --]
digraph gph {
/* Guest state changes on resident pages */
Ur -> Sr [ label="set stable" ];
Ur -> Vr [ label="set volatile\n(w=0)" ];
Ur -> Pr [ label="set volatile\n(w=1)" ];
Sr -> Ur [ label="set unused" ];
Sr -> Vr [ label="set volatile\n(w=0)" ];
Sr -> Pr [ label="set volatile\n(w=1)" ];
Vr -> Sr [ label="set stable(_if_present)" ];
Vr -> Ur [ label="set unused" ];
Vr -> Pr [ label="set volatile\n(w=1)" ];
Pr -> Sr [ label="set stable(_if_present)" ];
Pr -> Vr [ label="set volatile\n(w=0)" ];
Pr -> Ur [ label="set unused" ];
/* Guest state changes on zero pages */
Uz -> Sz [ label="set stable" ];
Uz -> Vz [ label="set volatile" ];
Sz -> Vz [ label="set volatile" ];
Sz -> Uz [ label="set unused" ];
Vz -> Sz [ label="set stable" ];
Vz -> Uz [ label="set unused" ];
/* Guest state changes on host-swapped pages */
Sp -> Uz [ label="set unused" ];
Sp -> Vz [ label="set volatile" ];
/* Guest touches pages */
Sz -> Sr [ label="guest write" ];
Sp -> Sr [ label="guest access" ];
Vz -> Vr [ label="guest write" ];
/* Host actions */
Sr -> Sp [ label="host swap" ];
Ur -> Uz [ label="host discard" ];
Vr -> Vz [ label="host discard" ];
Pr -> Sp [ label="host discard\n(dirty)" ];
Pr -> Vz [ label="host discard\n(clean)" ];
}
[-- Attachment #3: gph.pdf --]
[-- Type: application/pdf, Size: 16298 bytes --]
next prev parent reply other threads:[~2008-03-12 17:50 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 13:21 [patch 0/6] Guest page hinting version 6 Martin Schwidefsky
2008-03-12 13:21 ` [patch 1/6] Guest page hinting: core + volatile page cache Martin Schwidefsky
2008-03-12 23:12 ` Rusty Russell
2008-03-13 9:24 ` Martin Schwidefsky
2008-03-12 13:21 ` [patch 2/6] Guest page hinting: volatile swap cache Martin Schwidefsky
2008-03-12 13:21 ` [patch 3/6] Guest page hinting: mlocked pages Martin Schwidefsky
2008-03-12 23:27 ` Rusty Russell
2008-03-13 9:13 ` Martin Schwidefsky
2008-03-12 13:21 ` [patch 4/6] Guest page hinting: writable page table entries Martin Schwidefsky
2008-03-12 23:35 ` Rusty Russell
2008-03-13 9:11 ` Martin Schwidefsky
2008-03-12 13:21 ` [patch 5/6] Guest page hinting: minor fault optimization Martin Schwidefsky
2008-03-12 13:21 ` [patch 6/6] Guest page hinting: s390 support Martin Schwidefsky
2008-03-12 16:19 ` Jeremy Fitzhardinge
2008-03-12 16:28 ` Martin Schwidefsky
2008-03-12 16:44 ` Jeremy Fitzhardinge
2008-03-12 16:59 ` Martin Schwidefsky
2008-03-12 17:48 ` Jeremy Fitzhardinge [this message]
2008-03-12 20:04 ` Anthony Liguori
2008-03-12 20:45 ` Jeremy Fitzhardinge
2008-03-12 20:56 ` Anthony Liguori
2008-03-12 21:36 ` Jeremy Fitzhardinge
2008-03-13 9:45 ` Martin Schwidefsky
2008-03-13 16:07 ` Jeremy Fitzhardinge
2008-03-13 16:17 ` Jeremy Fitzhardinge
2008-03-13 16:55 ` Martin Schwidefsky
2008-03-13 17:05 ` Jeremy Fitzhardinge
2008-03-13 17:23 ` Martin Schwidefsky
2008-03-13 9:42 ` Martin Schwidefsky
2008-03-13 9:36 ` Martin Schwidefsky
2008-03-13 9:32 ` Martin Schwidefsky
2008-03-12 22:41 ` [patch 0/6] Guest page hinting version 6 Rusty Russell
2008-03-13 9:47 ` Martin Schwidefsky
2008-03-13 16:57 ` Hugh Dickins
2008-03-13 17:14 ` Martin Schwidefsky
2008-03-13 17:45 ` Zachary Amsden
2008-03-13 19:45 ` Andrea Arcangeli
2008-03-13 21:41 ` Zachary Amsden
2008-03-13 18:41 ` Jeremy Fitzhardinge
2008-03-13 18:55 ` Hugh Dickins
2008-03-13 19:53 ` Zachary Amsden
2008-03-14 18:30 ` Jeremy Fitzhardinge
2008-03-14 21:32 ` Zachary Amsden
2008-03-14 21:37 ` Jeremy Fitzhardinge
2008-03-17 9:21 ` Martin Schwidefsky
2008-05-06 15:33 ` Martin Schwidefsky
2008-05-06 19:46 ` Rik van Riel
2008-05-07 3:49 ` Zachary Amsden
2008-05-07 7:00 ` Martin Schwidefsky
-- strict thread matches above, loose matches on Subject: below --
2009-03-27 15:09 [patch 0/6] Guest page hinting version 7 Martin Schwidefsky
2009-03-27 15:09 ` [patch 6/6] Guest page hinting: s390 support Martin Schwidefsky
2009-04-01 16:18 ` Rik van Riel
2007-06-28 16:40 [patch 0/6] resend: guest page hinting version 5 Martin Schwidefsky
2007-06-28 16:40 ` [patch 6/6] Guest page hinting: s390 support Martin Schwidefsky
2007-05-11 13:58 [patch 0/6] [rfc] guest page hinting version 5 Martin Schwidefsky
2007-05-11 13:58 ` [patch 6/6] Guest page hinting: s390 support Martin Schwidefsky
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=47D81771.5070400@goop.org \
--to=jeremy@goop.org \
--cc=akpm@osdl.org \
--cc=frankeh@watson.ibm.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=schwidefsky@de.ibm.com \
--cc=virtualization@lists.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