[lkml]   [2004]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: /proc/sys/kernel/pid_max issues
On Sun, Sep 12, 2004 at 02:36:05AM -0700, William Lee Irwin III wrote:
>> + if (map > &pidmap_array[pid_max/BITS_PER_PAGE])
>> + map = pidmap_array;
>> if (unlikely(!map->page)) {
>> unsigned long page = get_zeroed_page(GFP_KERNEL);

On Sun, Sep 12, 2004 at 02:58:05AM -0700, William Lee Irwin III wrote:
> If pid_max == BITS_PER_PAGE*n, none of &pidmap_array[pid_max/BITS_PER_PAGE]
> is usable, so if we must complete a full revolution around pidmap_array[]
> to discover a free pid slightly less than last_pid we will miss it. Hence:

That could only happen if max_steps were initialized to PIDMAP_ENTRIES
instead of PIDMAP_ENTRIES + 1, so this more accurate upper bound is not
strictly necessary, though with this in place, we could probably reduce
max_steps to just PIDMAP_ENTRIES so we cycle no further than the block
we began; I'll not bother with that.

-- wli
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:06    [W:0.050 / U:5.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site