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


Groups > linux.kernel > #1363793

Re: [PATCH resend] init/main.c: Simplify initcall_blacklisted()

From Rasmus Villemoes <linux@rasmusvillemoes.dk>
Newsgroups linux.kernel
Subject Re: [PATCH resend] init/main.c: Simplify initcall_blacklisted()
Date 2016-03-24 01:00 +0100
Message-ID <rg0QX-2rr-9@gated-at.bofh.it> (permalink)
References <oKM2d-2n8-1@gated-at.bofh.it> <rfhh8-49g-5@gated-at.bofh.it> <rfBzb-1rA-3@gated-at.bofh.it>
Organization D03

Show all headers | View raw


On Tue, Mar 22 2016, Rusty Russell <rusty@rustcorp.com.au> wrote:

> Rasmus Villemoes <linux@rasmusvillemoes.dk> writes:
>> Using kasprintf to get the function name makes us look up the name
>> twice, along with all the vsnprintf overhead of parsing the format
>> string etc. It also means there is an allocation failure case to deal
>> with. Since symbol_string in vsprintf.c would anyway allocate an array
>> of size KSYM_SYMBOL_LEN on the stack, that might as well be done up
>> here.
>>
>> Moreover, since this is a debug feature and the blacklisted_initcalls
>> list is usually empty, we might as well test that and thus avoid
>> looking up the symbol name even once in the common case.
>>
>> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
>
> Acked-by: Rusty Russell <rusty@rustcorp.com.au>
>

Thanks. Andrew, can I get you to take it?

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


Thread

[PATCH resend] init/main.c: Simplify initcall_blacklisted() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-03-22 00:20 +0100
  Re: [PATCH resend] init/main.c: Simplify initcall_blacklisted() Rusty Russell <rusty@rustcorp.com.au> - 2016-03-22 22:00 +0100
    Re: [PATCH resend] init/main.c: Simplify initcall_blacklisted() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-03-24 01:00 +0100
  Re: [PATCH resend] init/main.c: Simplify initcall_blacklisted() Prarit Bhargava <prarit@redhat.com> - 2016-03-24 18:20 +0100

csiph-web