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.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 82AA1C43603 for ; Thu, 12 Dec 2019 09:31:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4486121655 for ; Thu, 12 Dec 2019 09:31:15 +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="NW2MeACW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4486121655 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CB24E6B36C3; Thu, 12 Dec 2019 04:31:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C64046B36C4; Thu, 12 Dec 2019 04:31:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA0826B36C5; Thu, 12 Dec 2019 04:31:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id A36576B36C3 for ; Thu, 12 Dec 2019 04:31:14 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 732AB180AD822 for ; Thu, 12 Dec 2019 09:31:14 +0000 (UTC) X-FDA: 76255970868.27.rock93_aaca0eafcf5e X-HE-Tag: rock93_aaca0eafcf5e X-Filterd-Recvd-Size: 5391 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Dec 2019 09:31:13 +0000 (UTC) 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=KvrwbQennYY8QnMZ8aYWegrb07xu+PIkjz3Z8wg/eK4=; b=NW2MeACWD7pQvnuQ878OqOex5 8Bl0zzFsRZzFAJXTKTkJ923v7X2eJEFzq8qA/FcdHnVm1fFjP625ix7THJU7C+ucJgFfYOHFRvD1L Q/gAkZILIxrfAhp09zHvb40mkvjb3Cir5fN8qTVqXOfg1pQIGu2arcO4eJ7CgcrdRx+cVshg+IPgM kgICX46GZXqN8SlxiHJSXc4k7ME0bto3wI6/OgBfFjjPtC/aFO3QWi0foIji9c7KsOhdTFH9UfoyF 5PhvHdRtW2unb456JPxJy0rrG2pAdMaPaxCMt3P7xXSCju64OuadJiOlqXHTXxohD5F88MpxkJ4/C 73mG9EV7w==; 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 1ifKoF-0005N7-JP; Thu, 12 Dec 2019 09:30:59 +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 0A600305FEE; Thu, 12 Dec 2019 10:29:35 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0517F2B18D290; Thu, 12 Dec 2019 10:30:55 +0100 (CET) Date: Thu, 12 Dec 2019 10:30:55 +0100 From: Peter Zijlstra To: Will Deacon , "Aneesh Kumar K.V" , Andrew Morton , Nick Piggin Cc: 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 08/17] asm-generic/tlb: Provide MMU_GATHER_TABLE_FREE Message-ID: <20191212093055.GT2827@hirez.programming.kicks-ass.net> References: <20191211120713.360281197@infradead.org> <20191211122956.112607298@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191211122956.112607298@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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: On Wed, Dec 11, 2019 at 01:07:21PM +0100, Peter Zijlstra wrote: > @@ -56,6 +56,15 @@ > * Defaults to flushing at tlb_end_vma() to reset the range; helps when > * there's large holes between the VMAs. > * > + * - tlb_remove_table() > + * > + * tlb_remove_table() is the basic primitive to free page-table directories > + * (__p*_free_tlb()). In it's most primitive form it is an alias for > + * tlb_remove_page() below, for when page directories are pages and have no > + * additional constraints. > + * > + * See also MMU_GATHER_TABLE_FREE and MMU_GATHER_RCU_TABLE_FREE. > + * > * - tlb_remove_page() / __tlb_remove_page() > * - tlb_remove_page_size() / __tlb_remove_page_size() > * > @@ -202,7 +193,16 @@ struct mmu_table_batch { > > extern void tlb_remove_table(struct mmu_gather *tlb, void *table); > > -#endif > +#else /* !CONFIG_MMU_GATHER_HAVE_TABLE_FREE */ > + > +/* > + * Without either HAVE_TABLE_FREE || CONFIG_HAVE_RCU_TABLE_FREE the > + * architecture is assumed to have page based page directories and > + * we can use the normal page batching to free them. > + */ > +#define tlb_remove_table(tlb, page) tlb_remove_page((tlb), (page)) > + > +#endif /* CONFIG_MMU_GATHER_TABLE_FREE */ The build robot kindly notified me that this breaks ARM because it does the exact same #define for the same reason. (and I noticed the comment is stale) I'll post a new version of this patch with the below delta. --- --- a/arch/arm/include/asm/tlb.h +++ b/arch/arm/include/asm/tlb.h @@ -37,10 +37,6 @@ static inline void __tlb_remove_table(vo #include -#ifndef CONFIG_MMU_GATHER_RCU_TABLE_FREE -#define tlb_remove_table(tlb, entry) tlb_remove_page(tlb, entry) -#endif - static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, unsigned long addr) { --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -196,9 +196,8 @@ extern void tlb_remove_table(struct mmu_ #else /* !CONFIG_MMU_GATHER_HAVE_TABLE_FREE */ /* - * Without either HAVE_TABLE_FREE || CONFIG_HAVE_RCU_TABLE_FREE the - * architecture is assumed to have page based page directories and - * we can use the normal page batching to free them. + * Without MMU_GATHER_TABLE_FREE the architecture is assumed to have page based + * page directories and we can use the normal page batching to free them. */ #define tlb_remove_table(tlb, page) tlb_remove_page((tlb), (page))