Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
staging, android: remove lowmemory killer from the tree
Browse files Browse the repository at this point in the history
Lowmemory killer is sitting in the staging tree since 2008 without any
serious interest for fixing issues brought up by the MM folks. The main
objection is that the implementation is basically broken by design:
	- it hooks into slab shrinker API which is not suitable for this
	  purpose. lowmem_count implementation just shows this nicely.
	  There is no scaling based on the memory pressure and no
	  feedback to the generic shrinker infrastructure.
	  Moreover lowmem_scan is called way too often for the heavy
	  work it performs.
	- it is not reclaim context aware - no NUMA and/or memcg
	  awareness.

As the code stands right now it just adds a maintenance overhead when
core MM changes have to update lowmemorykiller.c as well. It also seems
that the alternative LMK implementation will be solely in the userspace
so this code has no perspective it seems. The staging tree is supposed
to be for a code which needs to be put in shape before it can be merged
which is not the case here obviously.

Signed-off-by: Michal Hocko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Michal Hocko authored and reocat committed Jan 14, 2024
1 parent 1dfb682 commit a0295a8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 484 deletions.
19 changes: 0 additions & 19 deletions drivers/staging/android/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,6 @@ config ANDROID_TIMED_GPIO
registers from user space, timed output/gpio is a system to allow changing
a gpio pin and restore it automatically after a specified timeout.

config ANDROID_LOW_MEMORY_KILLER
bool "Android Low Memory Killer"
---help---
Registers processes to be killed when low memory conditions, this is useful
as there is no particular swap space on android.

The registered process will kills according to the priorities in android init
scripts (/init.rc), and it defines priority values with minimum free memory size
for each priority.

config ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES
bool "Android Low Memory Killer: detect oom_adj values"
depends on ANDROID_LOW_MEMORY_KILLER
default y
---help---
Detect oom_adj values written to
/sys/module/lowmemorykiller/parameters/adj and convert them
to oom_score_adj values.

config SYNC
bool "Synchronization framework"
default n
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/android/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ obj-y += ion/
obj-$(CONFIG_ASHMEM) += ashmem.o
obj-$(CONFIG_ANDROID_TIMED_OUTPUT) += timed_output.o
obj-$(CONFIG_ANDROID_TIMED_GPIO) += timed_gpio.o
obj-$(CONFIG_ANDROID_LOW_MEMORY_KILLER) += lowmemorykiller.o
obj-$(CONFIG_SYNC) += sync.o sync_debug.o
obj-$(CONFIG_SW_SYNC) += sw_sync.o
obj-$(CONFIG_ONESHOT_SYNC) += oneshot_sync.o
Expand Down
Loading

0 comments on commit a0295a8

Please sign in to comment.