scripts: Bump to 162.

Signed-off-by: Derek Cannata <thederekjay@gmail.com>
Makefile: Remove this. Set back to default.

Signed-off-by: Derek Cannata <thederekjay@gmail.com>
deadline: Allow 0ms deadline latency, increase the read speed

Change a timer compare from after to after-equals, thus allowing
0 timeout and making deadline schedule FIFO.

Signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
block: deadline: hardcode magic values from the usual suspects.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
drivers: thermal: fix derp.

Signed-off-by: Derek Cannata <thederekjay@gmail.com>
auto_hotplug: Ok.. try this..

Signed-off-by: Derek Cannata <thederekjay@gmail.com>
fs: sync: add missing return if fsync is disabled from userspace.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
block: urgent: Fix dispatching of URGENT mechanism

There are cases when blk_peek_request is called not from blk_fetch_request
thus the URGENT request may be started but the flag q->dispatched_urgent is
not updated.

Change-Id: I4fb588823f1b2949160cbd3907f4729767932e12
CRs-fixed: 471736
CRs-fixed: 473036
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
power: pm8921-charger: Don't pollute kmsg when baterry < 10%

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
power: pm8921: Change info message to debug

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
sched: LOAD_FREQ (4*HZ+61) avoids loadavg Moire.

From http://ripke.com/loadavg/moire

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
block: account iowait time when waiting for completion of IO request

Using wait_for_completion() for waiting for a IO request to be executed
results in wrong iowait time accounting. For example, a system having
the only task doing write() and fdatasync() on a block device can be
reported being idle instead of iowaiting as it should because
blkdev_issue_flush() calls wait_for_completion() which in turn calls
schedule() that does not increment the iowait proc counter and thus does
not turn on iowait time accounting.

The patch makes block layer use wait_for_completion_io() instead of
wait_for_completion() where appropriate to account iowait time
correctly.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
sched: add wait_for_completion_io[_timeout]

The only difference between wait_for_completion[_timeout]() and
wait_for_completion_io[_timeout]() is that the latter calls
io_schedule_timeout() instead of schedule_timeout() so that the caller
is accounted as waiting for IO, not just sleeping.

These functions can be used for correct iowait time accounting when the
completion struct is actually used for waiting for IO (e.g. completion
of a bio request in the block layer).

Modified to compile with 3.4.0 on the Nexus 4 (Mako)

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
power: pm8921-bms: update correction algorithm

Correct only when the soc estimate is lower than 15. This way we won't
affect linearity and accuracy for most part. The corrections will
come in only when the soc est gets low.

Change-Id: I0661c9a7b1e45610ca4e922edacac0f7cb3f388a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
drivers: msm: lgit: workaround an old bug where if the gamma table was being updated and the screen went off the device would panic due to a dma error. Its a lousy hack, but it works.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
CPU hotplug, writeback: Don't call writeback_set_ratelimit() too often during hotplug

The CPU hotplug callback related to writeback calls writeback_set_ratelimit()
during every state change in the hotplug sequence. This is unnecessary
since num_online_cpus() changes only once during the entire hotplug operation.

So invoke the function only once per hotplug, thereby avoiding the
unnecessary repetition of those costly calculations.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
writeback: remove nr_pages_dirtied arg from balance_dirty_pages_ratelimited_nr()

There is no reason to pass the nr_pages_dirtied argument, because
nr_pages_dirtied value from the caller is unused in
balance_dirty_pages_ratelimited_nr().

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Vivek Trivedi <vtrivedi018@gmail.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
mm: fix calculation of dirtyable memory

The system uses global_dirtyable_memory() to calculate number of
dirtyable pages/pages that can be allocated to the page cache.  A bug
causes an underflow thus making the page count look like a big unsigned
number.  This in turn confuses the dirty writeback throttling to
aggressively write back pages as they become dirty (usually 1 page at a
time).  This generally only affects systems with highmem because the
underflowed count gets subtracted from the global count of dirtyable
memory.

The problem was introduced with v3.2-4896-gab8fabd

Fix is to ensure we don't get an underflowed total of either highmem or
global dirtyable memory.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Puneet Kumar <puneetster@chromium.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Tested-by: Damien Wyart <damien.wyart@free.fr>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
Revert "auto_hotplug: Not sure this method has any real benifit."

This reverts commit a9d5a2ff429a877798c1de82966e934c584fedab.

Signed-off-by: Derek Cannata <thederekjay@gmail.com>
configs: Add projectdark_mako_defconfig

Signed-off-by: Derek Cannata <thederekjay@gmail.com>