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 1A586285CAE for ; Thu, 28 May 2026 14:49:53 +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=1779979795; cv=none; b=HKryt0/JM2HDr3MWWzfK+08adKnHCqLJIRmv9ZUGUw2YZyQwQKmT2NwsZ18duE3n1Jx5AA2VkurMRuCZjln8Xh6sXzPEH/EquwDjdk8/4XbC47/5JJpb933ZmElRXsDEwNjMF+gQDQXVwD5Og0XfMA5plH7GKKrrsU0eQ4e4K7o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779979795; c=relaxed/simple; bh=OJJDUnp5ZGB7eJaK4RkkHVn9Y/x9ALExenskQ8NFqfM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Bv4dMWE2RxJSvHpOP3GHshWuudTpVadHH12XjnKE5ux+aKUyykwNH8xBu0Wo/kehnvr+5dlJMACoFGDRLqazEpwsxq939ZxdRz6iWhxc9XSQy5w6j3f2zL9PwH1lO8Ru7mrxB2i5WdB9+2xFVuRE7/BTJyuUapSdXr/EcvQqHf0= 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=Mo+dnrqq; 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="Mo+dnrqq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1779979785; bh=OJJDUnp5ZGB7eJaK4RkkHVn9Y/x9ALExenskQ8NFqfM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Mo+dnrqqUUFz/YGaeU2EszgpBAzMxuKVzixWZiMCnvUiyru44zcEVX+TBd3Cu9s7c Ha3xZrrXhBYPE/iq+rgV0hIA+u8bR0t8CmgObeSAhrkKnlvG6XXfCA4ro028KeHXrz 0b32BL0Ng0x/s1b0mb2qpEjr/aTE3alyUMw1M+tpPz28uR2M+mHj1c0YTpcqotr5Ph rdd/FZ4HEOFIep6Sdv3qhyB4RHyfn7HsBa6d5h7fIY5xXzKXkGikDPPW0omYhvCZdr GOWmVvCAoYXP+LaYW51Oiw7jkr1e9hS1pEYd4XnI1xTVrWx5J33kM4dzsJP3xSxLky ePygssAo1fKRA== Received: from fedora (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 46BD117E0191; Thu, 28 May 2026 16:49:45 +0200 (CEST) Date: Thu, 28 May 2026 16:49:41 +0200 From: Boris Brezillon To: Nicolas Frattaroli Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Steven Price , Liviu Dudau , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCH v5 1/2] drm/panthor: Implement evicted status for GEM objects Message-ID: <20260528164941.35e36a4a@fedora> In-Reply-To: References: <20260521-panthor-bo-reclaim-observability-v5-0-49313994da55@collabora.com> <20260521-panthor-bo-reclaim-observability-v5-1-49313994da55@collabora.com> 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 Thu, 21 May 2026 16:44:14 +0200 Nicolas Frattaroli wrote: > On Thursday, 21 May 2026 15:51:15 Central European Summer Time Nicolas Frattaroli wrote: > > For fdinfo to be able to fill its evicted counter with data, panthor > > needs to keep track of whether a GEM object has ever been reclaimed. > > Just checking whether the pages are resident isn't enough, as newly > > allocated objects also won't be resident. > > > > Do this with a new atomic_t member on panthor_gem_object. It's increased > > when an object gets evicted by the shrinker, and saturates at INT_MAX. > > This means that once an object has been evicted at least once, its > > reclaim counter will never return to 0. > > > > Due to this, it's possible to distinguish evicted non-resident pages > > from newly allocated non-resident pages by checking whether > > reclaimed_count is != 0 > > > > Use this new member to then set the appropriate DRM_GEM_OBJECT_EVICTED > > status flag for fdinfo. > > > > Oops, feel free to drop this paragraph in the commit message when > applying. > > Queued to drm-misc-next with this paragraph removed. Thanks, Boris