Re: Issue with max_threads (and other resources) and highmem

From: Dave McCracken (dmccr@us.ibm.com)
Date: Tue Oct 23 2001 - 16:05:55 EST


--On Tuesday, October 23, 2001 18:52:35 -0200 Rik van Riel
<riel@conectiva.com.br> wrote:

> I submitted a patch a while ago to set the number way lower,
> which was accepted by Alan and in the -ac kernels. A few months
> later Linus followed and changed the limit in his kernels, too.

Ok, that's what I get for reading the comment and not deciphering the
code... The actual calculation is mempages / (THREAD_SIZE/PAGE_SIZE) / 8
where THREAD_SIZE is 2 pages on i386. If I read it right this means it's
limiting it to 1/8 physical memory instead of half.

But there's still a problem. The value for mempages is all of physical
memory including highmem, so a machine with a sufficient amount of high
memory can set max_threads to a value way too high, given that most if not
all of the resources it's trying to limit have to come from normal memory
and not high memory.

Dave McCracken

======================================================================
Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
dmccr@us.ibm.com T/L 678-3059

-
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 23 2001 - 21:00:41 EST