Re: /proc/sys/kernel/pid_max issues

From: William Lee Irwin III (wli_at_holomorphy.com)
Date: 09/12/04

  • Next message: Paul Jackson: "2.6.9-rc1-mm4 sparc reiser4 build broken - undefined atomic_sub_and_test"
    Date:	Sun, 12 Sep 2004 03:10:49 -0700
    To: Anton Blanchard <anton@samba.org>
    
    

    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 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/


  • Next message: Paul Jackson: "2.6.9-rc1-mm4 sparc reiser4 build broken - undefined atomic_sub_and_test"

    Relevant Pages

    • Re: XFS breakage in 2.6.18-rc1
      ... system disk too who had to take the hit. ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: How to run an a.out file in a kernel module
      ... called in a kernel module using call_usermodehelper ... Please read the FAQ at http://www.tux.org/lkml/ ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: XFS Bug null pointer dereference in xfs_free_ag_extent
      ... I also filed bug 6877 at kernel.org ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: [patch] remove unused acct variables from task_struct
      ... struct mempolicy *mempolicy; ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: DIPC alpha2 for i386, Alpha, SPARC, and M68k
      ... there seems to be a delay on cs.uwindsor.ca between the time you upload something and the time it actually shows up on the page. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)