Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1578579

Re: [PATCH] x86, locking: Inline *_unlock_bh & *_unlock_irqrestore

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86, locking: Inline *_unlock_bh & *_unlock_irqrestore
Date 2017-02-10 17:10 +0100
Message-ID <t9lVM-5Fn-25@gated-at.bofh.it> (permalink)
References <t6uCe-7FA-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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? 

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] x86, locking: Inline *_unlock_bh & *_unlock_irqrestore Waiman Long <longman@redhat.com> - 2017-02-02 19:50 +0100
  Re: [PATCH] x86, locking: Inline *_unlock_bh & *_unlock_irqrestore Thomas Gleixner <tglx@linutronix.de> - 2017-02-10 17:10 +0100

csiph-web