lkml.org 
[lkml]   [2014]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] pci: Add include guard to include/linux/pci_ids.h
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


\
 
 \ /
  Last update: 2014-07-12 20:21    [W:0.372 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site