From owner-freebsd-bugs@freebsd.org Sun Sep 9 20:16:21 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20396109D8C8 for ; Sun, 9 Sep 2018 20:16:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 9B52180299 for ; Sun, 9 Sep 2018 20:16:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 5CF91109D8C7; Sun, 9 Sep 2018 20:16:20 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BA20109D8C6 for ; Sun, 9 Sep 2018 20:16:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E113080296 for ; Sun, 9 Sep 2018 20:16:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 3332D784B for ; Sun, 9 Sep 2018 20:16:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w89KGJl0007695 for ; Sun, 9 Sep 2018 20:16:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w89KGJlQ007693 for bugs@FreeBSD.org; Sun, 9 Sep 2018 20:16:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 222639] fork: Time it takes to allocate random PID approach infinity as num_processes approach PID_MAX (related to: sysctl kern.randompid) Date: Sun, 09 Sep 2018 20:16:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: cem@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2018 20:16:21 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222639 Conrad Meyer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mjoras@freebsd.org --- Comment #2 from Conrad Meyer --- (In reply to Marie Helene Kvello-Aune from comment #0) > Prequisite: Change how PIDs are tracked and allocated. Implement a bitmap= of PIDs > (I'm currently working on this) which is updated whenever anything in the= PID > namespace changes (a new PID/session ID/etc is created, or a PID/session = ID/etc > is considered available again). > The bitmap should be an array of 4096 uint32_t where each bit represents = a PID. > A set (on) bit indicates an available PID. IIRC, there was some earlier effort to bitmap-ify PIDs. I'm not sure where that went. CC'ing Matt, who might remember if there is any work that can be reused (or if I am misremembering and the work got committed already). If not, we have some abstractions for bitmaps in the kernel already which should probably be used in place of a raw u32 array =E2=80=94 see BITSET(9)= (if fixed size is ok) or vmem(9) (which in spite of the name is actually a general purpose allocater of integers in some range). Apologies if you have already thought of this or discovered it since the 2017-09 description I responded = to :-). --=20 You are receiving this mail because: You are the assignee for the bug.=