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 1DCE8C77B7A for ; Tue, 16 May 2023 06:41:13 +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=Nv2IZi1aS4TpnMs9Sp9gOzdUb8Lww+H5kZwUXj4f6LE=; b=be+07JvOMJ9OMn YBxhoGvSHmXWFayE76yPD81c8//w7ZWSOvx/QnsWZVOWzbGeEiKLqUtpLMGmLdA30rEThGv0qjV+U BKE/V+YPergffD47eJO+0Z8O+Tv28Cd7ny8sMh+jZAofusdCiStV/fLVl7dc+qy+a1dmYwg2iW3/n EaLqHOGXgtOTuv6uLHlfyGUEALy2Hxu4w4pPKBncOEUTnpdu1p2CfMmHDFWkI6CmSVvxKdh0kWUtQ wlaJsoj24iYDFqoNcax9JO4s2Yoph9G9eRjTFNgowCCfEf9QuysgS+aX8/ja/gY+g0hnUYpVdgxOm 2G+IaQjNIg1JUNVwsrMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pyoMd-004XWm-2a; Tue, 16 May 2023 06:40:51 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pyoMa-004XVf-39 for linux-arm-kernel@lists.infradead.org; Tue, 16 May 2023 06:40:50 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684219247; 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=Zfmn83rF/TWm/I9paO17+6NNkBLlCT275s9VXWrN7B4=; b=x0pf8UNwXqZeLOrKOIwZXERQ/EbQMZiyY8uNY4MDufMrMEPw09gznim/gh2RSuvKRfwjtY Va5ekcc5nMd3kXTSFAt7yM50enxUv43WsJr7WqTdGnVVbx0OQ7L0x5FNXqDEPuflEw7fi8 v0iCs+6dZ4aowKWN88voJ900EElaBdQpuQhqfT3/15MNPsYWweSoOfc5XTB+m9flzDbx1h tUYHTmSYyN9Ik4Mlq4HnZ60BmJn416nFZW/apalB75s4RwSujVFe0/MIJ/I4BIb0zqp71t QglnDlqUQlLKbPGYfNZYNg/LlaXiLuTVKopZm0k/NHj4YIBnzXCr6oMctSvufA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684219247; 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=Zfmn83rF/TWm/I9paO17+6NNkBLlCT275s9VXWrN7B4=; b=/kL8pSGlM8rSLXWkrLenjE/Z1Wk3RYFekHy6Z7v8kJcVqZ7YyTsRpvcq5UMQ1KXGLqBqlH 0RuMZE6Y4b61WaCQ== To: Baoquan He , Uladzislau Rezki Cc: Andrew Morton , linux-mm@kvack.org, Christoph Hellwig , Lorenzo Stoakes , Peter Zijlstra , John Ogness , linux-arm-kernel@lists.infradead.org, Russell King , Mark Rutland , Marc Zyngier Subject: Re: Excessive TLB flush ranges In-Reply-To: References: <87a5y5a6kj.ffs@tglx> Date: Tue, 16 May 2023 08:40:47 +0200 Message-ID: <87o7mk93tc.ffs@tglx> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230515_234049_156016_2372F164 X-CRM114-Status: GOOD ( 12.11 ) 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 10:26, Baoquan He wrote: > On 05/15/23 at 08:17pm, Uladzislau Rezki wrote: >> For systems which lack a full TLB flush and to flush a long range is >> a problem(it takes time), probably we can flush VA one by one. Because >> currently we calculate a flush range [min:max] and that range includes >> the space that might not be mapped at all. Like below: > > It's fine if we only calculate a flush range of [min:max] with VA. In > vm_reset_perms(), it calculates the flush range with the impacted direct > mapping range, then merge it with VA's range. That looks really strange > and surprising. If the vm->pages[] are got from a lower part of physical > memory, the final merged flush will span tremendous range. Wondering why > we need merge the direct map range with VA range, then do flush. Not > sure if I misunderstand it. So what happens on this BPF teardown is: The vfree(8k) ends up flushing 3 entries. The actual vmalloc part (2) and one extra which is in the direct map. I haven't verified that yet, but I assume it's the alias of one of the vmalloc'ed pages. Thanks, tglx _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel