Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2168289ybk; Mon, 11 May 2020 13:44:37 -0700 (PDT) X-Google-Smtp-Source: APiQypIiWv9kwI3U88a657h4PBjt94Ww6o8NxnZUVIKLslmy+2xRjXwSyxT8E7fsKpynB90rZ2Ng X-Received: by 2002:a17:906:2ad4:: with SMTP id m20mr15482104eje.324.1589229877097; Mon, 11 May 2020 13:44:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589229877; cv=none; d=google.com; s=arc-20160816; b=TlIcA8ln49P109TJRlaXJos5Du8Tx/6EeN53/v3lB17khSmY6Z+5wHi2THYCm7Lg0K ivf2w3xcgURP7lXqXxq50AE3ZC0MhqUXoIQFrhaR56+jInFQRDpJ++zpUAnfGY5fmfe8 SQe54ssWLqB5D7EbB9Hx2+O4WcqepfaxuhZj5RzxJVTrJBtGMfGAPbnieodHIMyYSxjn O/Ssgm6HZfvnoSBHLtJ2RcOxNB9NKN08h6SpmSQRKcddh0dYXDzVht/PDEhPKPgrnmer zY0B4ctOvg/sQdlwUA1VLY5g+XU5iAhAfalZUmHs+G/Kki5aRy3OkBZVbQk5cTdsKSDA VpJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nJIrVz0eagxxLpjbbeUY/ovP24Cuv1ipLfptjnUtvhQ=; b=0gdUgjvfXiL243bIwzoxOsvvbx0SwP2ZP6FVKR/lf/zjofFq1z/XwlqsTUZpDPLIcc 3GJQFQP2mSBq0kXJ5KqTMSWqxW7tFiQTg34eY8Nerc0o0BedPITYZuxhEWlBKf1jTeaN UMpKgi4NsbaySlzmPRPfngH3TEFjyOGuJ+/jvZYSkz+IEbeUFn9YOhXxyw9SerBZkR9K 1RZRDuIX6V7gZtMDg2sZVB61kKZRvvVHhHhUQoA4f5Nc4Q2HBKwM/6ojRL3WMG+wVv1T CWyG16kUpQopprU5MuM+6aSeRvZCUq8xPGZ0sexsYFhvJRcHiKB/sWGT3SplgN+MD7mA E+eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RW73rqLH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si1906550edb.561.2020.05.11.13.44.14; Mon, 11 May 2020 13:44:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RW73rqLH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731818AbgEKUmn (ORCPT + 99 others); Mon, 11 May 2020 16:42:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:54130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731796AbgEKUmj (ORCPT ); Mon, 11 May 2020 16:42:39 -0400 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D28E720882; Mon, 11 May 2020 20:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589229759; bh=+tRoV1zQ0//73ali8SYlLEhpdR7SHnV2xH8pWZqMG7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RW73rqLHB+0duL5gxFml+lEXq9zZ74eG32DWHOcB7mgKNt0+lpnXy4bjW+d4FCrRD o9MwdfdFfNIv5LPz88EW7jof3MBN7DCE3ee7A85aROuCKQ39C5PtUKBLSd/wyH8um1 zFKTyW4BN4A0U8LgTRRRp3RnKbjioSCOrAVhz+P4= From: Will Deacon To: linux-kernel@vger.kernel.org Cc: elver@google.com, tglx@linutronix.de, paulmck@kernel.org, mingo@kernel.org, peterz@infradead.org, will@kernel.org Subject: [PATCH v5 04/18] sparc32: mm: Reduce allocation size for PMD and PTE tables Date: Mon, 11 May 2020 21:41:36 +0100 Message-Id: <20200511204150.27858-5-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200511204150.27858-1-will@kernel.org> References: <20200511204150.27858-1-will@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that the page table allocator can free page table allocations smaller than PAGE_SIZE, reduce the size of the PMD and PTE allocations to avoid needlessly wasting memory. Cc: "David S. Miller" Cc: Peter Zijlstra Signed-off-by: Will Deacon --- arch/sparc/include/asm/pgtsrmmu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm/pgtsrmmu.h b/arch/sparc/include/asm/pgtsrmmu.h index 58ea8e8c6ee7..7708d015712b 100644 --- a/arch/sparc/include/asm/pgtsrmmu.h +++ b/arch/sparc/include/asm/pgtsrmmu.h @@ -17,8 +17,8 @@ /* Number of contexts is implementation-dependent; 64k is the most we support */ #define SRMMU_MAX_CONTEXTS 65536 -#define SRMMU_PTE_TABLE_SIZE (PAGE_SIZE) -#define SRMMU_PMD_TABLE_SIZE (PAGE_SIZE) +#define SRMMU_PTE_TABLE_SIZE (PTRS_PER_PTE*4) +#define SRMMU_PMD_TABLE_SIZE (PTRS_PER_PMD*4) #define SRMMU_PGD_TABLE_SIZE (PTRS_PER_PGD*4) /* Definition of the values in the ET field of PTD's and PTE's */ -- 2.26.2.645.ge9eca65c58-goog