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=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 E0DD2C3815B for ; Mon, 20 Apr 2020 11:47:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A0C89214AF for ; Mon, 20 Apr 2020 11:47:32 +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="vTp2gHce" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0C89214AF 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 27FFC8E0005; Mon, 20 Apr 2020 07:47:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 209698E0003; Mon, 20 Apr 2020 07:47:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D0FB8E0005; Mon, 20 Apr 2020 07:47:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0150.hostedemail.com [216.40.44.150]) by kanga.kvack.org (Postfix) with ESMTP id E6BEA8E0003 for ; Mon, 20 Apr 2020 07:47:31 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9DAF0181AEF23 for ; Mon, 20 Apr 2020 11:47:31 +0000 (UTC) X-FDA: 76728058302.17.drum65_248fb29ee1e29 X-HE-Tag: drum65_248fb29ee1e29 X-Filterd-Recvd-Size: 4681 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Mon, 20 Apr 2020 11:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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; bh=uHONsJr4KTEbnxxWPAu0Ew27QiCD45QjANeqi0Gi8dc=; b=vTp2gHceK5xxpBGqQ42nYZb4gH mnA9XPuy7DRtkA60Df0jiiy97/SlJOp04WyRhiU2mpwpDKgFglWyL1et7pobaqGcOc2KccsuF2tq9 r5lih7DbF8DvviZnMY/w5D0UBLT+IiaxgUTqMMpPkt9AjH9jrTkixQFC0wACrJMjGEk6Ypq5kXWAY Enrz0NYVa7bS0ZJ9fmx5Ey2JFVZ92VN3WLWH6S77jP9kly7KVGeeU0JOr2oZ6Fqbe9MjBwf988D8x qQdAEkIR9vO3f6xiZFwx27vF2CccaawMTkPYXmpoMSIcPYUCUC33+3xeKPy23pnPnYuuhuFETPpJ/ j5F/QxdA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQUt4-0004FH-Oq; Mon, 20 Apr 2020 11:46:55 +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 25CFD3024EA; Mon, 20 Apr 2020 13:46:51 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 15FA32B8DAF8C; Mon, 20 Apr 2020 13:46:51 +0200 (CEST) Date: Mon, 20 Apr 2020 13:46:51 +0200 From: Peter Zijlstra To: Zhenyu Ye Cc: mark.rutland@arm.com, will@kernel.org, catalin.marinas@arm.com, aneesh.kumar@linux.ibm.com, akpm@linux-foundation.org, npiggin@gmail.com, arnd@arndb.de, rostedt@goodmis.org, maz@kernel.org, suzuki.poulose@arm.com, tglx@linutronix.de, yuzhao@google.com, Dave.Martin@arm.com, steven.price@arm.com, broonie@kernel.org, guohanjun@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, arm@kernel.org, xiexiangyou@huawei.com, prime.zeng@hisilicon.com, zhangshaokun@hisilicon.com, kuhn.chenqun@huawei.com Subject: Re: [PATCH v1 4/6] tlb: mmu_gather: add tlb_set_*_range APIs Message-ID: <20200420114651.GD20696@hirez.programming.kicks-ass.net> References: <20200403090048.938-1-yezhenyu2@huawei.com> <20200403090048.938-5-yezhenyu2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200403090048.938-5-yezhenyu2@huawei.com> 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 Fri, Apr 03, 2020 at 05:00:46PM +0800, Zhenyu Ye wrote: > From: "Peter Zijlstra (Intel)" > > tlb_set_{pte|pmd|pud|p4d}_range() adjust the tlb->start and > tlb->end, then set corresponding cleared_*. > > Signed-off-by: Peter Zijlstra (Intel) > Signed-off-by: Zhenyu Ye > --- > include/asm-generic/tlb.h | 55 ++++++++++++++++++++++++++++----------- > 1 file changed, 40 insertions(+), 15 deletions(-) > > diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h > index f391f6b500b4..ee91310a65c6 100644 > --- a/include/asm-generic/tlb.h > +++ b/include/asm-generic/tlb.h > @@ -511,6 +511,38 @@ static inline void tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vm > } > #endif > > +/* > + * tlb_set_{pte|pmd|pud|p4d}_range() adjust the tlb->start and tlb->end, > + * and set corresponding cleared_*. > + */ > +static inline void tlb_set_pte_range(struct mmu_gather *tlb, > + unsigned long address, unsigned long size) > +{ > + __tlb_adjust_range(tlb, address, size); > + tlb->cleared_ptes = 1; > +} > + > +static inline void tlb_set_pmd_range(struct mmu_gather *tlb, > + unsigned long address, unsigned long size) > +{ > + __tlb_adjust_range(tlb, address, size); > + tlb->cleared_pmds = 1; > +} > + > +static inline void tlb_set_pud_range(struct mmu_gather *tlb, > + unsigned long address, unsigned long size) > +{ > + __tlb_adjust_range(tlb, address, size); > + tlb->cleared_puds = 1; > +} > + > +static inline void tlb_set_p4d_range(struct mmu_gather *tlb, > + unsigned long address, unsigned long size) > +{ > + __tlb_adjust_range(tlb, address, size); > + tlb->cleared_p4ds = 1; > +} Uhm.. when I wrote that patch they were called tlb_flush_p*_range(): https://lkml.kernel.org/r/20200401122004.GE20713@hirez.programming.kicks-ass.net Your current naming makes no sense what so ever, we do not "set" the range.