Received: by mail.netbsd.org (Postfix, from userid 605) id 7FB5084D7F; Tue, 3 Dec 2019 22:28:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 044D784D7C for ; Tue, 3 Dec 2019 22:28:42 +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 4vUk7EjaFHbb for ; Tue, 3 Dec 2019 22:28:41 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 91DCB84CFC for ; Tue, 3 Dec 2019 22:28:41 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 8B8F4FA97; Tue, 3 Dec 2019 22:28:41 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Tue, 3 Dec 2019 22:28:41 +0000 From: "Andrew Doran" Subject: CVS commit: src/sys To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20191203222841.8B8F4FA97@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: Tue Dec 3 22:28:41 UTC 2019 Modified Files: src/sys/kern: kern_cpu.c kern_runq.c src/sys/sys: cpu_data.h sched.h Log Message: - Add some more failsafes to the CPU topology stuff, and build a 3rd circular list of peer CPUs in other packages, so we might scroll through them in the scheduler when looking to distribute or steal jobs. - Fold the run queue data structure into spc_schedstate. Makes kern_runq.c a far more pleasant place to work. - Remove the code in sched_nextlwp() that tries to steal jobs from other CPUs. It's not needed, because we do the very same thing in the idle LWP anyway. Outside the VM system this was one of the the main causes of L3 cache misses I saw during builds. On my machine, this change yields a 60%-70% drop in time on the "hackbench" benchmark (there's clearly a bit more going on here, but basically being less aggressive helps). To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/kern/kern_cpu.c cvs rdiff -u -r1.52 -r1.53 src/sys/kern/kern_runq.c cvs rdiff -u -r1.42 -r1.43 src/sys/sys/cpu_data.h cvs rdiff -u -r1.78 -r1.79 src/sys/sys/sched.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.