From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH] xen: cache current vcpu Date: Tue, 30 Oct 2007 10:54:15 +0000 Message-ID: <47271B67.76E4.0078.0@novell.com> References: <200710291643.45546.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Christoph Egger , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> Keir Fraser 29.10.07 18:23 >>> >Gcc is quite capable of eliminating common subexpressions involving >current(), ... I have to partly disagree here: While gcc is capable of doing this, it = cannot do anything about uses of current that have function calls in between, and I also don't think making get_current() an __attribute__((__pure__)) = inline function would be correct. I do agree that in certain places using current is more readable, albeit I think that there are quite a few places where it is already non-obvious = that 'v' denotes 'current' (perhaps naming might just help here - if 'v' only = ever gets set from 'current' in a function, renaming it to 'cur' might be = reasonable to consider). Jan