Re: /proc/sys/kernel/pid_max issues

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

  • Next message: Anton Blanchard: "Re: [PATCH] Yielding processor resources during lock contention"
    Date:	Sun, 12 Sep 2004 03:45:24 -0700
    To: Ingo Molnar <mingo@elte.hu>
    
    

    On Sun, Sep 12, 2004 at 03:43:14AM -0700, William Lee Irwin III wrote:
    > I like the update. But I see other issues. For instance (also untested):
    > pid wrapping doesn't honor RESERVED_PIDS.

    Also:

    last_pid is not honored because next_free_map(map - 1, ...) may return
    the same map and so restart with a lesser offset.

    Index: mm4-2.6.9-rc1/kernel/pid.c
    ===================================================================
    --- mm4-2.6.9-rc1.orig/kernel/pid.c 2004-09-12 03:26:50.063164288 -0700
    +++ mm4-2.6.9-rc1/kernel/pid.c 2004-09-12 03:32:11.501298264 -0700
    @@ -120,10 +120,12 @@
                     last_pid = pid;
                     return pid;
             }
    -
    - if (!offset || !atomic_read(&map->nr_free)) {
    - if (!offset)
    - map--;
    + if (!offset) {
    + if (!atomic_read(&map->nr_free))
    + goto next_map;
    + else
    + goto scan_more;
    + } else if (!atomic_read(&map->nr_free)) {
     next_map:
                     map = next_free_map(map, &max_steps);
                     if (!map)
    -
    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: Anton Blanchard: "Re: [PATCH] Yielding processor resources during lock contention"

    Relevant Pages

    • Re: /proc/sys/kernel/pid_max issues
      ... > the same map and so restart with a lesser offset. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Make pipe data structure be a circular list of pages, rather than
      ... We need those "map" operations in order to handle other ... least a bigger multi-page allocation. ... architectures you can actually do a memcpy on IO space too. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Benchmarking objrmap under memory pressure
      ... I see what you mean with mem= being troublesome, I forgot you're numa=y, ... that you should find in arch/i386/kernel/setup.c, that should work w/o ... everything else numa is built on top of that map, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Console 80x50 SVGA
      ... > crafted by kernel hackers hoping to answer all the questions users may ... and restart my system to see what happens, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.11-rc3: Kylix application no longer works?
      ... > However I worry if there is some way in which we can leave unzeroed memory ... The 0xb7354 is size to map from the file, the 0x1b7354 is size to map ... Daniel Jacobowitz ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)