diff --git a/include/linux/oom.h b/include/linux/oom.h index 852facb5ac39..40862dd4f223 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h @@ -122,17 +122,6 @@ extern void oom_killer_enable(void); extern struct task_struct *find_lock_task_mm(struct task_struct *p); -#ifdef CONFIG_HAVE_USERSPACE_LOW_MEMORY_KILLER -extern bool should_ulmk_retry(void); -extern void ulmk_update_last_kill(void); -#else -static inline bool should_ulmk_retry(void) -{ - return false; -} -static inline void ulmk_update_last_kill(void) {} -#endif - /* sysctls */ extern int sysctl_oom_dump_tasks; extern int sysctl_oom_kill_allocating_task; diff --git a/kernel/signal.c b/kernel/signal.c index 5dd383511eed..e8f1ce7a7e47 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1407,10 +1407,8 @@ int group_send_sig_info(int sig, struct kernel_siginfo *info, if (!ret && sig) { ret = do_send_sig_info(sig, info, p, type); - if (capable(CAP_KILL) && sig == SIGKILL) { + if (capable(CAP_KILL) && sig == SIGKILL) add_to_oom_reaper(p); - ulmk_update_last_kill(); - } } return ret; diff --git a/mm/Kconfig b/mm/Kconfig index 67c665d45adf..4a8b6d55ae4d 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -759,17 +759,6 @@ config PERCPU_STATS information includes global and per chunk statistics, which can be used to help understand percpu memory usage. - -config HAVE_USERSPACE_LOW_MEMORY_KILLER - bool "Have userspace low memory killer" - default n - help - The page allocator cannot directly call into a - userspace low memory killer as it can call into the OOM killer. - Therefore, add a timeout mechanism to give the userspace - low memory killer a chance to run. - - config GUP_BENCHMARK bool "Enable infrastructure for get_user_pages_fast() benchmarking" help diff --git a/mm/oom_kill.c b/mm/oom_kill.c index b6783179e9b2..c19945135938 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -73,28 +73,6 @@ static inline bool is_memcg_oom(struct oom_control *oc) return oc->memcg != NULL; } -/* - * If ULMK has killed a process recently, - * we are making progress. - */ - -#ifdef CONFIG_HAVE_USERSPACE_LOW_MEMORY_KILLER -static atomic64_t ulmk_kill_jiffies = ATOMIC64_INIT(INITIAL_JIFFIES); - - -bool should_ulmk_retry(void) -{ - unsigned long j = atomic64_read(&ulmk_kill_jiffies); - - return time_before(jiffies, j + 2 * HZ); -} - -void ulmk_update_last_kill(void) -{ - atomic64_set(&ulmk_kill_jiffies, jiffies); -} -#endif - #ifdef CONFIG_NUMA /** * oom_cpuset_eligible() - check task eligiblity for kill diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 4abaae89ad8c..642e8d221319 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4680,9 +4680,6 @@ retry: if (costly_order && !(gfp_mask & __GFP_RETRY_MAYFAIL)) goto nopage; - if (order <= PAGE_ALLOC_COSTLY_ORDER && should_ulmk_retry()) - goto retry; - if (should_reclaim_retry(gfp_mask, order, ac, alloc_flags, did_some_progress > 0, &no_progress_loops)) goto retry;