[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20120207184423.GA17924@redhat.com>
Date: Tue, 7 Feb 2012 19:44:23 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc: rusty@...tcorp.com.au, arjan@...ux.intel.com,
akpm@...ux-foundation.org, tj@...nel.org, fhrbata@...hat.com,
rientjes@...gle.com, apw@...onical.com,
john.johansen@...onical.com, linux-kernel@...r.kernel.org
Subject: [RFC PATCH 1-5] make request_module() killable
On 02/07, Oleg Nesterov wrote:
>
> OK. I am convinced we need this ;) Thanks Tetsuo.
So. Please see the attachments. COMPLETELY UNTESTED, only for
review/discussion.
For those who were not CC'ed. As Tetsuo pointed out, request_module()
is very much unfriendly wrt OOM. It needs "a lot" of time/memory to
finish while the caller is blocked in TASK_UNINTERRUPTIBLE.
0001-usermodehelper-kill-umh_wait-renumber-UMH_-consta.patch
0002-usermodehelper-introduce-umh_complete-sub_info.patch
0003-usermodehelper-implement-UMH_KILLABLE.patch
this adds UMH_KILLABLE,
0004-kmod-introduce-call_modprobe-helper.patch
0005-kmod-make-__request_module-killable.patch
this changes __request_module() to use UMH_KILLABLE.
Perhaps we should also mark the modprobe process as OOM_ADJUST_MAX.
What do you all think?
Oleg.
include/linux/kmod.h | 18 ++++-----
kernel/kmod.c | 81 +++++++++++++++++++++++++++++++++++--------
security/keys/request_key.c | 2 +-
3 files changed, 75 insertions(+), 26 deletions(-)
View attachment "0001-usermodehelper-kill-umh_wait-renumber-UMH_-consta.patch" of type "text/plain" (4139 bytes)
View attachment "0002-usermodehelper-introduce-umh_complete-sub_info.patch" of type "text/plain" (1257 bytes)
View attachment "0003-usermodehelper-implement-UMH_KILLABLE.patch" of type "text/plain" (2800 bytes)
View attachment "0004-kmod-introduce-call_modprobe-helper.patch" of type "text/plain" (1982 bytes)
View attachment "0005-kmod-make-__request_module-killable.patch" of type "text/plain" (1705 bytes)
Powered by blists - more mailing lists