Re: PATCH: tidy for the max_thread stuff from the kernel list

From: John Levon (levon@movementarian.org)
Date: Tue Oct 08 2002 - 19:59:31 EST


On Tue, Oct 08, 2002 at 08:07:40PM +0100, Alan Cox wrote:

> /*
> - * we need to allow at least 10 threads to boot a system
> + * we need to allow at least 20 threads to boot a system
> */
> - init_task.rlim[RLIMIT_NPROC].rlim_cur = max(10, max_threads/2);
> - init_task.rlim[RLIMIT_NPROC].rlim_max = max(10, max_threads/2);
> + if(max_threads < 20)
> + max_threads = 20;
> +
> + init_task.rlim[RLIMIT_NPROC].rlim_cur = max_threads/2;
> + init_task.rlim[RLIMIT_NPROC].rlim_max = max_threads/2;

Colour me dense, but the comment says 20, and you set rlim_max to 20/2.

Can this possibly be right ?

john

-- 
"I will eat a rubber tire to the music of The Flight of the Bumblebee"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:29 EST