sched: Cleanup pre_schedule_rt

    Since [commit 9a897c5a:
    sched: RT-balance, replace hooks with pre/post schedule and wakeup methods]
    we must call pre_schedule_rt if prev is rt task.
    So condition rt_task(prev) is always true and the 'unlikely' declaration is
    simply incorrect.

    Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
sched: Change pick_next_task_rt from unlikely to likely

    The if (unlikely(!rt_rq->rt_nr_running)) test in pick_next_task_rt()
    tests if there is another rt task ready to run. If so, then pick it.

    In most systems, only one RT task runs at a time most of the time.
    Running the branch unlikely annotator profiler on a system doing average
    work "running firefox, evolution, xchat, distcc builds, etc", it showed the
    following:

     correct incorrect  %        Function                  File              Line
     ------- ---------  -        --------                  ----              ----
      324344 135104992  99 _pick_next_task_rt             sched_rt.c           1064

    99% of the time the condition is true. When an RT task schedules out,
    it is unlikely that another RT task is waiting to run on that same run queue.

    Simply remove the unlikely() condition.

    Acked-by: Gregory Haskins <ghaskins@novell.com>
    Cc:Peter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
sched: Remove unlikely() from rt_policy() in sched.c

    The rt_policy() has an unlikely() that the policy it is checking is
    of RT priority (SCHED_FIFO or SCHED_RR).

    According to the annotate branch profiler it is incorrect most of the time:

     correct incorrect  %        Function                  File              Line
     ------- ---------  -        --------                  ----              ----
       36667   654674  94 rt_policy                      sched.c              126

    This makes sense because the rt_policy() is used by the sched_set_scheduler()
    and nice(). Although users may use sys_nice a bit, all RT users use
    the sched_set_scheduler() to set their RT priority, including kernel
    threads.

    The above numbers were from a normal desktop computer running
    firefox, evolution, xchat and was part of a distcc compile farm.

    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
sched: Remove unlikely() from ttwu_post_activation

    The unlikely() used in ttwu_post_activation() tests if the rq->idle_stamp
    is set. But since this is for a wakeup, and wakeups happen when tasks
    block on IO, and blocking tasks on IO may put the system into idle,
    this can actually be a common occurence.

    Running the annotated branch profiler on an average desktop running
    firefox, evolution, xchat and distcc, the report shows:

     correct incorrect  %        Function             File              Line
     ------- ---------  -        --------             ----              ----
    34884862 146110926  80 ttwu_post_activation      sched.c            2309

    80% of the time, this unlikely is incorrect. Best not to assume what the
    result is, and just remove the branch annotation.

    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
netfilter: xt_CT: provide info on why a rule was rejected

    Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
    Signed-off-by: Patrick McHardy <kaber@trash.net>
kconfig: autogenerated config_is_xxx macro

    this will allow to use to use

    	if(config_is_xxx())
    	if(config_is_xxx_module())

    in the code instead of

    	#ifdef CONFIG_xxx
    	#ifdef CONFIG_xxx_MODULE

    and now let the compiler remove the non usefull code and not the
    pre-processor

    as done in the mach-types for arm as exmaple

    Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
    Acked-by: Andi Kleen <ak@linux.intel.com>
    Signed-off-by: Michal Marek <mmarek@suse.cz>
ASoC: soc-cache: Block based rbtree compression

    This patch prepares the ground for the actual rbtree optimization patch
    which will save a pointer to the last accessed rbnode that was used
    in either the read() or write() functions.

    Each rbnode manages a variable length block of registers.  There can be no
    two nodes with overlapping blocks.  Each block has a base register and a
    currently top register, all the other registers, if any, lie in between these
    two and in ascending order.

    The reasoning behind the construction of this rbtree is simple.  In the
    snd_soc_rbtree_cache_init() function, we iterate over the register defaults
    provided by the driver.  For each register value that is non-zero we
    insert it in the rbtree.  In order to determine in which rbnode we need
    to add the register, we first look if there is another register already
    added that is adjacent to the one we are about to add.  If that is the case
    we append it in that rbnode block, otherwise we create a new rbnode
    with a single register in its block and add it to the tree.

    In the next patch, where a cached rbnode is used by both the write() and the
    read() functions, we also check if the register we are about to add is in the
    cached rbnode (the least recently accessed one) and if so we append it in that
    rbnode block.

    Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
    Acked-by: Liam Girdwood <lrg@ti.com>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: soc-cache: Cache a pointer to the last accessed rbnode

    Whenever we are doing a read or a write through the rbtree code, we'll
    cache a pointer to the rbnode.  To avoid looking up the register
    everytime we do a read or a write, we first check if it can be found in
    the cached register block, otherwise we traverse the rbtree and finally
    cache the rbnode for future use.

    Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
    Acked-by: Liam Girdwood <lrg@ti.com>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
workqueue: remove cancel_rearming_delayed_work[queue]()

    cancel_rearming_delayed_work() and cancel_rearming_delayed_workqueue()
    can be removed now.

    Signed-off-by: WANG Cong <amwang@redhat.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
workqueue: separate out drain_workqueue() from destroy_workqueue()

    There are users which want to drain workqueues without destroying it.
    Separate out drain functionality from destroy_workqueue() into
    drain_workqueue() and make it accessible to workqueue users.

    To guarantee forward-progress, only chain queueing is allowed while
    drain is in progress.  If a new work item which isn't chained from the
    running or pending work items is queued while draining is in progress,
    WARN_ON_ONCE() is triggered.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: James Bottomley <James.Bottomley@hansenpartnership.com>