Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp687163ybl; Thu, 22 Aug 2019 03:21:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4H+Mt4KzS+QtL9TuRPGyQoKcY1DkOoH8qL+//cu2zgTEXnyhJaVwry59eYBJNU7z489u0 X-Received: by 2002:a17:902:7442:: with SMTP id e2mr27877204plt.315.1566469303001; Thu, 22 Aug 2019 03:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566469302; cv=none; d=google.com; s=arc-20160816; b=NgJNpVw8JvEqWZxSN1ebKeL57FBtjuIe4n2t3muR09TKq7kABZ1e56Qf8CJb20U4zI 5t+IqGsyM3SdFGjgVYoarhzuP4soZJYOfzrAnOkWBpEmhWp4RhCyzVqtX0yTNGsA8Fbg jT0LhicifZayIra92/sVIH1nJnQfa1yQ2noPSn1TWFT7+mQ8Owq12U6oUuuaqZdG59mq Xp8LCOi757t1eb56QeBuxVDcgMCtj+JUhwXLGa9WkEsZAA4ZV8/XNqdKO30IQLrpaUee fcVxQZW+tV/62C68YQnT5lzbhbejVYl+PQw7oWQUoblE4aHcDL7cqKZFXi3LQjdIA09g zddg== 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 :message-id:date:subject:cc:to:from:wdcironportexception :ironport-sdr:ironport-sdr:ironport-sdr:dkim-signature; bh=CAfH6XUxD6kMqVX+sqxep6vKKjrvtLnSiF9DhXhzu9Q=; b=RO/439FyZUU4jMyK0Uryi3WhcQKj7z/O2sIhE/zVLnmL2PTXNdtW7Um4UpbFGXB1+z Moteu05GQ7CpOCD4lccpEdxSd2z4wYL0WNH2Ut5BYH68m0E1Sh/Z3WIcWYKkb3ay+2pd zfsZTsOyNC3jPIwFKKKAVBDHcEWeFzUm8YE7oOAyK7pkpbWJYEdUSdlMgXc6zCheI+V8 t7uYQ/BNuU5L92PeTn2fVg5ba7dvVBjFtRQorj/ZoxcTaRmwSTVvN2YcNv8wruMfVzJT 94eNXd/Nh4jgRESQaqtNdfiOK50wmzNZV7SjCsIP3nsozPb4GsOv/tpVTIGg6y3W5gqY blwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=mWty84D2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8si5219815pfo.191.2019.08.22.03.21.27; Thu, 22 Aug 2019 03:21:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=mWty84D2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731859AbfHVH7G (ORCPT + 99 others); Thu, 22 Aug 2019 03:59:06 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:20011 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731813AbfHVH7A (ORCPT ); Thu, 22 Aug 2019 03:59:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1566460740; x=1597996740; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=QcWeubIkfrNRIenwwrXmwbneuUHMuNrk72My33ahgcU=; b=mWty84D22xigddfD4YOkzf07KzjfgQd080z2lnO8mTAc1vgPqnUoJqNJ 6/8H0Qf6rjOi3W7ld/WII/VbgYw5avFUKfEjCXByuDBSZrAMUbyLcff14 lVkfxC5bFsS12hh3Kutytydf8vPjwOID5PqOWybRxISHwRvRiLHLxINfj gLUbg5JJe0643CnPqDhNQwyDASUtq5ebNgl+W/9m6/5zKu1+FpSs2dgp9 1nEg56RuNjwv/k8aqEBnyBxf8BurPZR+Lg30qQrQ0P3eaP55idekG41Yg FKvBxyXkAq7nLUPrm+0PdFE+HlFht7CktCX0yA1izCbiVv0TVrSH2l+t/ g==; IronPort-SDR: mr5rwO6M/mOdw1hl+KMbGoU/ieoDdtwPsIZSMBuK6itrVDCq1OhtaQ/I0UTBaER5oPtoGevo0f QmmYfYtmv+TIl23fLmEpH2rApEZA9hZFW8SNczHeG37jb8QSkV4b5PbDs8fOFZkQ0i9UfbFyBT cJwbpvsSAZmD6bNoGWK5BmPc7LOeYYnmRFavISbcjiPwQ9TPB7bQOyfC4tFQHc/2bNEugBhje6 ow2DzERAXPn4XgnPLHGGHBuSx5sGuuatLW1tSiVYCH5RpALX/NFMKezJfZN4UrY6vldShPu+87 5Co= X-IronPort-AV: E=Sophos;i="5.64,415,1559491200"; d="scan'208";a="116397475" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 22 Aug 2019 15:58:58 +0800 IronPort-SDR: cqdGkb3OVlDdgYwOikNlR7j9HGSLeH9D1J9OUo6Pu2Jud1lV0e55b4mUDULOV1EYhJBPWnEI4n zYrWMkTojG+pvbXn/Nz8R4HYBMl0U0CCT8zBnEVcfN9Ty5orROvxb5L01omqNYqoGPE7FaEYaW hIuyUg0k2ROmpWNnIzTPH3+ATuOYLx/o3E37vOq17O/ABeDN43bCecJ5TDywMWHdz18CtlrTLD DLsd4BK+Yu8nBfks0nYxeJf6hw34ELDOZ5mjuwUu2jtOkx6VwM0fc6aTFBO/HB4JpyXGH/dht2 JrwRfN4OgwNe7gheHK5ovNNi Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2019 00:56:19 -0700 IronPort-SDR: 5+z4id9bKYI3iBBh15JNRJHsyhAB1X1xxEPv8cc5V+2UHHTZm/FVENkLtf82Mh1hLQ9rozGuwf WuPlKEfi6xXbIvx8HuHh+8w8Oni43TrwC0fq8SfhxiP4rI/L9aWHGGvB1DBfRtoSx17Lro8crf 8JaxCm7xlHsAShBFeWwVaiU3/ZxS4HtvbfmdGc8ZcOHlJQ7sC16TwVIZvnzZKLNkiRPe6MI5Kc kr+2z7C5MzuFZi3hq/vpFNQPkCjJzeznFqPF5xI9fi2CVjjqMkNkFIAh/P2f5dX4LqVSfKvgRd FKY= WDCIronportException: Internal Received: from jedi-01.sdcorp.global.sandisk.com (HELO jedi-01.int.fusionio.com) ([10.11.143.218]) by uls-op-cesaip02.wdc.com with ESMTP; 22 Aug 2019 00:58:58 -0700 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Albert Ou , linux-riscv@lists.infradead.org, Palmer Dabbelt , Paul Walmsley , Christoph Hellwig , Anup Patel Subject: [PATCH v4 0/3] Optimize tlbflush path Date: Thu, 22 Aug 2019 00:51:48 -0700 Message-Id: <20190822075151.24838-1-atish.patra@wdc.com> X-Mailer: git-send-email 2.21.0 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 This series adds few optimizations to reduce the trap cost in the tlb flush path. We should only make SBI calls to remote tlb flush only if absolutely required. This series is based on Christoph's series: http://lists.infradead.org/pipermail/linux-riscv/2019-August/006148.html Changes from v3->v4 1. Simplify the local vs remote usecase. 2. Reorder the patches in the series. Changes from v2->v3: 1. Split the patches into smaller one per optimization. Atish Patra (3): RISC-V: Do not invoke SBI call if cpumask is empty RISC-V: Issue a local tlbflush if possible. RISC-V: Issue a tlb page flush if possible arch/riscv/mm/tlbflush.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) -- 2.21.0