From patchwork Fri Jul 8 07:18:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 12910667 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CB04C43334 for ; Fri, 8 Jul 2022 07:20:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3CED86B0075; Fri, 8 Jul 2022 03:20:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 37E6D900002; Fri, 8 Jul 2022 03:20:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1AA3F6B007D; Fri, 8 Jul 2022 03:20:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 0C91B6B0075 for ; Fri, 8 Jul 2022 03:20:04 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id DB70D211C8 for ; Fri, 8 Jul 2022 07:20:03 +0000 (UTC) X-FDA: 79663083486.17.4AF6AE7 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf08.hostedemail.com (Postfix) with ESMTP id 1E822160011 for ; Fri, 8 Jul 2022 07:20:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Subject:Cc:To:From:Date:Message-ID: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=8+HqruRpwjEEEgSkE1QZNioLi75oIFsvSf7CNmRI+jQ=; b=KA/TA93wXBcJzNZB5lJSMugjWr kcWjW2pBXd8nmM7ADtnT1XWMxDSZca+5/nWS8E48HPWMnaRPYhgxnEIk8kZt1mKHkubXLE9JAPaMY Fr5pQUR/rgNCJxEe9ceMEZhwiDnNOKdW1AREDSyekJc+PvrtrqHW53aKH4sebLEba1SSwNwDOylMx ULPCkc3GSNUqKNWzutLStCclX+DO9YUTBjHyuTrq7ft7XMOQPs08jxMIsnEuI8MpJRwOuQ8G02nBU TyTZCj9OOrffz9rD1DB07eVg0Enq1cruBnqeit2d+pVNscnvDcjXybZmec+hfNlxakEfHwgKJXyD8 5+cMRnng==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9iHK-003Igt-0Y; Fri, 08 Jul 2022 07:19:54 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B3C62300912; Fri, 8 Jul 2022 09:19:51 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 47891203BFBC2; Fri, 8 Jul 2022 09:19:51 +0200 (CEST) Message-ID: <20220708071802.751003711@infradead.org> User-Agent: quilt/0.66 Date: Fri, 08 Jul 2022 09:18:02 +0200 From: Peter Zijlstra To: Jann Horn , Linus Torvalds , Will Deacon Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, peterz@infradead.org, Dave Airlie , Daniel Vetter , Andrew Morton , Guo Ren , David Miller Subject: [PATCH 0/4] munmap() vs unmap_mapping_range() ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657264802; a=rsa-sha256; cv=none; b=urnin6PIBqsNEMVjDD2FKHwygM5tVqILZ+FIYOjx6TV1S29p+1S4QlXh/EZmD9zQGBXrDL 6LHAlw6k7ptfNqWHo1k/ap6l+8tRkvvRylSyqX0fWqiUQIQ9ChcP4RmAIQqKP8HglMIZHr 6Xde86P5g+jCc6OsfJ8PT/SMjmANnUM= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="KA/TA93w"; spf=none (imf08.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657264802; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=8+HqruRpwjEEEgSkE1QZNioLi75oIFsvSf7CNmRI+jQ=; b=gdk+T4CiUlquTqRadnkmwSZv5SuxQ0KQURy5uzGaw9o/JBrOfxKP3741WnWWB7MQGpA2d6 NphIg6S1sczO++tSMpBxov1AjJYx+PxD1SmnUQErq7hMVuGk7gIb3Y3i5VXgzGtXTUt7sv CKy786Tb1rBt6hGzs6u2eFheh5mooYk= X-Rspamd-Server: rspam08 X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="KA/TA93w"; spf=none (imf08.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none X-Stat-Signature: zyp6kg3zfuhzsywkh363hnhnxj6s8k3o X-Rspamd-Queue-Id: 1E822160011 X-HE-Tag: 1657264801-102690 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, These 4 patches implement the suggestion by Linus. The first patch nukes all architecture implementations of tlb_{start,end}_vma() by adding two additional MMU_GATHER config knobs. DaveM, please clarify the sparc64 case, it seems a little odd to have flush_cache_range() but to explicitly not call it at unmap time. It would be nice to remove this one special case. The second patch isn't strictly needed for this series but since I was looking at all this, I figured C-SKY didn't make a whole lot of sense. Guo, please have a look. The third patch cleans up the #ifdeffery and provides a single tlb_{start,end}_vma() implementation for everyone. The fourth, and final, patch does the force TLB-flush on VM_PFNMAP thing. I've had the first three patches exposed to the robots and they've (so far) not reported build (or other) fail.