* H. Peter Anvin <hpa@zytor.com> wrote:the counter argument was that by specific sched.o analysis, this results in slower code. The reason is that the "function call parameter preparation" halo around that 5-byte patch site is larger than that single conditional branch operation to an offline place of the current function is. i.e. the current optimized marker approach does roughly this: [ .... fastpath head .... ] [ immediate value instruction ] ---> [ branch instruction ] ---> these two get NOP-ed out [ .... fastpath tail .... ] [ ............................. ] [ ... offline area ............ ] [ ... parameter preparation ... ] [ ... marker call ............. ] your proposed 5-byte call NOP approach (which btw. was what i proposed multiple times in the past 2 years) would do this: [ .... fastpath head ...... ] [ ... parameter preparation ... ] [ .... 5-byte CALL .......... ] ---> NOP-ed out [ .... fastpath tail .......... ] [ ............................. ] in the first case we have little "marker parameter/value preparation" cost: it all happens in the 'offline area' _by GCC_. I.e. the fastpath is relatively undisturbed. in the latter case, all the 'parameter preparation' phase has to happen at around the 5-byte CALL site, in the fastpath. This, in the specific, assembly level analysis of sched.o, was shown by Matthieu to be a pessimisation. We are better off by inserting that conditional and letting gcc generate the call, than by forcing it in the middle of the fastpath - even if we end up NOP-ing out the call. wrt. complexity i agree with you - if the current optimization cannot be made correctly we have to fall back to a simpler variant, even if it's slower. Ingo --
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Tim Tassonis | reiser4 for 2.6.27-rc1 |
| Roland Dreier | Re: Integration of SCST in the mainstream Linux kernel |
| Jarek Poplawski | Re: [BUG] New Kernel Bugs |
git: | |
| Junio C Hamano | Re: Comments on recursive merge.. |
| Ken Pratt | Re: pack operation is thrashing my server |
| Junio C Hamano | [ANNOUNCE] GIT 1.5.4 |
| Chris Hoffman | git-daemon on Windows? |
| Peter Zijlstra | [BUG?] sendfile / distcc |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Mark Lord | Re: 2.6.25-rc8: FTP transfer errors |
| Ilpo Järvinen | Re: [PATCH 2/4] tcpv6: trivial formatting changes to send_(ack|reset) |
| Richard Stallman | Real men don't attack straw men |
| Diana Eichert | OpenBSD on decTOP? |
| Jeff Ross | U320 Drive on U160 controller? |
| Sebastian Reitenbach | problems with hoststated and relayd |
