public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	Anuj Gupta <anuj20.g@samsung.com>
Subject: Re: [PATCH v2] t10-pi: reduce ref tag code duplication
Date: Fri, 17 Apr 2026 10:52:09 -0600	[thread overview]
Message-ID: <aeJlOZ3OwyJH6iAw@kbusch-mbp> (raw)
In-Reply-To: <CADUfDZqDz9a4yBOq77mTOjQzNEwra6eh6oZFng-mzjmC5ivD8g@mail.gmail.com>

On Fri, Apr 17, 2026 at 08:34:30AM -0700, Caleb Sander Mateos wrote:
> On Fri, Apr 17, 2026 at 12:56 AM Christoph Hellwig <hch@infradead.org> wrote:
> > folks out there actually dropping not needed includes from headers as
> > it can significantly reduce compile time.  Now this is not a heavily
> > included header so it's unlikely to make a difference anyway.
> 
> Is a file being included by the preprocessor multiple times really
> that expensive? I would have assumed it would be cached the first time
> it was included.

Do modern compilers even incur a cost? They all have "multiple-include
optimization" features as far as i know. Not that we use "#prama once"
in kernel, but compilers look like they're smart enough to recognize the
#ifdef guards for the same purpose.

https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html#The-Multiple-Include-Optimization

  reply	other threads:[~2026-04-17 16:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15 21:08 [PATCH v2] t10-pi: reduce ref tag code duplication Caleb Sander Mateos
2026-04-16  5:18 ` Christoph Hellwig
2026-04-16 15:38   ` Caleb Sander Mateos
2026-04-17  7:56     ` Christoph Hellwig
2026-04-17 15:34       ` Caleb Sander Mateos
2026-04-17 16:52         ` Keith Busch [this message]
2026-04-17 20:39 ` Jens Axboe

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=aeJlOZ3OwyJH6iAw@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=anuj20.g@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@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