Re: [PATCH v3 10/11] rlimits: implement prlimit64 syscall

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jiri Slaby
Date: Wednesday, May 26, 2010 - 8:13 am

On 05/26/2010 04:30 PM, Andrew Morton wrote:

Hmm. Probably I'm still missing something obvious, but how does this
help for existing services like databases and/or closed-source products?

Or do you mean to provide this as a library
(s@main@__attribute__((constructor)) my_main@ then) and link (or even
preload) to the programs people want to change limits on-the-fly in?
(And clone with THREAD flag to share task_struct->signal.)

But this approach can only help for the parent of all the forked-later
processes. Especially if a process forks and exits (i.e. creates a
daemon), the child running in the background doesn't have the
wait_for_message thread. So if it forks again (e.g. to service a new
request) the limits cannot be changed in any of them.

This can be solved by adding such a cloned-thread loop into every forked
child, but I'm not sure this is something we want.

In addition, people don't know which process will need to change limits
in advance. Every single binary would have to contain such code.

-- 
js
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v3 04/11] rlimits: split sys_setrlimit, Jiri Slaby, (Mon May 10, 11:00 am)
[PATCH v3 10/11] rlimits: implement prlimit64 syscall, Jiri Slaby, (Mon May 10, 11:00 am)
Re: [PATCH v3 10/11] rlimits: implement prlimit64 syscall, Andrew Morton, (Thu May 13, 3:56 pm)
Re: [PATCH v3 10/11] rlimits: implement prlimit64 syscall, Andrew Morton, (Wed May 26, 7:30 am)
Re: [PATCH v3 10/11] rlimits: implement prlimit64 syscall, Jiri Slaby, (Wed May 26, 8:13 am)