mmc: Add tracepoints of mmc block operations

Add tracepoints to record the start and end of each mmc block
operation.  This includes read, write, erase, secure erase,
trim, secure trim1 and secure trim 2, discard and
sanitize commands.

Change-Id: Ic5d1cbdb9adb940d8b1a2a13c73970023575df50
Signed-off-by: Ken Sumrall <ksumrall@android.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	drivers/mmc/card/block.c
	drivers/mmc/core/core.c
mmc: trace single-block reads and writes as well

In addition to multi-block ones.

Change-Id: Ie67fa95e362affc7c22ee72cae39fc6692f109f7
Signed-off-by: Iliyan Malchev <malchev@google.com>
oom: remove oom_disable_count

This removes mm->oom_disable_count entirely since it's unnecessary and
currently buggy.  The counter was intended to be per-process but it's
currently decremented in the exit path for each thread that exits, causing
it to underflow.

The count was originally intended to prevent oom killing threads that
share memory with threads that cannot be killed since it doesn't lead to
future memory freeing.  The counter could be fixed to represent all
threads sharing the same mm, but it's better to remove the count since:

 - it is possible that the OOM_DISABLE thread sharing memory with the
   victim is waiting on that thread to exit and will actually cause
   future memory freeing, and

 - there is no guarantee that a thread is disabled from oom killing just
   because another thread sharing its mm is oom disabled.

Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Cc: Ying Han <yinghan@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: If5667b6eb784b0503179f2f4e9aef0b5ecbdb368
oom: do not kill tasks with oom_score_adj OOM_SCORE_ADJ_MIN

Commit c9f01245 ("oom: remove oom_disable_count") has removed the
oom_disable_count counter which has been used for early break out from
oom_badness so we could never select a task with oom_score_adj set to
OOM_SCORE_ADJ_MIN (oom disabled).

Now that the counter is gone we are always going through heuristics
calculation and we always return a non zero positive value.  This means
that we can end up killing a task with OOM disabled because it is
indistinguishable from regular tasks with 1% resp.  CAP_SYS_ADMIN tasks
with 3% usage of memory or tasks with oom_score_adj set but OOM enabled.

Let's break out early if the task should have OOM disabled.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ying Han <yinghan@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: I73c8ed52c49069ee98cc08c7c9e06327dd11455b
tegra3_android_defconfig: normalize via menuconfig

Change-Id: If09be61f901f4b94f87594ae0f5e711ccb13aa52
Signed-off-by: Iliyan Malchev <malchev@google.com>
tegra3_android_defconfig: switch to SLUB

Change-Id: I37e67d5ec2ab8ead91612ad5eb3c9c9cead2c9c7
Signed-off-by: Iliyan Malchev <malchev@google.com>
tegra3_android_defconfig: enable KSM

Change-Id: I2d17aa00bbc952d77110b1245e4b0531a979c6a8
Signed-off-by: Iliyan Malchev <malchev@google.com>
cpufreq: sysfs knobs for disabling hotplug during UI interaction

Provide the following sysfs knobs:
	/sys/devices/system/cpu/cpufreq/interactive
		core_lock_period, default 200000ns
		core_lock_count, default 0 (num_online_cpus)

Sysfs file core_lock_period controls the amount of time, in nanoseconds, to
hold some cores online.  It defaults to 200ms.  The number of cores to keep
online for that duration is controlled by core_lock_count, which defaults to 0.
When 0, we simply force num_online_cpus() to stay online; if greater than 0, we
force max(core_lock_count, num_online_cpus()) to stay online.

Note that you can write any value to core_lock_count, but it will get capped to
the number of cores actually available.

Change-Id: I6937e433c8343f8205e305d9da1a62f284b47f4f
Signed-off-by: Iliyan Malchev <malchev@google.com>
Revert "tegra3_android_defconfig: switch to SLUB"

This reverts commit 9ec1bb866afa2cf7ce5981512029de1df5c45168.
Merge tag 'android-5.0.2_r0.1' into cm-12.0

Android 5.0.2 Release 0.1