Re: [PATCH] Removed unnecessary use of local variable in v3.12.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Meenakshi Aggarwal | 2014-05-15 16:08:54 [+0530]:

>--- a/kernel/sched/core.c
>+++ b/kernel/sched/core.c
>@@ -2296,13 +2296,16 @@ void __kprobes add_preempt_count(int val)
> 	DEBUG_LOCKS_WARN_ON((preempt_count() & PREEMPT_MASK) >=
> 				PREEMPT_MASK - 10);
> #endif
>-	if (preempt_count() == val) {
>-		unsigned long ip = get_parent_ip(CALLER_ADDR1);
>+
>+	if (preempt_count() == val)
> #ifdef CONFIG_DEBUG_PREEMPT
>-		current->preempt_disable_ip = ip;
>+		trace_preempt_off(CALLER_ADDR0,
>+			current->preempt_disable_ip =
>+			get_parent_ip(CALLER_ADDR1));

So if I apply this, I can imagine tglx will run to his armoury looking
for a fine axe and then throwing it at me. So sorry, but I can't apply
this.
I suggest you look into gcc and figure out why this hackery of yours
saves 18 instructions. It does not make sense to me because all you do
is to inline replace ip with "get_parent_ip(CALLER_ADDR1)". It might be
that the compiler unrolls the stack each time ip is accessed but this is
clearly a compiler short comming.

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux