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 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,URIBL_DBL_ABUSE_MALW,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FFA9C32771 for ; Mon, 27 Jan 2020 08:12:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5162421569 for ; Mon, 27 Jan 2020 08:12:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="jTFjC7I6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728809AbgA0IMJ (ORCPT ); Mon, 27 Jan 2020 03:12:09 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:40326 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727093AbgA0IMI (ORCPT ); Mon, 27 Jan 2020 03:12:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IUm93oOamnFo5hv3nJSbaylh1DDwQYJBt4Fpf5TYElU=; b=jTFjC7I67Cn2qeRKe1K6/I5jT yvg1vVFv5/oMehurUQgdtZgH4P1zAgC7IEs/6W4kcTxi86ngyic/hviSfjT5kLXfIM94MNeDRePVF suzzEIMOHDLZiJxHBCoWtpUqssbdXyP4KXWOLn8vbMsuZAUYuRAJZ9PmLOpBlTYHjK0zrKGtdHvGS AMGOSLfYnWMydVEwDDwURS295o9cLVcvZEpnRM4vW1IcTrPns9y77JpoypCxFTt/ouF4kko/cJOvq YSQxKkAUuPH8pvIoHRc0/aEvhhLUXVqU+mCFMlPwbg2d3WCFP2gOQcQRQaG4mKDcYhzRarLqY99+c 9o4VxNdlQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1ivzUg-00074m-49; Mon, 27 Jan 2020 08:11:38 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B8214300F4B; Mon, 27 Jan 2020 09:09:52 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3C2F8203CF5D4; Mon, 27 Jan 2020 09:11:34 +0100 (CET) Date: Mon, 27 Jan 2020 09:11:34 +0100 From: Peter Zijlstra To: Guenter Roeck Cc: Will Deacon , "Aneesh Kumar K.V" , Andrew Morton , Nick Piggin , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yoshinori Sato , Rich Felker , "David S. Miller" , Helge Deller , Geert Uytterhoeven , Paul Burton , Tony Luck , Richard Henderson , Nick Hu , Paul Walmsley Subject: Re: [PATCH mk-II 08/17] asm-generic/tlb: Provide MMU_GATHER_TABLE_FREE Message-ID: <20200127081134.GI14914@hirez.programming.kicks-ass.net> References: <20191211120713.360281197@infradead.org> <20191211122956.112607298@infradead.org> <20191212093205.GU2827@hirez.programming.kicks-ass.net> <20200126155205.GA19169@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200126155205.GA19169@roeck-us.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 26, 2020 at 07:52:05AM -0800, Guenter Roeck wrote: > On Thu, Dec 12, 2019 at 10:32:05AM +0100, Peter Zijlstra wrote: > > As described in the comment, the correct order for freeing pages is: > > > > 1) unhook page > > 2) TLB invalidate page > > 3) free page > > > > This order equally applies to page directories. > > > > Currently there are two correct options: > > > > - use tlb_remove_page(), when all page directores are full pages and > > there are no futher contraints placed by things like software > > walkers (HAVE_FAST_GUP). > > > > - use MMU_GATHER_RCU_TABLE_FREE and tlb_remove_table() when the > > architecture does not do IPI based TLB invalidate and has > > HAVE_FAST_GUP (or software TLB fill). > > > > This however leaves architectures that don't have page based > > directories but don't need RCU in a bind. For those, provide > > MMU_GATHER_TABLE_FREE, which provides the independent batching for > > directories without the additional RCU freeing. > > > > Signed-off-by: Peter Zijlstra (Intel) > > --- > > Various sparc64 builds (allnoconfig, tinyconfig, as well as builds > with SMP disabled): > > mm/mmu_gather.c: In function '__tlb_remove_table_free': > mm/mmu_gather.c:101:3: error: implicit declaration of function '__tlb_remove_table'; did you mean 'tlb_remove_table'? Thanks; I'll respin these patches against Aneesh' pile and make sure to look into this when I do so.