Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
- From: "H. Peter Anvin" <hpa@xxxxxxxxx>
- Date: Thu, 08 Jan 2009 21:00:08 -0800
Linus Torvalds wrote:
First off, gcc _does_ have a perfectly fine notion of how heavy-weight an
"asm" statement is: just count it as a single instruction (and count the
argument setup cost that gcc _can_ estimate).
True. It's not what it's doing, though. It looks for '\n' and ';'
characters, and counts the maximum instruction size for each possible
instruction.
The reason why is that gcc's size estimation is partially designed to
select what kind of branches it needs to use on architectures which have
more than one type of branches. As a result, it tends to drastically
overestimate, on purpose.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [PATCH -v5][RFC]: mutex: implement adaptive spinning
- From: Peter Zijlstra
- Re: [PATCH -v5][RFC]: mutex: implement adaptive spinning
- From: Linus Torvalds
- Re: [PATCH -v5][RFC]: mutex: implement adaptive spinning
- From: Peter Zijlstra
- Re: [PATCH -v5][RFC]: mutex: implement adaptive spinning
- From: Linus Torvalds
- [PATCH -v6][RFC]: mutex: implement adaptive spinning
- From: Peter Zijlstra
- Re: [PATCH -v6][RFC]: mutex: implement adaptive spinning
- From: Ingo Molnar
- [PATCH -v7][RFC]: mutex: implement adaptive spinning
- From: Peter Zijlstra
- Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
- From: Linus Torvalds
- Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
- From: Chris Mason
- Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
- From: Linus Torvalds
- Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
- From: Ingo Molnar
- Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
- From: H. Peter Anvin
- Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
- From: Linus Torvalds
- Re: [PATCH -v5][RFC]: mutex: implement adaptive spinning
- Prev by Date: Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
- Next by Date: Re: [PATCH 1/2] Driver for user access to internal timer
- Previous by thread: Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
- Next by thread: [patch] measurements, numbers about CONFIG_OPTIMIZE_INLINING=y impact
- Index(es):
Relevant Pages
|