lkml.org 
[lkml]   [2013]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5/6] sched: mark should_resched() __always_inline
    Date
    From: Andi Kleen <ak@linux.intel.com>

    At least gcc 4.6 and some earlier ones does not inline this function.
    Since it's small and on relatively hot paths force inline it.

    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    ---
    kernel/sched/core.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/kernel/sched/core.c b/kernel/sched/core.c
    index 74d7c04..23df96a 100644
    --- a/kernel/sched/core.c
    +++ b/kernel/sched/core.c
    @@ -3767,7 +3767,7 @@ SYSCALL_DEFINE0(sched_yield)
    return 0;
    }

    -static inline int should_resched(void)
    +static __always_inline int should_resched(void)
    {
    return need_resched() && !(preempt_count() & PREEMPT_ACTIVE);
    }
    --
    1.8.3.1


    \
     
     \ /
      Last update: 2013-08-17 09:21    [W:2.271 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site