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


Groups > linux.kernel > #1234079 > unrolled thread

[PATCH] x86/apic: Deinline __x2apic_disable, save 467 bytes

Started byDenys Vlasenko <dvlasenk@redhat.com>
First post2015-09-28 14:30 +0200
Last post2015-09-30 22:00 +0200
Articles 11 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] x86/apic: Deinline __x2apic_disable, save 467 bytes Denys Vlasenko <dvlasenk@redhat.com> - 2015-09-28 14:30 +0200
    [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes Denys Vlasenko <dvlasenk@redhat.com> - 2015-09-28 14:30 +0200
      Re: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes "H. Peter Anvin" <hpa@zytor.com> - 2015-09-28 14:40 +0200
        Re: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes Denys Vlasenko <dvlasenk@redhat.com> - 2015-09-28 15:50 +0200
          Re: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes Davidlohr Bueso <dave@stgolabs.net> - 2015-09-28 22:30 +0200
            Re: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes Thomas Gleixner <tglx@linutronix.de> - 2015-09-29 21:00 +0200
      [tip:x86/cleanups] x86/signal: Deinline get_sigframe,   save 240 bytes tip-bot for Denys Vlasenko <tipbot@zytor.com> - 2015-09-30 22:00 +0200
    [PATCH] x86: Deinline e820_type_to_string, save 126 bytes Denys Vlasenko <dvlasenk@redhat.com> - 2015-09-28 14:30 +0200
      [tip:x86/cleanups] x86/e820: Deinline e820_type_to_string,   save 126 bytes tip-bot for Denys Vlasenko <tipbot@zytor.com> - 2015-09-30 22:00 +0200
    [PATCH] x86: Deinline early_console_register, save 403 bytes Denys Vlasenko <dvlasenk@redhat.com> - 2015-09-28 14:30 +0200
      [tip:x86/cleanups] x86: Deinline early_console_register,   save 403 bytes tip-bot for Denys Vlasenko <tipbot@zytor.com> - 2015-09-30 22:00 +0200

#1234079 — [PATCH] x86/apic: Deinline __x2apic_disable, save 467 bytes

FromDenys Vlasenko <dvlasenk@redhat.com>
Date2015-09-28 14:30 +0200
Subject[PATCH] x86/apic: Deinline __x2apic_disable, save 467 bytes
Message-ID<qdFJ9-5CT-13@gated-at.bofh.it>
This function compiles to 186 bytes of machine code.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Ingo Molnar <mingo@kernel.org>
CC: Andy Lutomirski <luto@amacapital.net>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Borislav Petkov <bp@alien8.de>
CC: Brian Gerst <brgerst@gmail.com>
CC: x86@kernel.org
CC: linux-kernel@vger.kernel.org
---
 arch/x86/kernel/apic/apic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index f49a956..78c0160 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1431,7 +1431,7 @@ enum {
 };
 static int x2apic_state;
 
-static inline void __x2apic_disable(void)
+static void __x2apic_disable(void)
 {
 	u64 msr;
 
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1234080 — [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes

FromDenys Vlasenko <dvlasenk@redhat.com>
Date2015-09-28 14:30 +0200
Subject[PATCH] x86/signal: Deinline get_sigframe, save 240 bytes
Message-ID<qdFJ8-5CT-11@gated-at.bofh.it>
In reply to#1234079
This function compiles to 277 bytes of machine code and has 4 callsites.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Ingo Molnar <mingo@kernel.org>
CC: Andy Lutomirski <luto@amacapital.net>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Borislav Petkov <bp@alien8.de>
CC: Brian Gerst <brgerst@gmail.com>
CC: x86@kernel.org
CC: linux-kernel@vger.kernel.org
---
 arch/x86/kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index da52e6b..054a4d0 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -196,7 +196,7 @@ static unsigned long align_sigframe(unsigned long sp)
 	return sp;
 }
 
-static inline void __user *
+static void __user *
 get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
 	     void __user **fpstate)
 {
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234098 — Re: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes

From"H. Peter Anvin" <hpa@zytor.com>
Date2015-09-28 14:40 +0200
SubjectRe: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes
Message-ID<qdFSP-5O5-31@gated-at.bofh.it>
In reply to#1234080
This one makes me slightly nervous, because it isn't clear that these aren't potentially performance sensitive.

On September 28, 2015 5:23:57 AM PDT, Denys Vlasenko <dvlasenk@redhat.com> wrote:
>This function compiles to 277 bytes of machine code and has 4
>callsites.
>
>Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
>CC: Ingo Molnar <mingo@kernel.org>
>CC: Andy Lutomirski <luto@amacapital.net>
>CC: "H. Peter Anvin" <hpa@zytor.com>
>CC: Borislav Petkov <bp@alien8.de>
>CC: Brian Gerst <brgerst@gmail.com>
>CC: x86@kernel.org
>CC: linux-kernel@vger.kernel.org
>---
> arch/x86/kernel/signal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
>index da52e6b..054a4d0 100644
>--- a/arch/x86/kernel/signal.c
>+++ b/arch/x86/kernel/signal.c
>@@ -196,7 +196,7 @@ static unsigned long align_sigframe(unsigned long
>sp)
> 	return sp;
> }
> 
>-static inline void __user *
>+static void __user *
>get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t
>frame_size,
> 	     void __user **fpstate)
> {

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234171 — Re: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes

FromDenys Vlasenko <dvlasenk@redhat.com>
Date2015-09-28 15:50 +0200
SubjectRe: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes
Message-ID<qdGYz-12Y-31@gated-at.bofh.it>
In reply to#1234098
On 09/28/2015 02:33 PM, H. Peter Anvin wrote:
> This one makes me slightly nervous, because it isn't clear
> that these aren't potentially performance sensitive.

CALL instruction is not a crime :)
It costs about the same as one read-modify-write
operation on a memory operand.

This function is used in signal delivery code.
If performance critical code uses massive numbers
of signals, it already has a problem, Unix signals
are too inefficient. That's why we have futexes etc...

> On September 28, 2015 5:23:57 AM PDT, Denys Vlasenko <dvlasenk@redhat.com> wrote:
>> This function compiles to 277 bytes of machine code and has 4
>> callsites.

I must correct myself: there are two callsites, not four.
(There are four calls in the source, but two of them are
in 32-bit code and two are in 64-bit).


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234419 — Re: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes

FromDavidlohr Bueso <dave@stgolabs.net>
Date2015-09-28 22:30 +0200
SubjectRe: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes
Message-ID<qdNdD-1FC-1@gated-at.bofh.it>
In reply to#1234171
On Mon, 28 Sep 2015, Denys Vlasenko wrote:

>On 09/28/2015 02:33 PM, H. Peter Anvin wrote:
>> This one makes me slightly nervous, because it isn't clear
>> that these aren't potentially performance sensitive.
>
>CALL instruction is not a crime :)
>It costs about the same as one read-modify-write
>operation on a memory operand.
>
>This function is used in signal delivery code.
>If performance critical code uses massive numbers
>of signals, it already has a problem, Unix signals
>are too inefficient. That's why we have futexes etc...

True, but in general I don't think that justifies anything -- and not only
referring to this particular signal patch.

Nothing really against or in favor of these patches, but I don't think that
saving 240 bytes (or whatever) is worth such changes, in fact we have Josh's
tinyfication project for those systems that do in fact care.

Thanks,
Davidlohr
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1235492 — Re: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes

FromThomas Gleixner <tglx@linutronix.de>
Date2015-09-29 21:00 +0200
SubjectRe: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes
Message-ID<qe8i7-6x1-21@gated-at.bofh.it>
In reply to#1234419
On Mon, 28 Sep 2015, Davidlohr Bueso wrote:
> Nothing really against or in favor of these patches, but I don't think that
> saving 240 bytes (or whatever) is worth such changes, in fact we have Josh's
> tinyfication project for those systems that do in fact care.

And what exactly is wrong with slimming down the mainline kernel? We
have tons of inlines which are way too fat and an extra unconditional
function call is not going to show up as a performance degradation by
any means.

Thanks,

	tglx


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1236717 — [tip:x86/cleanups] x86/signal: Deinline get_sigframe, save 240 bytes

Fromtip-bot for Denys Vlasenko <tipbot@zytor.com>
Date2015-09-30 22:00 +0200
Subject[tip:x86/cleanups] x86/signal: Deinline get_sigframe, save 240 bytes
Message-ID<qevHJ-6td-27@gated-at.bofh.it>
In reply to#1234080
Commit-ID:  dae0f305d61b07933a129dfe975342f3177277d5
Gitweb:     http://git.kernel.org/tip/dae0f305d61b07933a129dfe975342f3177277d5
Author:     Denys Vlasenko <dvlasenk@redhat.com>
AuthorDate: Mon, 28 Sep 2015 14:23:57 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 30 Sep 2015 21:54:40 +0200

x86/signal: Deinline get_sigframe, save 240 bytes

This function compiles to 277 bytes of machine code and has 4 callsites.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Link: http://lkml.kernel.org/r/1443443037-22077-4-git-send-email-dvlasenk@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index da52e6b..2c3336b 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -196,7 +196,7 @@ static unsigned long align_sigframe(unsigned long sp)
 	return sp;
 }
 
-static inline void __user *
+static void __user *
 get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
 	     void __user **fpstate)
 {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234081 — [PATCH] x86: Deinline e820_type_to_string, save 126 bytes

FromDenys Vlasenko <dvlasenk@redhat.com>
Date2015-09-28 14:30 +0200
Subject[PATCH] x86: Deinline e820_type_to_string, save 126 bytes
Message-ID<qdFJ9-5CT-19@gated-at.bofh.it>
In reply to#1234079
This function compiles to 102 bytes of machine code. It has two callsites.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Ingo Molnar <mingo@kernel.org>
CC: Andy Lutomirski <luto@amacapital.net>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Borislav Petkov <bp@alien8.de>
CC: Brian Gerst <brgerst@gmail.com>
CC: x86@kernel.org
CC: linux-kernel@vger.kernel.org
---
 arch/x86/kernel/e820.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index a102564..9e55f6f 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -911,7 +911,7 @@ void __init finish_e820_parsing(void)
 	}
 }
 
-static inline const char *e820_type_to_string(int e820_type)
+static const char *e820_type_to_string(int e820_type)
 {
 	switch (e820_type) {
 	case E820_RESERVED_KERN:
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1236715 — [tip:x86/cleanups] x86/e820: Deinline e820_type_to_string, save 126 bytes

Fromtip-bot for Denys Vlasenko <tipbot@zytor.com>
Date2015-09-30 22:00 +0200
Subject[tip:x86/cleanups] x86/e820: Deinline e820_type_to_string, save 126 bytes
Message-ID<qevHI-6td-19@gated-at.bofh.it>
In reply to#1234081
Commit-ID:  e6e5f84092b1f3a8733c20e26838af4e21a4854f
Gitweb:     http://git.kernel.org/tip/e6e5f84092b1f3a8733c20e26838af4e21a4854f
Author:     Denys Vlasenko <dvlasenk@redhat.com>
AuthorDate: Mon, 28 Sep 2015 14:23:55 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 30 Sep 2015 21:54:40 +0200

x86/e820: Deinline e820_type_to_string, save 126 bytes

This function compiles to 102 bytes of machine code. It has two
callsites.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Link: http://lkml.kernel.org/r/1443443037-22077-2-git-send-email-dvlasenk@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/kernel/e820.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index a102564..569c1e4 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -911,7 +911,7 @@ void __init finish_e820_parsing(void)
 	}
 }
 
-static inline const char *e820_type_to_string(int e820_type)
+static const char *e820_type_to_string(int e820_type)
 {
 	switch (e820_type) {
 	case E820_RESERVED_KERN:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234084 — [PATCH] x86: Deinline early_console_register, save 403 bytes

FromDenys Vlasenko <dvlasenk@redhat.com>
Date2015-09-28 14:30 +0200
Subject[PATCH] x86: Deinline early_console_register, save 403 bytes
Message-ID<qdFJ9-5CT-27@gated-at.bofh.it>
In reply to#1234079
This function compiles to 60 bytes of machine code.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Ingo Molnar <mingo@kernel.org>
CC: Andy Lutomirski <luto@amacapital.net>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Borislav Petkov <bp@alien8.de>
CC: Brian Gerst <brgerst@gmail.com>
CC: x86@kernel.org
CC: linux-kernel@vger.kernel.org
---
 arch/x86/kernel/early_printk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index eec40f5..d968ee5 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -316,7 +316,7 @@ static struct console early_serial_console = {
 	.index =	-1,
 };
 
-static inline void early_console_register(struct console *con, int keep_early)
+static void early_console_register(struct console *con, int keep_early)
 {
 	if (con->index != -1) {
 		printk(KERN_CRIT "ERROR: earlyprintk= %s already used\n",
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1236718 — [tip:x86/cleanups] x86: Deinline early_console_register, save 403 bytes

Fromtip-bot for Denys Vlasenko <tipbot@zytor.com>
Date2015-09-30 22:00 +0200
Subject[tip:x86/cleanups] x86: Deinline early_console_register, save 403 bytes
Message-ID<qevHI-6td-21@gated-at.bofh.it>
In reply to#1234084
Commit-ID:  c368ef2866adbfc0e90fdecc09e3b3fe2cddcd14
Gitweb:     http://git.kernel.org/tip/c368ef2866adbfc0e90fdecc09e3b3fe2cddcd14
Author:     Denys Vlasenko <dvlasenk@redhat.com>
AuthorDate: Mon, 28 Sep 2015 14:23:56 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 30 Sep 2015 21:54:40 +0200

x86: Deinline early_console_register, save 403 bytes

This function compiles to 60 bytes of machine code.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Link: http://lkml.kernel.org/r/1443443037-22077-3-git-send-email-dvlasenk@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/kernel/early_printk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index eec40f5..076a4a7 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -316,7 +316,7 @@ static struct console early_serial_console = {
 	.index =	-1,
 };
 
-static inline void early_console_register(struct console *con, int keep_early)
+static void early_console_register(struct console *con, int keep_early)
 {
 	if (con->index != -1) {
 		printk(KERN_CRIT "ERROR: earlyprintk= %s already used\n",
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web