Re: [PATCH 03/13] jump label v9: x86 support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Thursday, June 10, 2010 - 9:24 am

On Thu, Jun 10, 2010 at 05:37:42PM +0200, Ingo Molnar wrote:

I didn't make these decisions, but I assume who made them had good reasons
and enough data on larger benchmarks too.


Maybe, maybe not. But yes it can be approached from both ways.

Personally I would prefer to simply write less bloated code to get
code reductions. Simpler code is often faster too.


Yes that works too for those who still use -Os. 

e.g. marking the scheduler and a few mm hot paths this way would certain make sense.


In some cases agreed, but common cases it's really: you asked for the smallest
you got it, even if it's slow. It's not -Odwim. 

One standard example here is a division by constant. The shortest way is 
using DIVI/IDIV if it's not 2^n and small enough, but it's really quite slow 
in hardware.  If you spend a few more bytes you can do much better for a wide 
range of constants.

Most likely we would need a new -O flag to avoid such cases. 

BTW I experimented with marking a few common cases like this (e.g. time unit 
conversion) hot, but gcc currently has trouble with __hot on inlines. So you
would always need to mark the caller.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/13] jump label v9, Jason Baron, (Wed Jun 9, 2:38 pm)
[PATCH 02/13] jump label v9: base patch, Jason Baron, (Wed Jun 9, 2:38 pm)
[PATCH 03/13] jump label v9: x86 support, Jason Baron, (Wed Jun 9, 2:39 pm)
[PATCH 05/13] jump label v9: add module support, Jason Baron, (Wed Jun 9, 2:39 pm)
[PATCH 13/13] jump label v9: add docs, Jason Baron, (Wed Jun 9, 2:39 pm)
Re: [PATCH 01/13] jump label v9: notifier atomic call chai ..., Frederic Weisbecker, (Wed Jun 9, 2:58 pm)
Re: [PATCH 02/13] jump label v9: base patch, Frederic Weisbecker, (Wed Jun 9, 3:35 pm)
Re: [PATCH 02/13] jump label v9: base patch, Frederic Weisbecker, (Wed Jun 9, 3:36 pm)
Re: [PATCH 02/13] jump label v9: base patch, Peter Zijlstra, (Thu Jun 10, 5:06 am)
Re: [PATCH 03/13] jump label v9: x86 support, Peter Zijlstra, (Thu Jun 10, 5:12 am)
Re: [PATCH 03/13] jump label v9: x86 support, Ingo Molnar, (Thu Jun 10, 5:14 am)
Re: [PATCH 03/13] jump label v9: x86 support, Peter Zijlstra, (Thu Jun 10, 5:15 am)
Re: [PATCH 02/13] jump label v9: base patch, Peter Zijlstra, (Thu Jun 10, 5:18 am)
Re: [PATCH 03/13] jump label v9: x86 support, Peter Zijlstra, (Thu Jun 10, 5:33 am)
Re: [PATCH 13/13] jump label v9: add docs, Peter Zijlstra, (Thu Jun 10, 5:49 am)
Re: [PATCH 03/13] jump label v9: x86 support, Andi Kleen, (Thu Jun 10, 6:26 am)
Re: [PATCH 03/13] jump label v9: x86 support, Peter Zijlstra, (Thu Jun 10, 7:12 am)
Re: [PATCH 03/13] jump label v9: x86 support, Andi Kleen, (Thu Jun 10, 7:28 am)
Re: [PATCH 03/13] jump label v9: x86 support, Jason Baron, (Thu Jun 10, 8:04 am)
Re: [PATCH 03/13] jump label v9: x86 support, Ingo Molnar, (Thu Jun 10, 8:37 am)
Re: [PATCH 02/13] jump label v9: base patch, Jason Baron, (Thu Jun 10, 8:44 am)
Re: [PATCH 03/13] jump label v9: x86 support, Mathieu Desnoyers, (Thu Jun 10, 9:13 am)
Re: [PATCH 02/13] jump label v9: base patch, Ingo Molnar, (Thu Jun 10, 9:22 am)
Re: [PATCH 03/13] jump label v9: x86 support, Andi Kleen, (Thu Jun 10, 9:24 am)
Re: [PATCH 03/13] jump label v9: x86 support, Steven Rostedt, (Thu Jun 10, 9:29 am)
Re: [PATCH 02/13] jump label v9: base patch, Frederic Weisbecker, (Thu Jun 10, 10:11 am)
Re: [PATCH 03/13] jump label v9: x86 support, Jason Baron, (Thu Jun 10, 5:52 pm)
Re: [PATCH 03/13] jump label v9: x86 support, H. Peter Anvin, (Thu Jun 10, 11:18 pm)
Re: [PATCH 03/13] jump label v9: x86 support, Ingo Molnar, (Fri Jun 11, 12:58 am)
Re: [PATCH 03/13] jump label v9: x86 support, Ingo Molnar, (Fri Jun 11, 1:12 am)
Re: [PATCH 03/13] jump label v9: x86 support, Andi Kleen, (Fri Jun 11, 1:30 am)
Re: [PATCH 00/13] jump label v9, David Miller, (Mon Jun 14, 8:47 pm)
Re: [PATCH 00/13] jump label v9, Jason Baron, (Tue Jun 15, 7:28 am)
Re: [PATCH 00/13] jump label v9, Mathieu Desnoyers, (Tue Jun 15, 8:44 am)
Re: [PATCH 00/13] jump label v9, David Miller, (Tue Jun 15, 10:13 am)
Re: [PATCH 00/13] jump label v9, H. Peter Anvin, (Tue Jun 15, 10:28 am)
Re: [PATCH 00/13] jump label v9, Tony Breeds, (Thu Jun 17, 8:45 pm)
Re: [PATCH 00/13] jump label v9, Mathieu Desnoyers, (Fri Jun 18, 8:18 am)