mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/5] x86/entry/64: interrupt entry size reduction
@ 2018-02-18 12:31 Dominik Brodowski
  2018-02-18 12:31 ` [RFC PATCH v2 1/5] x86/entry/64: move PUSH_AND_CLEAR_REGS from interrupt macro to helper function Dominik Brodowski
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Dominik Brodowski @ 2018-02-18 12:31 UTC (permalink / raw)
  To: linux-kernel, mingo, x86, brgerst, luto, jpoimboe
  Cc: torvalds, ak, tglx, dan.j.williams

Here is a re-spin of the interrupt entry size reduction patchset, which
applies on top of tip/pti and tries to implement what Linus suggested a
few days ago.[*]

Patch 1/5 provides the most significant cuttings (-3k) and gets us below
the text size of entry_64.o (by about 2k) compared to before I started
meddling with it. This patch is unchanged to v1 and seems to be the most
trivial of this patchset (famous last words), but still requires
stringent review before being applied.

The other four patches still need more discussion on whether each additional
step and the code complexity it adds is really worth it. And stringent
review, of course.

Overall, these patches provide for a sizeable cutting of up to 4.1k compared
to tip/pti:

   text	   data	    bss	    dec	    hex	filename
  19500	      0	      0	  19500	   4c2c	entry_64.o-orig (before 2e3f0098bc45)
  21088	      0	      0	  21088	   5260	entry_64.o-pti (as of ced5d0bf603f)
  18006	      0	      0	  18006	   4656	entry_64.o (patch 1/5)
  16882	      0	      0	  16882	   41f2	entry_64.o (patch 5/5)

[*] http://lkml.kernel.org/r/CA+55aFwLTF3EtaQ4OpDv2UM41J=EU7gfemv=eVq+uQi31-usSg@mail.gmail.com

Changes since v1:
- patch 1 (unchanged)
- patch 2:
	- use leaq 8() instead of mov+addq in ENTER_IRQ_STACK (suggested
	  by Brian Gerst)
	- add UNWIND_HINT_REGS indirect=1 after call to interrupt_helper;
	  update size information accordingly
- patch 3:
	- add cld to switch_to_thread_stack wrapper function
	- improve commit message
	- update size information
- patch 4:
	- add UNWIND_HINT_REGS indirect=1 to the now-removed interrupt
	  macro
- patch 5 (NEW):
	- open-code the DO_SWITCH_TO_THREAD_STACK macro (suggested by
	  Brian Gerst)
	- improve (?) UNWIND hints

Dominik Brodowski (5):
  x86/entry/64: move PUSH_AND_CLEAR_REGS from interrupt macro to helper
    function
  x86/entry/64: move ENTER_IRQ_STACK from interrupt macro to helper
    function
  x86/entry/64: move switch_to_thread_stack to interrupt helper function
  x86/entry/64: remove interrupt macro
  x86/entry/64: open-code switch_to_thread_stack

 arch/x86/entry/entry_64.S        | 105 +++++++++++++++++++++++----------------
 arch/x86/entry/entry_64_compat.S |  19 ++++++-
 2 files changed, 81 insertions(+), 43 deletions(-)

-- 
2.16.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-02-20  7:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-18 12:31 [RFC PATCH v2 0/5] x86/entry/64: interrupt entry size reduction Dominik Brodowski
2018-02-18 12:31 ` [RFC PATCH v2 1/5] x86/entry/64: move PUSH_AND_CLEAR_REGS from interrupt macro to helper function Dominik Brodowski
2018-02-18 12:31 ` [RFC PATCH v2 2/5] x86/entry/64: move ENTER_IRQ_STACK " Dominik Brodowski
2018-02-18 12:31 ` [RFC PATCH v2 3/5] x86/entry/64: move switch_to_thread_stack to interrupt " Dominik Brodowski
2018-02-18 12:31 ` [RFC PATCH v2 4/5] x86/entry/64: remove interrupt macro Dominik Brodowski
2018-02-18 12:31 ` [RFC PATCH v2 5/5] x86/entry/64: open-code switch_to_thread_stack Dominik Brodowski
2018-02-19 14:34   ` Josh Poimboeuf
2018-02-20  7:37     ` Ingo Molnar

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®