From nobody Sun Mar 24 17:47:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V2k604ffVz5G7BX; Sun, 24 Mar 2024 17:47:04 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V2k6044zYz4QYZ; Sun, 24 Mar 2024 17:47:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711302424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8alhKtMFvm4oTi54fr0FxJmu/mcVS9l5Gcvwh7o5xI8=; b=Z1zJnau3FhAL9q/rEOHSnzOYu+2cV3MCD4eC76hId4bhLDtwsE4h4IgB7tkgfih5h7eYYy yCS4gm3hykx/z4qp4h/Q6P5aTclKSwdpri4Lqon0tuEE+TtEP4UOfd+AF+Fjv1m7koT9s7 XMkX0FNgmENPocBMeveDCpNJUTRsxKUn7HVP42GPsYlR+0Zkll7pcGwf0YaC8dfJnbnVsB O0er3h0GFcMYKrqRw1FsAsC0QNN6tsc6cTr6FcUEKgIUU+JC9MA9wxu8zBETBM5YCnnGgM wgxTBGJWvRBlJo9V7WMHjYebnzwgw+yGKY6/3IeID7BATmYSU+uF4rRDb9cUZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711302424; a=rsa-sha256; cv=none; b=ZfoxULQptP6BGcAfTOLcquKOIaGYExh9+5qF3BHNEa/eR2zSTEIANovZuupTe43DjVyOm3 GAcm0ZjeSBEmpd7KNZC+r6viIUgIOJc+dlQsQQH20oQz7v761VGIlcxpV5ZpZvwHM1U2ZC sY87utNg1Rujq9MqC+b1VhCPJvCOf0vPqpboHeQZcGBtjlrlRnwF1Qjzfp2DKgcM8XfDT1 JPKVW1i3dAV6B++PZLGUGyi6cdQDAmrXhmP7USaR0M8v2NCKww8VEDN68Xse2d5Dv4CaL3 Tt0YUn+K22ylVVrHjcJr/Ci/78GbTA5LJxoHcGDPDbU0NJ61bb+s2EOMF09ZgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711302424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8alhKtMFvm4oTi54fr0FxJmu/mcVS9l5Gcvwh7o5xI8=; b=B19hxOgcI/r7E6LVjoFzd7/J+1qHr+K6eMzLZBqx9agz0al9ziwbj/hrDVBI2XJhg0/nMf SgL0rguQcV6XdH/Bd6qetOYJiFE/meLU2Z67YSYWFwvhXYq/BaY+J8RYGGvWywDeiovEbO IxiM4dJ6J4zTecRFqPP5k1+RnOfXwpR2BtMoSpzJtbrIBRMj/Aevl/s76OMWXukcLY8FTD gkUAwLkHjIiYLmm7FqlUu9JCp6kYCJ+NS5XOpiz601+NnGGVL8bjzaUDFIi2zREitweIgM 0v3PxVijsg/xN+DJLJnf0CaaGyKXXGwdiFpFimGfUQtv1Rhk6z67Es8L9C9/Pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V2k603YfLzjNW; Sun, 24 Mar 2024 17:47:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42OHl4fq030569; Sun, 24 Mar 2024 17:47:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42OHl4wk030567; Sun, 24 Mar 2024 17:47:04 GMT (envelope-from git) Date: Sun, 24 Mar 2024 17:47:04 GMT Message-Id: <202403241747.42OHl4wk030567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 9fabf97682ce - main - arm64: fix free queue and reservation configuration for 16KB pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9fabf97682ce494865c8b26c218f2d00a36c99ea Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=9fabf97682ce494865c8b26c218f2d00a36c99ea commit 9fabf97682ce494865c8b26c218f2d00a36c99ea Author: Eliot Solomon AuthorDate: 2023-11-18 21:13:21 +0000 Commit: Alan Cox CommitDate: 2024-03-24 17:22:20 +0000 arm64: fix free queue and reservation configuration for 16KB pages Correctly configure the free page queues and the reservation size when the base page size is 16KB. In particular, the reservation size was less than the L2 Block size, making L2 promotions and mappings all but impossible. Reviewed by: markj Tested by: gallatin Differential Revision: https://reviews.freebsd.org/D42737 --- sys/arm64/arm64/copyinout.S | 1 + sys/arm64/include/vmparam.h | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/copyinout.S b/sys/arm64/arm64/copyinout.S index 005fa61bfe82..23f56ae85daa 100644 --- a/sys/arm64/arm64/copyinout.S +++ b/sys/arm64/arm64/copyinout.S @@ -30,6 +30,7 @@ #include #include +#include #include #include "assym.inc" diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 0967d3c0aedf..d5d4a5691f37 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -99,8 +99,17 @@ * are used by UMA, the physical memory allocator reduces the likelihood of * both 2MB page TLB misses and cache misses during the page table walk when * a 2MB page TLB miss does occur. + * + * When PAGE_SIZE is 16KB, an allocation size of 32MB is supported. This + * size is used by level 0 reservations and L2 BLOCK mappings. */ +#if PAGE_SIZE == PAGE_SIZE_4K #define VM_NFREEORDER 13 +#elif PAGE_SIZE == PAGE_SIZE_16K +#define VM_NFREEORDER 12 +#else +#error Unsupported page size +#endif /* * Enable superpage reservations: 1 level. @@ -110,10 +119,17 @@ #endif /* - * Level 0 reservations consist of 512 pages. + * Level 0 reservations consist of 512 pages when PAGE_SIZE is 4KB, and + * 2048 pages when PAGE_SIZE is 16KB. */ #ifndef VM_LEVEL_0_ORDER +#if PAGE_SIZE == PAGE_SIZE_4K #define VM_LEVEL_0_ORDER 9 +#elif PAGE_SIZE == PAGE_SIZE_16K +#define VM_LEVEL_0_ORDER 11 +#else +#error Unsupported page size +#endif #endif /**