From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B75E3A9636 for ; Tue, 23 Jun 2026 20:44:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782247486; cv=none; b=KWTYLucfJLFJuzMU4WCHm3wJdBzYQeUpAQKJDtxh63iXUIRRoCoenYR50M5iZqfk4PUl1UMBA7n/rjmQat6A0YefNEFMm7VhpAl1AJrBC2c8CnILycAakGLQAjQLMPwdTsWbAKEGbVAaUyLIrgNV/UbUt3N3cIVLWMbUwgcAvng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782247486; c=relaxed/simple; bh=Q/GXbcxhxDosqTJ+sCODRYXG+WQ/GMMMUnDuHdmb1hw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tt0yCmVQ8q+9Q20/f5oN8OR0U5gMgzrCOh3kBgp5Dakqb8BvsAFVHv9rBkSwHIazetvuibqmTFXAQup7Fa+GCRHmaaZ9PeUNH9oBDhaNpxm+8Y905fr45AOlR/2dIKEs27LL+qv1c4pbj8kbufXfGDWWnRCbMQP6I29IXvDm90g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=LQb5Q4AX; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="LQb5Q4AX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1782247483; bh=Q/GXbcxhxDosqTJ+sCODRYXG+WQ/GMMMUnDuHdmb1hw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LQb5Q4AX+Rx0nVbM65YeNcgJOpeXXWoHbUaxjJ1K+JuH2i32to1rctjLRaWGJ9zic 5CuoABTSF3pPyL/PMo2DISCM5OGGNu4IvoaroO+9ykKcEZj7l0JyZWlXs8cd+U7NSe sHGCt7SBg+IwhgOZgtXWQhzPJ/Vn/4npXi1uKKXwxjOfGFHnRG2XLlJJ0l1TaRBIuE s8lXOCA1c6a2mA8B+PO0OzRN1h+SnmeO65KAXQs/AE/6PN6LdexMZ6hA70/pnfupus 2ty7jGNL454wtTvSybH//kdwZBrOxiz65IqQSeRI8lfJ8lkVr/NGcpzcQ+8jQy72lf +Smodgac87GqA== Received: from fedora-2.home (unknown [100.64.0.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id 2239117E045E; Tue, 23 Jun 2026 22:44:43 +0200 (CEST) Date: Tue, 23 Jun 2026 22:44:21 +0200 From: Boris Brezillon To: Matthew Wilcox Cc: "Christian A. Ehrhardt" , dri-devel@lists.freedesktop.org, Steven Price , Liviu Dudau , Andrew Morton , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/panthor: Check VMA boundaries for PMD mappings Message-ID: <20260623224421.56dba65d@fedora-2.home> In-Reply-To: <20260623220341.7ad4a0e2@fedora-2.home> References: <20260623181942.1536598-1-lk@c--e.de> <20260623220341.7ad4a0e2@fedora-2.home> Organization: Collabora X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-redhat-linux-gnu) 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-Transfer-Encoding: 7bit On Tue, 23 Jun 2026 22:03:41 +0200 Boris Brezillon wrote: > Anyway, I'll try to get back to this map_pages() implementation, and > see how we can handle the fallback when locks can't be acquired in that > path (I assume this would mean no PMD mapping in the fallback path if > we get rid of huge_fault()). More on that. I had a brief look at map_pages()/fault_around(), and it seems it's only meant to populate PTE entries, not PMDs. Part of the perf boost we were looking for when adding huge_fault() was limiting the number of faults when adjacent pages are touched, but the other part was limiting the page table depth to optimize page-table walks, so if we're implementing map_pages() without huge_fault(), we basically lose the second part of the optimization. I'd need to check how much perf we leave on the table with that.