From: Matthew Wilcox <matthew@wil.cx>
To: Jeff Garzik <jeff@garzik.org>
Cc: linux-scsi@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 16/22] advansys: Eliminate prototypes
Date: Sun, 9 Sep 2007 11:48:11 -0600 [thread overview]
Message-ID: <20070909174811.GH6809@parisc-linux.org> (raw)
In-Reply-To: <46E4115E.7050203@garzik.org>
On Sun, Sep 09, 2007 at 11:29:34AM -0400, Jeff Garzik wrote:
> What thoughts, if any, have been given to post-patch code arrangement,
> besides eliminating prototypes?
> This always struck me as a counterproductive exercise when taken by
> itself.
Eliminating prototypes saves me from an extra go round of the edit-compile
testcycle when I change the signature of a function. It probably doesn't
matter to you, but it adds a small amount of annoyance to my day.
> Sure, prototypes were eliminated, but was code packed together
> in an efficient way afterwards? Ideally hot path code should be close
> together, ditto for various other things like error handling code.
I tried to place functions close together that seemed like they were
called together and called from each other. It's hard to know,
of course, because GCC will make its own decisions about inlining,
for example. At the end of the day, this is an NP problem. I remmber
Nat writing grope and using simulated annealing to solve the problem.
> Without further explanation or details about your post-patch analysis,
> how do we even know the new code arrangement doesn't negatively impact
> i-cache overall?
We don't, but the new layout is more likely to be good than bad, given
how I did the rearrangement (delete prototypes, try to compile. Move
called function to before its first caller. Repeat). Plus, with all
the other changes I'm making, there's a serious reduction in driver
size. I haven't compared i-cache sizes specifically, but I'm mostly
removing code, so it should be better.
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
prev parent reply other threads:[~2007-09-09 17:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070909145358.GG6809@parisc-linux.org>
[not found] ` <11893498072821-git-send-email-matthew@wil.cx>
2007-09-09 15:29 ` [PATCH 16/22] advansys: Eliminate prototypes Jeff Garzik
2007-09-09 17:48 ` Matthew Wilcox [this message]
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=20070909174811.GH6809@parisc-linux.org \
--to=matthew@wil.cx \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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