Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92a7efe4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm, oom: remove 3% bonus for CAP_SYS_ADMIN processes"

parents 3abeaf8a 46270f4b
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -202,13 +202,6 @@ unsigned long oom_badness(struct task_struct *p, struct mem_cgroup *memcg,
		atomic_long_read(&p->mm->nr_ptes) + mm_nr_pmds(p->mm);
	task_unlock(p);

	/*
	 * Root processes get 3% bonus, just like the __vm_enough_memory()
	 * implementation used by LSMs.
	 */
	if (has_capability_noaudit(p, CAP_SYS_ADMIN))
		points -= (points * 3) / 100;

	/* Normalize to oom_score_adj units */
	adj *= totalpages / 1000;
	points += adj;