Re: [patch 6/6] Guest page hinting: s390 support.

From: Jeremy Fitzhardinge
Date: Thu Mar 13 2008 - 12:19:42 EST


Jeremy Fitzhardinge wrote:
Martin Schwidefsky wrote:
Vz->Vr cannot happen. This would be a bug in the host.

Does that mean that Vz is effectively identical to Uz?

Hm, on further thought:

If guests writes to Vz pages are disallowed, then the only way out of Vz is if the guest sets it to something else (Uz,Sz). If so, what's the point of using that state? Why not make:

Vr -> Uz host discard
Pr -> Uz host discard clean
Sp -> Uz set volatile
Uz -> Uz set volatile


But given how you've described V-state pages, I really would expect writes to a Vz to work, or alternatively, all writes to V-state pages to be disallowed. Are there any real uses for a writable Vr page?

On the other hand, removing Vz->Vr does clean up the dot graph a lot...

J 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" ];

/* Host actions */
Sr -> Sp [ label="host swap", style=dashed ];
Ur -> Uz [ label="host discard", style=dashed ];
Vr -> Vz [ label="host discard", style=dashed ];
Pr -> Sp [ label="host discard\n(dirty)", style=dashed ];
Pr -> Vz [ label="host discard\n(clean)", style=dashed ];
}

Attachment: gph.pdf
Description: Adobe PDF document