Liu, Jinsong
2009-Jan-22 03:08 UTC
[PATCH 1/4][Xen-devel] X86 microcode: cancel redundant input parameter of microcode functions
X86 microcode: cancel redundant input parameter of microcode functions Cancel redundant input parameter ''uci'', since it can get from another input parameter ''cpu'' as index. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christoph Egger
2009-Jan-22 08:42 UTC
Re: [PATCH 1/4][Xen-devel] X86 microcode: cancel redundant input parameter of microcode functions
On Thursday 22 January 2009 04:08:21 Liu, Jinsong wrote:> X86 microcode: cancel redundant input parameter of microcode functions > > Cancel redundant input parameter ''uci'', since it can get from another input > parameter ''cpu'' as index. > > Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>I added the parameter ''uci'' to reduce dependency on a global variable. That improves reentrancy and cache locality. If you want to go a step forward rather back, then remove the ''cpu'' parameter instead. Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Liu, Jinsong
2009-Jan-22 10:54 UTC
RE: [PATCH 1/4][Xen-devel] X86 microcode: cancel redundant input parameter of microcode functions
Christoph Egger wrote:> On Thursday 22 January 2009 04:08:21 Liu, Jinsong wrote: >> X86 microcode: cancel redundant input parameter of microcode >> functions >> >> Cancel redundant input parameter ''uci'', since it can get from >> another input parameter ''cpu'' as index. >> >> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> > > I added the parameter ''uci'' to reduce dependency on a global variable. > That improves reentrancy and cache locality. > > If you want to go a step forward rather back, then remove the ''cpu'' > parameter instead. > > ChristophI think the input parameter ''cpu'' is better than ''uci'' since ''cpu'' is much clear to developer with explicit meaning, so between the 2 redundant parameters ''uci'' and ''cpu'', we should remove ''uci'', just like what native linux microcode functions do. As for cache locality, it''s not important for microcode functions since it''s not in key path, seldom be called. BTW, we''d better keep consistent with native linux code for the sake of futher porting and upgrade, you know, the latest linux kernel (2.6.28) still has some issues for microcode ... Thanks, Jinsong _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christoph Egger
2009-Jan-22 11:07 UTC
Re: [PATCH 1/4][Xen-devel] X86 microcode: cancel redundant input parameter of microcode functions
On Thursday 22 January 2009 11:54:15 Liu, Jinsong wrote:> Christoph Egger wrote: > > On Thursday 22 January 2009 04:08:21 Liu, Jinsong wrote: > >> X86 microcode: cancel redundant input parameter of microcode > >> functions > >> > >> Cancel redundant input parameter ''uci'', since it can get from > >> another input parameter ''cpu'' as index. > >> > >> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> > > > > I added the parameter ''uci'' to reduce dependency on a global variable. > > That improves reentrancy and cache locality. > > > > If you want to go a step forward rather back, then remove the ''cpu'' > > parameter instead. > > > > Christoph > > I think the input parameter ''cpu'' is better than ''uci'' since ''cpu'' is much > clear to developer with explicit meaning, so between the 2 redundant > parameters ''uci'' and ''cpu'', we should remove ''uci'', just like what native > linux microcode functions do.What linux does, doesn''t matter here. Dom0 just has to make the hypercall. This is nothing linux specific.> As for cache locality, it''s not important for microcode functions since > it''s not in key path, seldom be called.Right, but better reentrancy is always good.> BTW, we''d better keep consistent > with native linux code for the sake of futher porting and upgrade, you > know, the latest linux kernel (2.6.28) still has some issues for microcode > ...You should have hear yourself. Someone else can say: BTW, we''d better keep consistent with native Solaris code for the sake of further porting and upgrade. It doesn''t suffer on the Linux issues. And another guy can say: BTW, we''d better keep consistent with native BSD code for the sake of further porting and upgrade. You see what I mean? Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Jan-22 11:14 UTC
Re: [PATCH 1/4][Xen-devel] X86 microcode: cancel redundant input parameter of microcode functions
On 22/01/2009 11:07, "Christoph Egger" <Christoph.Egger@amd.com> wrote:>> I think the input parameter ''cpu'' is better than ''uci'' since ''cpu'' is much >> clear to developer with explicit meaning, so between the 2 redundant >> parameters ''uci'' and ''cpu'', we should remove ''uci'', just like what native >> linux microcode functions do. > > What linux does, doesn''t matter here. Dom0 just has to make the hypercall. > This is nothing linux specific.Like much of Xen''s low-level platform code, our microcode mechanism has direct Linux heritage. Hence keeping as close as possible to those roots makes upgrades from kernel.org upstream much easier. Hence there is good reason for caring about closeness to Linux code compared with solaris/bsd/... -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel