From: Bjorn Helgaas <bhelgaas@google.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pci: Add include guard to include/linux/pci_ids.h
Date: Sat, 12 Jul 2014 11:31:36 -0600 [thread overview]
Message-ID: <CAErSpo6KyT=cnESwHL9cGaeGyC-XpHk7wi55Tp_Dw92WquEotg@mail.gmail.com> (raw)
In-Reply-To: <87tx6mzslt.fsf@rasmusvillemoes.dk>
On Sat, Jul 12, 2014 at 6:09 AM, Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:
> Bjorn Helgaas <bhelgaas@google.com> writes:
>
>> On Thu, Jul 10, 2014 at 02:05:11PM +0200, Rasmus Villemoes wrote:
>>> Adding an include guard frees the preprocessor from reparsing over
>>> 2600 #defines in the cases where pci_ids.h is somehow included more
>>> than once. This gives a tiny-but-measurable performance improvement
>>> when compiling such files.
>>>
>>> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
>>
>> Applied to pci/misc for v3.17, thanks!
>>
>
> Great.
>
> One thing I thought about, but which is likely undoable in practice:
> There are only about 800 files which use any of the #defines in
> pci_ids.h, but more than 3000 files include pci.h directly or
> indirectly. Making those 800 include pci_ids.h directly and removing it
> from pci.h could speed up compilation of the other 2200.
Yeah, changing 800 files for a minor build performance improvement
doesn't sound like it'd be worth the churn.
Bjorn
prev parent reply other threads:[~2014-07-12 17:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-10 12:05 [PATCH] pci: Add include guard to include/linux/pci_ids.h Rasmus Villemoes
2014-07-10 22:02 ` Bjorn Helgaas
2014-07-12 12:09 ` Rasmus Villemoes
2014-07-12 17:31 ` Bjorn Helgaas [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='CAErSpo6KyT=cnESwHL9cGaeGyC-XpHk7wi55Tp_Dw92WquEotg@mail.gmail.com' \
--to=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
/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;
as well as URLs for NNTP newsgroup(s).