Received: by mail.netbsd.org (Postfix, from userid 605) id BAABC84D61; Sat, 23 May 2020 20:45:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 3DDAD84D5D for ; Sat, 23 May 2020 20:45:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id H77tGpW4ET7V for ; Sat, 23 May 2020 20:45:11 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 8C6DE84C6C for ; Sat, 23 May 2020 20:45:11 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 7839AF9A1; Sat, 23 May 2020 20:45:11 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 23 May 2020 20:45:11 +0000 From: "Andrew Doran" Subject: CVS commit: src/sys To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200523204511.7839AF9A1@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Andrew Doran" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: ad Date: Sat May 23 20:45:11 UTC 2020 Modified Files: src/sys/kern: kern_lwp.c kern_proc.c kern_turnstile.c sys_lwp.c src/sys/rump/librump/rumpkern: lwproc.c src/sys/sys: lwp.h proc.h sleepq.h Log Message: - Replace pid_table_lock with a lockless lookup covered by pserialize, with the "writer" side being pid_table expansion. The basic idea is that when doing an LWP lookup there is usually already a lock held (p->p_lock), or a spin mutex that needs to be taken (l->l_mutex), and either can be used to get the found LWP stable and confidently determine that all is correct. - For user processes LSLARVAL implies the same thing as LSIDL ("not visible by ID"), and lookup by ID in proc0 doesn't really happen. In-tree the new state should be understood by top(1), the tty subsystem and so on, and would attract the attention of 3rd party kernel grovellers in time, so remove it and just rely on LSIDL. To generate a diff of this commit: cvs rdiff -u -r1.237 -r1.238 src/sys/kern/kern_lwp.c cvs rdiff -u -r1.251 -r1.252 src/sys/kern/kern_proc.c cvs rdiff -u -r1.39 -r1.40 src/sys/kern/kern_turnstile.c cvs rdiff -u -r1.80 -r1.81 src/sys/kern/sys_lwp.c cvs rdiff -u -r1.48 -r1.49 src/sys/rump/librump/rumpkern/lwproc.c cvs rdiff -u -r1.209 -r1.210 src/sys/sys/lwp.h cvs rdiff -u -r1.365 -r1.366 src/sys/sys/proc.h cvs rdiff -u -r1.30 -r1.31 src/sys/sys/sleepq.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.