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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 991E6C77B75 for ; Tue, 16 May 2023 06:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AGsddOzecC7nn1hP8xVyV8Sl786hpcgiVqOYGEcDxjA=; b=pRKbYmWPj+KpOg AF0jC837E/VybnMZ/h9IoV8jxAE5WtosLgRRDFeKYSfwfWSpy45krO3vf/IdQTP1PzZ5+46IATJym DnXJHuSEQUKHIxBoDzhWDtXFbdcxd9PjbIk1YI3gRBdyWA3FvLKuTMpsU6vtyLZi5wyhvKVMSWT5S Zj2fwZhXKdLiXmU4FaPl8BGfAQQ9O8X0+zKFEMj79Iwl7kxOUgsZplYQzFftTfDuVgV8RwlhbJXiS oLNwAlSY47L1a87b0qAiNN9IkYkbFyRqFYfwZkf6pTDAL0Pb8WMofGG12imb+fFmPwipkX1CacrS4 rKzSowdl1KPmEh88jJVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pyoRk-004YFB-1w; Tue, 16 May 2023 06:46:08 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pyoRh-004YDX-2V for linux-arm-kernel@lists.infradead.org; Tue, 16 May 2023 06:46:07 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684219564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T0pJW8FsQ/W0a0sLTNPepIH59AxRXaaj71u89PT9jXI=; b=SQb9z37fZztMolTVD9OGHY0UBWBvB1RoAt9gTN1l9AxKzVK+wT9r0S1JfGrCLLDr8JR/pD l7UcHRqJe803TVKHhvrF4WfLV1naza7+Pql7M1I/7TkRzp4rWhRU2ig+W9v61cjWTFgjEl W/onf4Bo55d6wy0oH8xYR97d2Xqm6LlqXkbnOzwR/AaRMK+czSmFuinc6CC0VJ6X8YWlaK GuOXoUrCmAcPvSEuMgkB+6FTpm1NGOfG23ACZPDdE/qc2E7u4QKHLszd8rCJTVrJpqFUGe jWiRrezRxeBHPcS7T1TLiZyW+EzcOKQvYEaQXvWWsFh87pK5LWKYCFB3fsI1LQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684219564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T0pJW8FsQ/W0a0sLTNPepIH59AxRXaaj71u89PT9jXI=; b=7VhqL8RfurMeIoshIVb/nWFBWSfKmagmy+E7JckP4p4d5gsH7E6Tx4qh7EnJZCl94CW5qa r9Ps6/g9Nz/53OCA== To: "Russell King (Oracle)" Cc: Andrew Morton , linux-mm@kvack.org, Christoph Hellwig , Uladzislau Rezki , Lorenzo Stoakes , Peter Zijlstra , Baoquan He , John Ogness , linux-arm-kernel@lists.infradead.org, Mark Rutland , Marc Zyngier , x86@kernel.org Subject: Re: Excessive TLB flush ranges In-Reply-To: <87r0rg93z5.ffs@tglx> References: <87a5y5a6kj.ffs@tglx> <87353x9y3l.ffs@tglx> <87zg658fla.ffs@tglx> <87r0rg93z5.ffs@tglx> Date: Tue, 16 May 2023 08:46:03 +0200 Message-ID: <87leho93kk.ffs@tglx> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230515_234605_959904_6CC0C1B5 X-CRM114-Status: GOOD ( 13.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 16 2023 at 08:37, Thomas Gleixner wrote: > On Mon, May 15 2023 at 22:31, Russell King wrote: >> In the case you have, are "start" and "end" set on function entry >> to a range, or are they set to ULONG_MAX,0 ? What I'm wondering is >> whether we could get away with just having flush_tlb_kernel_vas(). >> >> Whether that's acceptable to others is a different question :) > > As I said flush_tlb_kernel_vas() should be > > void flush_tlb_kernel_vas(struct list_head *list, unsigned int num_entries): > > So that an architecture can decide whether it's worth to do walk the > entries or whether it resorts to a flush all. The only issue is that the flush range which is handed in from _vm_unmap_aliases(), i.e. the conglomorate of to be mopped up TLBs is an aggregate too. In this particular BPF case it's always one page, but that obviously might end up being a horrible large range too. Though there is no way to do that fake vmap_area trick I used in __purge_vmap_area_lazy(). Bah! Thanks, tglx _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel