On Thu, Jan 16, 2020 at 12:16:30PM -0800, Ralph Campbell wrote:
Can you point me to the latest ODP code? Seems like my understanding is quite off.
https://elixir.bootlin.com/linux/v5.5-rc6/source/drivers/infiniband/hw/mlx5/...
Look for the word 'implicit'
mlx5_ib_invalidate_range() releases the interval_notifier when there are no populated shadow PTEs in its leaf
pagefault_implicit_mr() creates an interval_notifier that covers the level in the page table that needs population. Notice it just uses an unlocked xa_load to find the page table level.
The locking is pretty tricky as it relies on RCU, but the fault flow is fairly lightweight.
Jason