public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: jdike@karaya.com
Cc: user-mode-linux-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: UML and fastcall/FASTCALL
Date: Fri, 8 Dec 2006 13:59:28 +0100	[thread overview]
Message-ID: <20061208125928.GA25427@stusta.de> (raw)

UML on i386 is now the only case where fastcall/FASTCALL is not a noop.

There are two use cases for fastcall/FASTCALL in UML on i386:


1. optimization for C code
A faster calling convention is used for the functions annotated this way.


2. interfacing with assembler code
But include/asm-um/linkage.h contains the following:

<--  snip  -->

#ifndef __ASM_UM_LINKAGE_H
#define __ASM_UM_LINKAGE_H

#include "asm/arch/linkage.h"


/* <linux/linkage.h> will pick sane defaults */
#ifdef CONFIG_GPROF
#undef FASTCALL
#undef fastcall
#endif

#endif

<--  snip  -->

E.g. if CONFIG_SMP was still available on UML, CONFIG_SMP=y, 
CONFIG_GPROF=y would have some horrible effects when calling the 
functions in arch/i386/lib/semaphore.S.


Are there any benchmark numbers that the existing fastcall/FASTCALL 
annotations in the kernel really make a measurable difference for
C code?

Otherwise, we could use it only for assembler code using this calling 
convention (if there is any used by UML) - and CONFIG_GPROF mustn't 
change this.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


             reply	other threads:[~2006-12-08 12:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-08 12:59 Adrian Bunk [this message]
2006-12-08 16:33 ` UML and fastcall/FASTCALL Jeff Dike
2006-12-08 18:04   ` Adrian Bunk

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=20061208125928.GA25427@stusta.de \
    --to=bunk@stusta.de \
    --cc=jdike@karaya.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox