linux/drivers/staging/android
David Rientjes 83dbbdbb38 android, lowmemorykiller: remove task handoff notifier
The task handoff notifier leaks task_struct since it never gets freed
after the callback returns NOTIFY_OK, which means it is responsible for
doing so.

It turns out the lowmemorykiller actually doesn't need this notifier at
all.  It's used to prevent unnecessary killing by waiting for a thread
to exit as a result of lowmem_shrink(), however, it's possible to do
this in the same way the kernel oom killer works by setting TIF_MEMDIE
and avoid killing if we're still waiting for it to exit.

The kernel oom killer will already automatically set TIF_MEMDIE for
threads that are attempting to allocate memory that have a fatal signal.
The thread selected by lowmem_shrink() will have such a signal after the
lowmemorykiller sends it a SIGKILL, so this won't result in an
unnecessary use of memory reserves for the thread to exit.

This has the added benefit that we don't have to rely on
CONFIG_PROFILING to prevent needlessly killing tasks.

Reported-by: Werner Landgraf <w.landgraf@ru.ru>
Cc: stable@vger.kernel.org
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-09 20:48:44 -07:00
..
switch staging: android: switch: minor code formatting cleanups 2011-12-16 13:41:37 -08:00
Kconfig staging: android: persistent_ram: refactor ecc support 2012-03-08 09:36:08 -08:00
Makefile staging: android: ram_console: split out persistent ram 2012-03-08 09:36:08 -08:00
TODO drivers:staging:android Typos: fix some comments that have typos in them. 2012-02-08 16:47:50 -08:00
alarm-dev.c staging: android-alarm: HACK: wakelock workaround 2012-02-10 10:06:19 -08:00
alarm.c staging: android-alarm: Fixup minor pr_alarm warnings 2012-02-10 10:08:01 -08:00
android_alarm.h staging: android-alarm: Support old drivers via preprocessor aliasing 2012-02-10 10:08:01 -08:00
ashmem.c drivers/staging/android/ashmem.c: Cleanups 2012-02-08 16:47:51 -08:00
ashmem.h ashmem: Anonymous shared memory subsystem 2011-12-21 13:38:28 -08:00
binder.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
binder.h Staging: android: fixed a space warning in binder.h 2011-12-22 13:33:57 -08:00
logger.c staging: logger: hold mutex while removing reader 2012-02-24 12:03:14 -08:00
logger.h android: logger: Add new system log for framework/system log messages 2011-11-30 20:40:06 +09:00
lowmemorykiller.c android, lowmemorykiller: remove task handoff notifier 2012-04-09 20:48:44 -07:00
persistent_ram.c staging: android: persistent_ram: add notrace to persistent_ram_write 2012-03-08 09:36:08 -08:00
persistent_ram.h staging: android: persistent_ram: handle reserving and mapping memory 2012-03-08 09:36:08 -08:00
ram_console.c Staging: android: ram_console.c: 2012-03-15 16:38:14 -07:00
ram_console.h staging: android: ram_console: pass in a boot info string 2011-11-30 21:23:37 +09:00
timed_gpio.c drivers/staging/android/timed_gpio.c: Stlye fixes 2012-02-08 16:47:52 -08:00
timed_gpio.h Staging: android: timed_gpio: Removed spaces before tabs 2012-02-29 15:52:52 -08:00
timed_output.c Staging: android: timed_gpio: Properly discard invalid timeout values. 2011-11-30 20:51:36 +09:00
timed_output.h Revert "Staging: android: delete android drivers" 2011-11-30 20:18:14 +09:00