From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F092EC43461 for ; Wed, 16 Sep 2020 03:27:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4B7B21D80 for ; Wed, 16 Sep 2020 03:27:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fnK2GDg3"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="a2i1GzCr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4B7B21D80 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=547EPjrrOT//ADwDnLVM5A81Z0o3Rc2b6S8Fj8Zfdw0=; b=fnK2GDg3xRFihGbgPp6/LuCPQV Gm8CBXrfKCOh8ZM+wvHhWRdhAeCucE4/jzwIfn0Eka/GA/BFSIPlRpTza2zXBO6Nls4AqRq6dSLY5 GWmDOUDz1dprFhuKdFMb/8BMOYq+O7BuKo4VqJCTgEipJFMxan1DCYuYsJMmJ1b42LPV2pii9J+gR QwgoPBaYaLK1Py2VP3DiYrNt17FyuSQq93pm5+2ChT4OevbXieq4+GswGFkC5aHs4q/0X8TlofO/R Fd71ZVyO2aY7BBNZTYaeEszuEzx7dUl0Z17rgIIutWx0Ti1mxCHIGILONN//kwlIhypFte+KYWn6Q QoZAzxnQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIO5Q-0007Q1-Vt; Wed, 16 Sep 2020 03:26:25 +0000 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIO5P-0007Pg-7V for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2020 03:26:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600226782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=e4bgxQP4B7QtaCDMwhSwARF+1WVDn2Gcajs7TrsJlRA=; b=a2i1GzCradvdg1GJdy8w2vshUh8M3JIeMuCKj2wOniq10/awM5pyWqR/19JQqloZq/+axH NPM8sA1PB4ypn3Q+A4LuW+72WGSwLiIJgJxPrFJOSVK+RJSSI+5HVr+wAbh58StCoVDIi6 RMr4umyq5n9VyZR+ecGCKRA+l09cNTw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236-omx1aBdgP6CNaJOGs-GbfQ-1; Tue, 15 Sep 2020 23:26:18 -0400 X-MC-Unique: omx1aBdgP6CNaJOGs-GbfQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BF1481891E80; Wed, 16 Sep 2020 03:26:16 +0000 (UTC) Received: from gshan.redhat.com (vpn2-54-108.bne.redhat.com [10.64.54.108]) by smtp.corp.redhat.com (Postfix) with ESMTP id 62F667BE49; Wed, 16 Sep 2020 03:26:14 +0000 (UTC) From: Gavin Shan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/2] arm64/mm: Enable color zero pages Date: Wed, 16 Sep 2020 13:25:21 +1000 Message-Id: <20200916032523.13011-1-gshan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200915_232623_298915_CCAAAEC8 X-CRM114-Status: UNSURE ( 9.70 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, anshuman.khandual@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, shan.gavin@gmail.com, will@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The feature of color zero pages isn't enabled on arm64, meaning all read-only (anonymous) VM areas are backed up by same zero page. It leads pressure to L1 (data) cache on reading data from them. This tries to enable color zero pages. PATCH[1/2] decouples the zero PGD table from zero page PATCH[2/2] allocates the needed zero pages according to L1 cache size Gavin Shan (2): arm64/mm: Introduce zero PGD table arm64/mm: Enable color zero pages arch/arm64/include/asm/cache.h | 22 +++++++++++++++++ arch/arm64/include/asm/mmu_context.h | 6 ++--- arch/arm64/include/asm/pgtable.h | 11 +++++++-- arch/arm64/kernel/cacheinfo.c | 34 +++++++++++++++++++++++++++ arch/arm64/kernel/setup.c | 2 +- arch/arm64/kernel/vmlinux.lds.S | 4 ++++ arch/arm64/mm/init.c | 35 ++++++++++++++++++++++++++++ arch/arm64/mm/mmu.c | 7 ------ arch/arm64/mm/proc.S | 2 +- 9 files changed, 109 insertions(+), 14 deletions(-) -- 2.23.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45791C43461 for ; Wed, 16 Sep 2020 03:26:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0266620731 for ; Wed, 16 Sep 2020 03:26:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iOT2cXXp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726205AbgIPD0Z (ORCPT ); Tue, 15 Sep 2020 23:26:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:57647 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbgIPD0V (ORCPT ); Tue, 15 Sep 2020 23:26:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600226780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=e4bgxQP4B7QtaCDMwhSwARF+1WVDn2Gcajs7TrsJlRA=; b=iOT2cXXp304s8Odz6AMUO/UOqsgvhSJvl1XAQX5A2Zg71U16ZYViFwjaH1oQ+dLcgUUnbM Rqp4mAVuFo9YkVy7oHSB84ZonAXGYF9zUHWmGqOuCYTfirhaCwiseTumENi5rKC7JRuP8W fPGxC0RadrAOdmq0RjZNlCjO4NDeBe0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236-omx1aBdgP6CNaJOGs-GbfQ-1; Tue, 15 Sep 2020 23:26:18 -0400 X-MC-Unique: omx1aBdgP6CNaJOGs-GbfQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BF1481891E80; Wed, 16 Sep 2020 03:26:16 +0000 (UTC) Received: from gshan.redhat.com (vpn2-54-108.bne.redhat.com [10.64.54.108]) by smtp.corp.redhat.com (Postfix) with ESMTP id 62F667BE49; Wed, 16 Sep 2020 03:26:14 +0000 (UTC) From: Gavin Shan To: linux-arm-kernel@lists.infradead.org Cc: mark.rutland@arm.com, anshuman.khandual@arm.com, catalin.marinas@arm.com, will@kernel.org, linux-kernel@vger.kernel.org, shan.gavin@gmail.com Subject: [PATCH 0/2] arm64/mm: Enable color zero pages Date: Wed, 16 Sep 2020 13:25:21 +1000 Message-Id: <20200916032523.13011-1-gshan@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The feature of color zero pages isn't enabled on arm64, meaning all read-only (anonymous) VM areas are backed up by same zero page. It leads pressure to L1 (data) cache on reading data from them. This tries to enable color zero pages. PATCH[1/2] decouples the zero PGD table from zero page PATCH[2/2] allocates the needed zero pages according to L1 cache size Gavin Shan (2): arm64/mm: Introduce zero PGD table arm64/mm: Enable color zero pages arch/arm64/include/asm/cache.h | 22 +++++++++++++++++ arch/arm64/include/asm/mmu_context.h | 6 ++--- arch/arm64/include/asm/pgtable.h | 11 +++++++-- arch/arm64/kernel/cacheinfo.c | 34 +++++++++++++++++++++++++++ arch/arm64/kernel/setup.c | 2 +- arch/arm64/kernel/vmlinux.lds.S | 4 ++++ arch/arm64/mm/init.c | 35 ++++++++++++++++++++++++++++ arch/arm64/mm/mmu.c | 7 ------ arch/arm64/mm/proc.S | 2 +- 9 files changed, 109 insertions(+), 14 deletions(-) -- 2.23.0