RE: [Xen-ia64-devel]PATCH] Remove duplicate check is_running_on_xen
This is updated one. --anthony Alex Williamson write on 2007年1月17日 11:10: On Wed, 2007-01-17 at 10:17 +0800, Xu, Anthony wrote: There are two duplicate checks as below, so there are two way to eliminate one check. 1. eliminate check in xen_get_tpr, then xen_get_tpr will never be called on bare metal, but it's a little perfomance impact, due to there is another switch inside __ia64_getreg. 2. eliminate check in xen_ia64_getreg, then xen_get_tpr will be called both on para platform or bare metal, it can produce better performance than option 1. so I prefer this. Is the performance difference actually measurable? I suspect it's effectively within the noise of any benchmark. I prefer option 1 because the leaf function when running on bare metal is the same as the native kernel, so we're not duplicating code. Thanks, Alex remove_duplicate_check2.patch Description: remove_duplicate_check2.patch ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
RE: [Xen-ia64-devel]PATCH] Remove duplicate check is_running_on_xen
On Wed, 2007-01-17 at 16:46 +0800, Xu, Anthony wrote: This is updated one. Thanks for re-writing. Applied. Alex -- Alex Williamson HP Open Source Linux Org. ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
Re: [Xen-ia64-devel]PATCH] Remove duplicate check is_running_on_xen
On Mon, 2007-01-15 at 13:33 +0800, Xu, Anthony wrote: Remove duplicate check is_running_on_xen Hi Anthony, I'm not sure I understand why the xen functions, for example xen_get_psr(), need to support both bare metal and paravirtualized since the caller always checks for is_running_on_xen. The current code seems overly paranoid. Would is make more sense to rename these to __xen_get_psr() and eliminate the running_on_xen check in the assembly? Then we could still use the native bare metal calls when running a Xen kernel on bare metal. Am I missing some reason why xen_get_psr() would ever get called on bare metal? Thanks, Alex diff -r 29780963b34f linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.SMon Jan 15 04:27:37 2007 +0800 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.SMon Jan 15 05:02:05 2007 +0800 @@ -11,12 +11,9 @@ GLOBAL_ENTRY(xen_get_psr) GLOBAL_ENTRY(xen_get_psr) movl r8=running_on_xen;; ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov r8=psr;; -(p7) br.ret.sptk.many rp - ;; - XEN_HYPER_GET_PSR - ;; + cmp.eq p7,p6=r8,r0;; +(p7) mov r8=psr +(p6) XEN_HYPER_GET_PSR br.ret.sptk.many rp ;; END(xen_get_psr) ... linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h --- a/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.hMon Jan 15 04:27:37 2007 +0800 +++ b/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.hMon Jan 15 05:08:12 2007 +0800 @@ -203,24 +203,16 @@ extern void xen_ptcga(unsigned long addr \ switch(regnum) {\ case _IA64_REG_PSR: \ - ia64_intri_res = (is_running_on_xen()) ?\ - xen_get_psr() : \ - __ia64_getreg(regnum); \ + ia64_intri_res = xen_get_psr(); \ break; \ -- Alex Williamson HP Open Source Linux Org. ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
RE: [Xen-ia64-devel]PATCH] Remove duplicate check is_running_on_xen
Alex Williamson write on 2007年1月17日 11:10: On Wed, 2007-01-17 at 10:17 +0800, Xu, Anthony wrote: There are two duplicate checks as below, so there are two way to eliminate one check. 1. eliminate check in xen_get_tpr, then xen_get_tpr will never be called on bare metal, but it's a little perfomance impact, due to there is another switch inside __ia64_getreg. 2. eliminate check in xen_ia64_getreg, then xen_get_tpr will be called both on para platform or bare metal, it can produce better performance than option 1. so I prefer this. Is the performance difference actually measurable? I suspect it's effectively within the noise of any benchmark. I prefer option 1 because the leaf function when running on bare metal is the same as the native kernel, so we're not duplicating code. Thanks, Okey, I will do this. Anthony Alex ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
Re: [Xen-ia64-devel]PATCH] Remove duplicate check is_running_on_xen
On Tue, 2007-01-16 at 13:50 +0900, INAKOSHI Hiroya wrote: Hi, here is a result evaluating the series of Anthony's patches. The throughput of syscall in unixbench has been lifted more than 2 times totally. Details are below: Wow, impressive numbers. Nice work Anthony! Thanks for testing and reporting these results as well. Alex -- Alex Williamson HP Open Source Linux Org. ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel