Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2683072rwb; Mon, 7 Aug 2023 01:26:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwIU2EIF1pcohkMkDZU4dMFVGcmPfXPIdKQN6dEdqIyyMo0MQPnx8zY+J26fPif4fN0rf1 X-Received: by 2002:a05:6a20:6a22:b0:134:6839:c497 with SMTP id p34-20020a056a206a2200b001346839c497mr10019495pzk.11.1691396797517; Mon, 07 Aug 2023 01:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691396797; cv=none; d=google.com; s=arc-20160816; b=RUxI3ErNpcVFWwugb/WKgrbmlkQDO5sUU1zsDZHksFtSLHARPLhKcQYb8wlwpKJfwN M+E60CRhB5n5f0S9cUHyBmcC3ZQbXNACrAZFzKEf68JKyZhmLq2zuykc1EVAdr5ttY7w zGwkubFBT8fqxCNCQxnt4QG2yvAciKjSpOx90sgGUJE36h+9zmgJCDEeHLryttB2XS2z I0XBCsERPnmDsci4vyNrPrtboCi1Pn+lC/G5/cOLZlvd0oheWpnZFTdEBuxaUlPk0DFQ KX8E4pOhMSNGILbbkjKQZio2hsDbbBs2B68VxHVpWe7SL8r3WuML4IQcH77oBNxB3XJo Omjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=3D9f45pFFUiIUHkvI7K+6SvpFXiBgq806a3dCEKRlDc=; fh=ZYlRn2g767F43XtOdyo3SRNTefo0p1j7iXRdr3U7KxE=; b=t9oozUSsALyIzW/vT0TZT6jCd4I3wchQXoznUEvF/0VghbIH5o+gKalVMTpcmqV2eX ea4Kgk9/wusL1W5Xtnid9vY7G6R7FSVS5J9EsQfigmEtb1ITQ1IwA9wUgB+fFTPjic8f lwXdzcN0Uj+yoBV5aR/Qk+k4ZL/LiL8Tjohxfvz6jUAEmsEDjZNW7jgeSPImzwt+L0Mo PTMtxpD+89UCAVhHgVW2yJYmKtJKGHRY/wa0uGv8QA9wf7uXO+pUTppw+3d6nnoaHMff v7RVF/wVv9SpNiGMyI2dIuCJhSm70Lrwb/3HrC/xuWXzIByYTHni9NusGHT8VLNOilg3 bXSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y20-20020a634b14000000b0055b635d97adsi5065228pga.619.2023.08.07.01.26.25; Mon, 07 Aug 2023 01:26:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230469AbjHGIXY (ORCPT + 99 others); Mon, 7 Aug 2023 04:23:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbjHGIXW (ORCPT ); Mon, 7 Aug 2023 04:23:22 -0400 Received: from Atcsqr.andestech.com (60-248-80-70.hinet-ip.hinet.net [60.248.80.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C64C10EF for ; Mon, 7 Aug 2023 01:23:18 -0700 (PDT) Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by Atcsqr.andestech.com with ESMTP id 3778N83c098807; Mon, 7 Aug 2023 16:23:08 +0800 (+08) (envelope-from dylan@andestech.com) Received: from atctrx.andestech.com (10.0.15.173) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Mon, 7 Aug 2023 16:23:07 +0800 From: Dylan Jhong To: , , , , , , , , , , , , , CC: , , , Dylan Jhong Subject: [PATCH 0/1] Enhanced TLB flushing for vmap/vmalloc() Date: Mon, 7 Aug 2023 16:23:04 +0800 Message-ID: <20230807082305.198784-1-dylan@andestech.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.0.15.173] X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL: Atcsqr.andestech.com 3778N83c098807 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,PDS_RDNS_DYNAMIC_FP, RCVD_IN_DNSWL_BLOCKED,RDNS_DYNAMIC,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch is actually the v2 version of the this patch[1]. In the v1 version, Alexandre suggested that I should make the patch more general, so I even changed the title accordingly. Many thanks to Alexandre. And Alexandre also submitted a similar patch[2] recently, in which he implemented TLB flushing via flush_cache_vmap() instead. However, it seems that flush_cache_vmap() does not cover every place where arch_sync_kernel_mappings() performs TLB flushing. IMHO, arch_sync_kernel_mappings() cannot be replaced by flush_cache_vmap(). Please correct me if I'm wrong! [1]: [PATCH] riscv: Flush stale TLB entry with VMAP_STACK enabled http://lists.infradead.org/pipermail/linux-riscv/2023-August/037503.html [2]: [PATCH -fixes] riscv: Implement flush_cache_vmap() https://www.spinics.net/lists/kernel/msg4873712.html Dylan Jhong (1): riscv: Implement arch_sync_kernel_mappings() for "preventive" TLB flush arch/riscv/include/asm/page.h | 2 ++ arch/riscv/mm/tlbflush.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) -- 2.34.1