From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EEBE72627 for ; Fri, 26 Jun 2026 12:31:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782477089; cv=none; b=FRVhBX0p/M1qyeRP4QHJZKU0c5vw+tQYKZiHCCbzOGQBrH4I21Qotypvs25EB9lA6EZwASyMqlUvCi/NHEGXyONTn9nf8Qs89NwAhmMizfTkTJvE7BcskntNAbXPl10IyxdWeMkWV40OTQ1Q7O6AHIknYnhrBj5RV8foqiHeqmM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782477089; c=relaxed/simple; bh=tqFkPrKngbGi7F0q/LI40ZThdY9KNHFk+D0fm50gQjw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HAnqmJ/gN0AJXqTxV+jkqnuWQTk1UK5m4LvaDY43JNe14zYbhfK7frcoUQ6oLaiJsGV6p7L0+W2XNeM9B7g6ggW2d5xfh/l7i9HtFi6+mTNhlLxy/egWJJzR1tGg3asrpAJob8Rtnh9G7mQRM8r4m8TiMgSyRAQHIZ7PcTC+8l4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=HVhLEjmN; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="HVhLEjmN" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 95FCE1F91; Fri, 26 Jun 2026 05:31:21 -0700 (PDT) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F03A63F905; Fri, 26 Jun 2026 05:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1782477086; bh=tqFkPrKngbGi7F0q/LI40ZThdY9KNHFk+D0fm50gQjw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HVhLEjmND/1ppqrylbSCf40EEwgAUbq5bha46ZrHXo88poshwImABCbxO9rYR9eu/ YnAwzhsKmnpUI4/jHaBBTiRi6FRGkjIfvgb0O/CdDl5OI5ljJvMs0S9x56bw3RU1H5 Cgx9DuIB4SiJIaJJuQFAr3kCmt51EDfErGH0kZ2w= Date: Fri, 26 Jun 2026 13:31:22 +0100 From: Catalin Marinas To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, Will Deacon , Ryan Roberts , David Hildenbrand , linux-kernel@vger.kernel.org, Ben Hutchings Subject: Re: [PATCH] arm64/mm: Optimize TLB flush in unmap_hotplug_[pmd|pud]_range() Message-ID: References: <20260626012845.475959-1-anshuman.khandual@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260626012845.475959-1-anshuman.khandual@arm.com> On Fri, Jun 26, 2026 at 02:28:45AM +0100, Anshuman Khandual wrote: > flush_tlb_kernel_range() could flush down an entire block mapping just with > a single PAGE_SIZE stride. This capability was being used umapping PMD and > PUD based block mappings in unmap_hotplug_[pmd|pud]_range(). > > But later on the commit 48478b9f7913 > ("arm64/mm: Enable batched TLB flush in unmap_hotplug_range()") replaced > this PAGE_SIZE stride with [PMD|PUD]_SIZE strides, hence forcing multiple > PAGE_SIZE stride based TLB flushes on platforms where TLB range operation > is not supported. Revert back to the earlier TLB behaviour along with the > required comments that were dropped earlier. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Ryan Roberts > Cc: David Hildenbrand > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Reported-by: Ben Hutchings > Closes: https://lore.kernel.org/all/b0d5836032ce3135bfc473f6bff791306d086925.camel@decadent.org.uk/ > Fixes: 48478b9f7913 ("arm64/mm: Enable batched TLB flush in unmap_hotplug_range()") > Signed-off-by: Anshuman Khandual Reviewed-by: Catalin Marinas