lkml.org 
[lkml]   [2008]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 6/6] Guest page hinting: s390 support.
Martin Schwidefsky wrote:
> The state transitions (a diagram would be nicer but that is too hard
> to do in ascii art...):
> {Ur,Sr,Vr,Pr}: a resident page will change its block usage state if the
> guest requests it with page_set_{unused,stable,volatile}.
> {Uz,Sz,Vz}: a logically zero page will change its block usage state if the
> guest requests it with page_set_{unused,stable,volatile}. The
> guest can't create the Pz state, the state will be Vz instead.
> Ur -> Uz: the host system can remove an unused, resident page from memory
> Sz -> Sr: on first access a stable, logically zero page will become resident
> Sr -> Sp: the host system can swap a stable page to disk
> Sp -> Sr: a guest access to a Sp page forces the host to retrieve it
> Vr -> Vz: the host can discard a volatile page
> Sp -> Uz: a page preserved by the host will be removed if the guest sets
> the block usage state to unused.
> Sp -> Vz: a page preserved by the host will be discarded if the guest sets
> the block usage state to volatile.
> Pr -> Sp: the host can move a page from Pr to Sp if it discovers that the
> page is dirty while trying to discard the page. The page content is
> written to the paging device.
> Pr -> Vz: the host can discard a Pr page. The Pz state is replaced by the
> Vz state.

I created the attached .dot graph based purely on this description. It
looks reasonable, but I didn't see how a page enters a Pr state.

J
digraph gph {
Ur -> Sr [ label="page_set_stable" ];
Ur -> Vr [ label="page_set_volatile" ];
Ur -> Ur [ label="page_set_unused" ];

Sr -> Sr [ label="page_set_stable" ];
Sr -> Vr [ label="page_set_volatile" ];
Sr -> Ur [ label="page_set_unused" ];

Vr -> Sr [ label="page_set_stable" ];
Vr -> Vr [ label="page_set_volatile" ];
Vr -> Ur [ label="page_set_unused" ];

Uz -> Sz [ label="page_set_stable" ];
Uz -> Vz [ label="page_set_volatile" ];
Uz -> Uz [ label="page_set_unused" ];

Sz -> Sz [ label="page_set_stable" ];
Sz -> Vz [ label="page_set_volatile" ];
Sz -> Uz [ label="page_set_unused" ];

Vz -> Sz [ label="page_set_stable" ];
Vz -> Vz [ label="page_set_volatile" ];
Vz -> Uz [ label="page_set_unused" ];

Ur -> Uz [ label="host evict" ];

Sz -> Sr [ label="guest write" ];
Sr -> Sp [ label="host swap" ];
Sp -> Sr [ label="guest access" ];

Sp -> Uz [ label="guest discard" ];
Sp -> Vz [ label="page_set_volatile" ];

Pr -> Sp [ label="host discard dirty" ];
Pr -> Vz [ label="host discard clean" ];
}
[unhandled content-type:application/pdf]
\
 
 \ /
  Last update: 2008-03-12 17:23    [W:0.212 / U:3.020 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site