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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4FD9C433F5 for ; Fri, 17 Dec 2021 19:56:20 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JG09H2J7Nz3ccG for ; Sat, 18 Dec 2021 06:56:19 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=ravnborg.org (client-ip=91.221.196.228; helo=mx2.smtp.larsendata.com; envelope-from=sam@ravnborg.org; receiver=) X-Greylist: delayed 4506 seconds by postgrey-1.36 at boromir; Sat, 18 Dec 2021 06:55:54 AEDT Received: from mx2.smtp.larsendata.com (mx2.smtp.larsendata.com [91.221.196.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JG08p1yzkz3cCS for ; Sat, 18 Dec 2021 06:55:52 +1100 (AEDT) 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 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-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Zijlstra , Catalin Marinas , Dave Hansen , linux-mm@kvack.org, sparclinux@vger.kernel.org, Will Deacon , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Vasily Gorbik , "Aneesh Kumar K.V" , x86@kernel.org, Ingo Molnar , Christian Borntraeger , Arnd Bergmann , Heiko Carstens , Nick Piggin , Borislav Petkov , Thomas Gleixner , linux-kernel@vger.kernel.org, kernel@openvz.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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