From owner-svn-src-all@freebsd.org Mon Nov 9 00:34:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31A332E3113; Mon, 9 Nov 2020 00:34:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CTsSc0nCqz3Ljd; Mon, 9 Nov 2020 00:34:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D8749B2; Mon, 9 Nov 2020 00:34:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A90YNN2085268; Mon, 9 Nov 2020 00:34:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A90YNbE085267; Mon, 9 Nov 2020 00:34:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202011090034.0A90YNbE085267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 9 Nov 2020 00:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367503 - in head/sys: kern vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern vm X-SVN-Commit-Revision: 367503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2020 00:34:24 -0000 Author: mjg Date: Mon Nov 9 00:34:23 2020 New Revision: 367503 URL: https://svnweb.freebsd.org/changeset/base/367503 Log: Add more per-cpu zones. This covers powers of 2 up to 64. Example pending user is ZFS. Modified: head/sys/kern/subr_pcpu.c head/sys/vm/uma.h Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Mon Nov 9 00:08:35 2020 (r367502) +++ head/sys/kern/subr_pcpu.c Mon Nov 9 00:34:23 2020 (r367503) @@ -133,17 +133,25 @@ SYSINIT(dpcpu, SI_SUB_KLD, SI_ORDER_FIRST, dpcpu_start /* * UMA_ZONE_PCPU zones for general kernel use. */ - uma_zone_t pcpu_zone_4; uma_zone_t pcpu_zone_8; +uma_zone_t pcpu_zone_16; +uma_zone_t pcpu_zone_32; +uma_zone_t pcpu_zone_64; static void pcpu_zones_startup(void) { - pcpu_zone_4 = uma_zcreate("pcpu-4", sizeof(uint32_t), + pcpu_zone_4 = uma_zcreate("pcpu-4", 4, NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); - pcpu_zone_8 = uma_zcreate("pcpu-8", sizeof(uint64_t), + pcpu_zone_8 = uma_zcreate("pcpu-8", 8, + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); + pcpu_zone_16 = uma_zcreate("pcpu-16", 16, + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); + pcpu_zone_32 = uma_zcreate("pcpu-32", 32, + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); + pcpu_zone_64 = uma_zcreate("pcpu-64", 64, NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); } SYSINIT(pcpu_zones, SI_SUB_COUNTER, SI_ORDER_FIRST, pcpu_zones_startup, NULL); Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Mon Nov 9 00:08:35 2020 (r367502) +++ head/sys/vm/uma.h Mon Nov 9 00:34:23 2020 (r367503) @@ -668,6 +668,9 @@ size_t uma_zone_memory(uma_zone_t zone); */ extern uma_zone_t pcpu_zone_4; extern uma_zone_t pcpu_zone_8; +extern uma_zone_t pcpu_zone_16; +extern uma_zone_t pcpu_zone_32; +extern uma_zone_t pcpu_zone_64; /* * Exported statistics structures to be used by user space monitoring tools.