From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: intel-xe@lists.freedesktop.org,
"Andrew Morton" <akpm@linux-foundation.org>,
"Simona Vetter" <simona.vetter@ffwll.ch>,
"Dave Airlie" <airlied@gmail.com>,
"Alistair Popple" <apopple@nvidia.com>,
dri-devel@lists.freedesktop.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
"Matthew Brost" <matthew.brost@intel.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 1/6] mm/mmu_notifier: Allow two-pass struct mmu_interval_notifiers
Date: Tue, 9 Sep 2025 21:20:58 +0200 [thread overview]
Message-ID: <823c4b68-64ab-4e0f-bb6b-e8d52586e7f1@linux.intel.com> (raw)
In-Reply-To: <20250909171831.GC882933@ziepe.ca>
Hi, Jason
On 9/9/25 19:18, Jason Gunthorpe wrote:
> On Thu, Aug 21, 2025 at 01:46:21PM +0200, Thomas Hellström wrote:
>> +struct mmu_interval_notifier_finish {
>> + struct list_head link;
>> + /**
>> + * @finish: Driver callback for the finish pass.
>> + * @final: Pointer to the mmu_interval_notifier_finish structure.
>> + * @range: The mmu_notifier_range.
>> + * @cur_seq: The current sequence set by the first pass.
>> + *
>> + * Note that there is no error reporting for additional passes.
>> + */
>> + void (*finish)(struct mmu_interval_notifier_finish *final,
>> + const struct mmu_notifier_range *range,
>> + unsigned long cur_seq);
> I would rather this be in mmu_interval_notifier_ops
Thanks for reviewing.
We could have the struct mmu_interval_notifier_finish have a pointer to
mmu_interval_notifier_ops or even to
mmu_interval_notifier. Now that you mention it IIRC Linus has pointed
out that he strongly prefer function pointers in const ops wherever
possible. Would like to keep the linked list, though, as we've discussed
before, for passing of state and to avoid a second interval tree traversal.
Thanks,
Thomas
> though I guess I
> see why it was done like this, I don't think it is a great idea for
> DRM to wrapper the notifier library with yet another library :\
>
> Regardless
>
> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
>
> Jason
next prev parent reply other threads:[~2025-09-09 19:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 11:46 [PATCH 0/6] Two-pass MMU interval notifiers Thomas Hellström
2025-08-21 11:46 ` [PATCH 1/6] mm/mmu_notifier: Allow two-pass struct mmu_interval_notifiers Thomas Hellström
2025-09-03 12:56 ` Thomas Hellström
2025-09-09 17:18 ` Jason Gunthorpe
2025-09-09 19:20 ` Thomas Hellström [this message]
2025-08-21 11:46 ` [PATCH 2/6] drm/gpusvm, drm/xe: Update GPU SVM / Xe to twopass MMU notifier Thomas Hellström
2025-08-21 11:46 ` [PATCH 3/6] drm/gpusvm: Add drm_gpusvm_in_notifier_* helpers Thomas Hellström
2025-08-21 11:46 ` [PATCH 4/6] drm/xe: Skip waiting on unarmed fences in xe_gt_tlb_invalidation_fence_wait Thomas Hellström
2025-08-21 11:46 ` [PATCH 5/6] drm/xe: Add fences argument to xe_vm_range_tilemask_tlb_invalidation Thomas Hellström
2025-08-21 11:46 ` [PATCH 6/6] drm/xe: Implement two pass MMU notifiers for SVM Thomas Hellström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=823c4b68-64ab-4e0f-bb6b-e8d52586e7f1@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=matthew.brost@intel.com \
--cc=simona.vetter@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox