From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pavel Machek <pavel@ucw.cz>, Ingo Molnar <mingo@elte.hu>,
"Frank Ch. Eigler" <fche@redhat.com>,
"K. Prasad" <prasad@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
dipankar@in.ibm.com, ego@in.ibm.com, paulmck@linux.vnet.ibm.com,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/2] Markers Implementation for Preempt RCU Boost Tracing
Date: Mon, 14 Jan 2008 14:36:53 -0500 [thread overview]
Message-ID: <20080114193653.GA20774@Krystal> (raw)
In-Reply-To: <alpine.LFD.1.00.0801140824430.2806@woody.linux-foundation.org>
* Linus Torvalds (torvalds@linux-foundation.org) wrote:
>
>
> On Mon, 14 Jan 2008, Mathieu Desnoyers wrote:
> >
> > We would have to figure out if enabling -freorder-blocks-and-partition
> > makes sense kernel-wide.
>
> Last I saw, it generates crappy code, with lots more jumps back and forth,
> and the image just blows up.
>
> There's a reason we use -Os, and that's that small footprint I$ is
> generally more important than fake compiler optimizations that don't
> actually help except on microbenchmarks where everything fits in the
> cache.
>
> Taking a branch instruction from two bytes to five is almost always a
> mistake, unless you *know* that the code it jumps to will effectively
> never be done at all (which is not necessarily the case at all). It also
> makes debugging much nastier, because if now things like backtraces
> probably look like crap too!
>
> Don't go there. The *best* we can do is to just use the optimizations that
> generate good-looking code that humans can read. The rest is just compiler
> masturbation.
>
I agree that turning this flag on does not seem like an interesting
solution.
Well, I wonder how important this issue of not sharing L1 instruction
cachelines with scheduler code is. If we care as much about it as Ingo
states, I wonder why we leave about 22 BUG() macros in sched.c
(calculated from the number of ud2 instructions generated on x86), which
adds up to 7 bytes at the end of many scheduler functions (7 bytes
coming from ud2, jmp and .p2align on x86).
And 22 markers in sched.c is already much more than needed. I actually
propose only 5 in my patchset.
Mathieu
--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
next prev parent reply other threads:[~2008-01-14 19:42 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-31 6:09 [PATCH 2/2] Markers Implementation for Preempt RCU Boost Tracing K. Prasad
2007-12-31 10:20 ` Ingo Molnar
2008-01-02 3:31 ` Frank Ch. Eigler
2008-01-02 12:47 ` Ingo Molnar
2008-01-02 16:33 ` Frank Ch. Eigler
2008-01-02 17:01 ` Ingo Molnar
2008-01-02 17:56 ` Frank Ch. Eigler
2008-01-02 20:10 ` Ingo Molnar
2008-01-07 18:59 ` Mathieu Desnoyers
2008-01-13 18:07 ` Pavel Machek
2008-01-14 15:35 ` Mathieu Desnoyers
2008-01-14 16:30 ` Linus Torvalds
2008-01-14 19:36 ` Mathieu Desnoyers [this message]
2008-01-02 23:49 ` Nicholas Miell
2008-01-03 19:24 ` Mathieu Desnoyers
2008-01-03 16:30 ` Mathieu Desnoyers
2008-01-04 10:58 ` Gautham R Shenoy
2008-01-05 12:46 ` Mathieu Desnoyers
2008-01-07 19:43 ` K. Prasad
2008-01-07 19:50 ` [PATCH 0/2] Markers Implementation for RCU Tracing - Ver II K. Prasad
2008-02-18 12:21 ` Jan Kiszka
2008-02-18 12:47 ` Jan Kiszka
2008-02-18 19:48 ` Paul E. McKenney
2008-02-18 20:41 ` Mathieu Desnoyers
2008-02-19 16:27 ` Markers: multi-probe locking fun (was: Re: [PATCH 0/2] Markers Implementation for RCU Tracing - Ver II) Jan Kiszka
2008-02-19 20:33 ` Mathieu Desnoyers
2008-02-19 22:18 ` Paul E. McKenney
2008-02-19 22:32 ` Mathieu Desnoyers
2008-02-19 21:54 ` Paul E. McKenney
2008-02-19 22:03 ` Mathieu Desnoyers
2008-02-19 22:19 ` Paul E. McKenney
2008-01-07 19:55 ` [PATCH 1/2] Markers Implementation for RCU Preempt Tracing - Ver II K. Prasad
2008-01-07 19:56 ` [PATCH 2/2] Markers Implementation for Preempt RCU Boost " K. Prasad
2008-01-04 12:09 ` __get_cpu_var() called from a preempt-unsafe context in __rcu_preempt_unboost() ? Gautham R Shenoy
2008-01-04 13:48 ` Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2007-11-29 18:46 [PATCH 2/2] Markers Implementation for Preempt RCU Boost Tracing K. Prasad
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=20080114193653.GA20774@Krystal \
--to=mathieu.desnoyers@polymtl.ca \
--cc=akpm@linux-foundation.org \
--cc=dipankar@in.ibm.com \
--cc=ego@in.ibm.com \
--cc=fche@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pavel@ucw.cz \
--cc=prasad@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox