From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Date: Wed, 20 Aug 2008 12:53:57 +0000 Subject: Re: [PATCH 4/4] kvmppc: convert wrteei to wrtee as kvm guest optimization Message-Id: <48AC13E5.5010503@linux.vnet.ibm.com> List-Id: References: <1219142204-12044-1-git-send-email-ehrhardt@linux.vnet.ibm.com> <1219142204-12044-5-git-send-email-ehrhardt@linux.vnet.ibm.com> <200808191342.29918.arnd@arndb.de> In-Reply-To: <200808191342.29918.arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Arnd Bergmann Cc: linuxppc-dev@ozlabs.org, hollisb@us.ibm.com, kvm-ppc@vger.kernel.org Arnd Bergmann wrote: > On Tuesday 19 August 2008, ehrhardt@linux.vnet.ibm.com wrote: > =20 >> Dependent on the already existing CONFIG_KVM_GUEST config option this pa= tch >> changes wrteei to wrtee allowing the hypervisor to rewrite those to nont= rapping >> instructions. Maybe we should split the kvm guest otpimizations in two p= arts >> one for the overhead free optimizations and on for the rest that might a= dd >> some complexity for non virtualized execution (like this one). >> >> Signed-off-by: Christian Ehrhardt >> =20 > > How significant is the performance impact of this change for non-virtuali= zed > systems? If it's very low, maybe you should not bother with the #ifdef, a= nd > if it's noticable, you might be better off using dynamic patching for thi= s. > > Arnd <>< > =20 To be honest I unfortunately don't know how big the impact for=20 non-virtualized systems is. I would like to test it, but without=20 hardware performance counters on the core I have I'm not sure (yet) how=20 to measure that in a good way - any suggestion welcome. I'm really sure that any jumping around style dynamic patching in the=20 guest like function pointers etc will be slower than just let the load=20 be there. Unfortunately I can not rewrite it from the hypervisor because=20 for "wrteei" I would need a "stwi" to rewrite it in one instruction. The patch as it is today let you choose between 10% benefit for=20 virtualized guest and an unkown but surely very small overhead on native=20 hardware. --=20 Gr=FCsse / regards,=20 Christian Ehrhardt IBM Linux Technology Center, Open Virtualization