From: "Jan Beulich" <jbeulich@novell.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: Christoph Egger <Christoph.Egger@amd.com>, xen-devel@lists.xensource.com
Subject: Re: [PATCH] xen: cache current vcpu
Date: Tue, 30 Oct 2007 10:54:15 +0000 [thread overview]
Message-ID: <47271B67.76E4.0078.0@novell.com> (raw)
In-Reply-To: <C34BC77D.17957%Keir.Fraser@cl.cam.ac.uk>
>>> Keir Fraser <Keir.Fraser@cl.cam.ac.uk> 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
prev parent reply other threads:[~2007-10-30 10:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-29 15:43 [PATCH] xen: cache current vcpu Christoph Egger
2007-10-29 17:23 ` Keir Fraser
2007-10-29 18:23 ` Christoph Egger
2007-10-30 10:54 ` Jan Beulich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47271B67.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=Christoph.Egger@amd.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.