On Mon, Nov 19, 2012 at 01:36:42PM +0100, Alexander Graf wrote: > > Aren't atomic reads expensive? Doing one on every guest HPTE modification (when nobody is listening) sounds quite excessive. Wouldn't it be cheaper to just always update the bit? As Scott said, it's just an ordinary load. The reason for not setting the bit always is to make the first pass of reading the HPT quicker. That first pass sends all HPTEs, and clears the modified bits of any HPTEs that have it set. If the modified bit is set, we have to lock the HPTE in order to clear the modified bit, even if the HPTE is invalid, whereas we don't have to lock invalid HPTEs if they don't have the modified bit set. > It probably makes sense to make this a RESERVED mask, so that if we ever want to use another bit for host information, we can just add that to the respective mask. Also, you should probably clear the reserved bits (or bail out when set) on h_enter. OK, and yes good point about clearing the reserved bits on H_ENTER. Regards, Paul. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html