mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Waiman Long <longman@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86, locking: Inline *_unlock_bh & *_unlock_irqrestore
Date: Fri, 10 Feb 2017 12:53:52 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1702101252450.4036@nanos> (raw)
In-Reply-To: <1486060589-31572-1-git-send-email-longman@redhat.com>

On Thu, 2 Feb 2017, Waiman Long wrote:

> For spinlock and read-write locks, both *_unlock() and *_unlock_irq()
> functions are inlined if !PREEMPT. Whereas the *_unlock_bh() and
> *unlock_irqrestore() are not inlined as that will increase the size
> of the kernel binary.
> 
> Given the fact that the PV qspinlock unlock call is a callee-saved
> function pointer, the unlock function is essentially a leaf function
> if !PREEMPT is true under all circumstances. Inlining it will enable
> the compiler to do much better optimization around the the unlock
> call sites. Similarly for the read-write locks.
> 
> To unleash this additional performance, all these unlock functions
> are now inlined for x86-64 kernel where kernel size is usually less
> of a concern. For 32-bit kernel, it is assumed that the focus will
> be a bit more on kernel size optimization and so those functions are
> not inlined.
> 
> With 4.9.6 kernel source and gcc 4.8.5-11 compiler, the text size
> of the base vmlinux binary increased from 8527918 bytes to 8462235
> bytes. That was an increase of 0.78%.

Increased from 8527918 bytes to 8462235? 

      reply	other threads:[~2017-02-10 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 18:36 Waiman Long
2017-02-10 11:53 ` Thomas Gleixner [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=alpine.DEB.2.20.1702101252450.4036@nanos \
    --to=tglx@linutronix.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    /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

all inboxes | Powered by JetHome®