Skip to content

oom: linux has threads

Oleg Nesterov linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4oom: select_bad_process: check PF_KTHREAD instead of !mm to skip kthreadsmm/oom_kill.c+3 -41 reply
2/4oom: select_bad_process: PF_EXITING check should take ->mm into accountmm/oom_kill.c+1 -14 replies
3/4oom: introduce find_lock_task_mm() to fix !mm false positivesinclude/linux/oom.h mm/oom_kill.c+22 -190 replies
4/4oom: oom_forkbomb_penalty: move thread_group_cputime() out of task_lock()mm/oom_kill.c+5 -31 reply

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchDavid Rientjes
1/4A-b
2/4
3/4
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH -mm 0/4] oom: linux has threads
Quoted 15 lines · Oleg Nesterov

Once again:

	void *memory_hog_thread(void *arg)
	{
		for (;;)
			malloc(A_LOT);
	}

	int main(void)
	{
		pthread_create(memory_hog_thread, ...);
		syscall(__NR_exit, 0);
	}
Quoted 2 lines

Now, even if we fix PF_EXITING check, select_bad_process() will always ignore this process. The group leader has ->mm == NULL.

So. Please see the COMPLETELY UNTESTED patches I am sending. They need your review, or feel free to redo these fixes. 4/4 is a bit off-topic.

Also, please note the "This patch is not enough" comment in 3/4.

Oleg.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>