All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86/HVM: fold hypercall tables
Date: Wed, 17 Feb 2016 14:35:49 +0000	[thread overview]
Message-ID: <56C48545.9010001@citrix.com> (raw)
In-Reply-To: <56C19FD802000078000D1F49@prv-mh.provo.novell.com>

On 15/02/16 08:52, Jan Beulich wrote:
>>>> On 15.02.16 at 09:26, <andrew.cooper3@citrix.com> wrote:
>> On 15/02/2016 07:42, Jan Beulich wrote:
>>> @@ -5395,7 +5398,7 @@ int hvm_do_hypercall(struct cpu_user_reg
>>>          }
>>>  #endif
>>>  
>>> -        regs->_eax = hvm_hypercall32_table[eax](ebx, ecx, edx, esi, edi, ebp);
>>> +        regs->_eax = hypercall_table[eax].compat(ebx, ecx, edx, esi, edi, 
>> ebp);
>>>  
>> I know its in a different translation unit, but we already have a
>> hypercall_table and it is a global symbol.  Please could we retain the
>> hvm_ prefix here.
> I'm aware of that and removed the prefix knowingly. I see no
> reason why it needs to be there.

Redundant prefixes like this are not for the benefit of the compiler. 
They are for the benefit of humans reading the code.

You, as an individual who is very familiar with the codebase, might have
no problem identifying which actual symbol is intended.

Being open source, the intended audience is the average C programmer who
can make alterations, but isn't completely familiar with the codebase,
and likely be navigating the source code with tools such as
grep/cscope/ctags/other.

Whether the symbols are static or not, they should distinguishable to
humans.

>  With static symbols now getting
> prefixed by their file names in stack dumps and alike, I think we
> should actually get rid of any such redundant static symbol name
> prefixes (scheduler code being one of the biggest "user" of such).

The problem with the scheduler code is that it used to use the same
static prefix for different schedulers.

>
>> Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Please clarify whether the R-b stands nevertheless, or whether
> we need to have a longer debate first.

My R-b does not stand.

~Andrew

  reply	other threads:[~2016-02-17 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15  7:42 [PATCH] x86/HVM: fold hypercall tables Jan Beulich
2016-02-15  8:26 ` Andrew Cooper
2016-02-15  8:52   ` Jan Beulich
2016-02-17 14:35     ` Andrew Cooper [this message]
2016-02-17 14:51       ` Jan Beulich

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=56C48545.9010001@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.