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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2692C433F5 for ; Fri, 17 Dec 2021 18:40:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 429E36B0071; Fri, 17 Dec 2021 13:39:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3B1B56B0073; Fri, 17 Dec 2021 13:39:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 22B986B0074; Fri, 17 Dec 2021 13:39:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0227.hostedemail.com [216.40.44.227]) by kanga.kvack.org (Postfix) with ESMTP id 0C1E86B0071 for ; Fri, 17 Dec 2021 13:39:54 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C43F28249980 for ; Fri, 17 Dec 2021 18:39:43 +0000 (UTC) X-FDA: 78928149846.19.7194113 Received: from mx2.smtp.larsendata.com (mx2.smtp.larsendata.com [91.221.196.228]) by imf24.hostedemail.com (Postfix) with ESMTP id F12C6180017 for ; Fri, 17 Dec 2021 18:39:39 +0000 (UTC) Received: from mail01.mxhotel.dk (mail01.mxhotel.dk [91.221.196.236]) by mx2.smtp.larsendata.com (Halon) with ESMTPS id c1a4b68e-5f68-11ec-ac19-0050568cd888; Fri, 17 Dec 2021 18:40:07 +0000 (UTC) Received: from ravnborg.org (80-162-45-141-cable.dk.customer.tdc.net [80.162.45.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sam@ravnborg.org) by mail01.mxhotel.dk (Postfix) with ESMTPSA id CC460194B7E; Fri, 17 Dec 2021 19:39:40 +0100 (CET) Date: Fri, 17 Dec 2021 19:39:36 +0100 X-Report-Abuse-To: abuse@mxhotel.dk From: Sam Ravnborg To: Nikita Yushchenko Cc: Will Deacon , "Aneesh Kumar K.V" , Andrew Morton , Nick Piggin , Peter Zijlstra , Catalin Marinas , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Arnd Bergmann , x86@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, kernel@openvz.org Subject: Re: [PATCH/RFC] mm: add and use batched version of __tlb_remove_table() Message-ID: References: <20211217081909.596413-1-nikita.yushchenko@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211217081909.596413-1-nikita.yushchenko@virtuozzo.com> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: F12C6180017 X-Stat-Signature: jcbit94hocyrzd1ns3fw6s7s81ry54ek Authentication-Results: imf24.hostedemail.com; dkim=none; dmarc=none; spf=none (imf24.hostedemail.com: domain of sam@ravnborg.org has no SPF policy when checking 91.221.196.228) smtp.mailfrom=sam@ravnborg.org X-HE-Tag: 1639766379-158003 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 Nikita, How about adding the following to tlb.h: #ifndef __tlb_remove_tables static void __tlb_remove_tables(...) { .... } #endif And then the few archs that want to override __tlb_remove_tables needs to do a #define __tlb_remove_tables __tlb_remove_tables static void __tlb_remove_tables(...) { ... } In this way the archs that uses the default implementation needs not do anything. A few functions already uses this pattern in tlb.h - see for example tlb_start_vma io.h is another file where you can see the same pattern. Sam