kthread_work: wake up worker only when the worker is idle

If the worker is already executing a work item when another is queued,
we can safely skip wakeup without worrying about stalling queue thus
avoiding waking up the busy worker spuriously.  Spurious wakeups
should be fine but still isn't nice and avoiding it is trivial here.

tj: Updated description.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Sound Control: add line gain to cached and register lock

bump version to 3.6

Signed-off-by: Paul Reioux <reioux@gmail.com>
ARM: enable ARCH_POWER
ext4: Speedup WB_SYNC_ALL pass called from sync(2)

When doing filesystem wide sync, there's no need to force transaction
commit (or synchronously write inode buffer) separately for each inode
because ext4_sync_fs() takes care of forcing commit at the end (VFS
takes care of flushing buffer cache, respectively). Most of the time
this slowness doesn't manifest because previous WB_SYNC_NONE writeback
doesn't leave much to write but when there are processes aggressively
creating new files and several filesystems to sync, the sync slowness
can be noticeable. In the following test script sync(1) takes around 6
minutes when there are two ext4 filesystems mounted on a standard SATA
drive. After this patch sync takes a couple of seconds so we have about
two orders of magnitude improvement.

      function run_writers
      {
        for (( i = 0; i < 10; i++ )); do
          mkdir $1/dir$i
          for (( j = 0; j < 40000; j++ )); do
            dd if=/dev/zero of=$1/dir$i/$j bs=4k count=4 &>/dev/null
          done &
        done
      }

      for dir in "$@"; do
        run_writers $dir
      done

      sleep 40
      time sync

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
sched: Add sysinterface for GENTLE_FAIR_SLEEPERS

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
sched: GENTLE_FAIR_SLEEPERS fix unused cpu var
sched: disable by default GENTLE_FAIR_SLEEPERS
sched: Add controls for sched features

* Currently we provide users attributes to enable/
  disable GENTLE_FAIR_SLEEPERS and ARCH_POWER
* This patch uses already implemented GFS structure
  to add ARCH_POWER attribute.
* Attributes can be found under /sys/kernel/sched/*

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
sched: cpu_power: initialize sysfs with 0
sched: cpu_power: invert the logic from my side
android: logger: resized to 128kb
intellithemal v2: an in-kernel thermal monitor for Qualcomm 8974+ SOCs

intellithermal version 2 is based originally from Qualcomm's repo adapted to
operate as a standalone in-kernel thermal throttling worker.  It can read
DTS entries for configuration as well as sysfs tunable knobs for both compile
time and run time configurations.

this kernel worker can completely replace the closed source thermald and
thermal-engine daemons from Qualcomm.

Modifications copyright 2014, Paul Reioux

Change-Id: I5e279b34085f563b84171d070f72ff6e57cbbb41
Signed-off-by: Paul Reioux <reioux@gmail.com>
Enable intellithermal V2 by default
Build v3.96 EXP2