staging: android/lowmemorykiller: Don't grab tasklist_lock

Grabbing tasklist_lock has its disadvantages, i.e. it blocks
process creation and destruction. If there are lots of processes,
blocking doesn't sound as a great idea.

For LMK, it is sufficient to surround tasks list traverse with
rcu_read_{,un}lock().

>From now on using force_sig() is not safe, as it can race with an
already exiting task, so we use send_sig() now. As a downside, it
won't kill PID namespace init processes, but that's not what we
want anyway.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
modified for HTC kernel from Linux 3.4+ by faux123

Conflicts:

	drivers/staging/android/lowmemorykiller.c
staging: android/lowmemorykiller: Better mm handling

LMK should not directly check for task->mm. The reason is that the
process' threads may exit or detach its mm via use_mm(), but other
threads may still have a valid mm. To catch this we use
find_lock_task_mm(), which walks up all threads and returns an
appropriate task (with lock held).

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
modified for HTC kernel from Linux 3.4+ by faux123
staging: android/lowmemorykiller: No need for task->signal check

task->signal == NULL is not possible, so no need for these checks.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
modified for HTC kernel from Linux 3.4+ by faux123
staging: android/lowmemorykiller: Do not kill kernel threads

LMK should not try killing kernel threads.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: android: lowmemorykiller.c

Fix compiler warning about the type of the module parameter.

Cc: San Mehat <san@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mach-tegra: edp: remove distinction between multi/single core

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
mach-tegra: board-grouper-panel: lower panel min brightness to 8

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
defconfig: enable ZRAM

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
mach-tegra: fix gpuoc timings

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
Added FSync Control version 1
mach-tegra: edp: export t3 variant to debugfs

fixed for nomem errors.
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
mach-tegra: tegra_mpdecision: remove fixed idle frequency. Always set to lpcore max clock
+minor comment cleanup

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
cpufreq: ondemand: remove fixed idle frequency. Always set to lpcore max clock

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
Revert "defconfig: enable cpu freq stat details"

This reverts commit d0bab2e537e08d909179e81673b50bd31fa7da8e.
mach-tegra: cpu-tegra: set default min clock on boot. (102)

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>