mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@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 14:09:18 +0200	[thread overview]
Message-ID: <87tx6mzslt.fsf@rasmusvillemoes.dk> (raw)
In-Reply-To: <20140710220233.GA21053@google.com> (Bjorn Helgaas's message of "Thu, 10 Jul 2014 16:02:33 -0600")

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.

Rasmus

  reply	other threads:[~2014-07-12 12:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 12:05 Rasmus Villemoes
2014-07-10 22:02 ` Bjorn Helgaas
2014-07-12 12:09   ` Rasmus Villemoes [this message]
2014-07-12 17:31     ` Bjorn Helgaas

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=87tx6mzslt.fsf@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@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

Powered by JetHome