Re: [PATCH 2/4 v4] kernel/fork.c: avoid division by zero

2015-02-23 Thread Ingo Molnar
* Heinrich Schuchardt wrote: > PAGE_SIZE is not guaranteed to be equal to or less than 8 times the > THREAD_SIZE. > > E.g. architecture hexagon may have page size 1M and thread size 4096. > This would lead to a division by zero in the calculation of max_threads. > > With 32-bit calculus there

Re: [PATCH 2/4 v4] kernel/fork.c: avoid division by zero

2015-02-23 Thread Heinrich Schuchardt
On 23.02.2015 22:10, Peter Zijlstra wrote: > On Mon, Feb 23, 2015 at 09:14:35PM +0100, Heinrich Schuchardt wrote: >> With 32-bit calculus there is no solution which delivers valid results >> for all possible combinations of the parameters. > > So I can't help but be bugged by this (my problem I kn

Re: [PATCH 2/4 v4] kernel/fork.c: avoid division by zero

2015-02-23 Thread Peter Zijlstra
On Mon, Feb 23, 2015 at 09:14:35PM +0100, Heinrich Schuchardt wrote: > With 32-bit calculus there is no solution which delivers valid results > for all possible combinations of the parameters. So I can't help but be bugged by this (my problem I know); calculus is the mathematics of change; its dif

[PATCH 2/4 v4] kernel/fork.c: avoid division by zero

2015-02-23 Thread Heinrich Schuchardt
PAGE_SIZE is not guaranteed to be equal to or less than 8 times the THREAD_SIZE. E.g. architecture hexagon may have page size 1M and thread size 4096. This would lead to a division by zero in the calculation of max_threads. With 32-bit calculus there is no solution which delivers valid results fo