On 2024/8/16 18:03, David Hildenbrand wrote:
(b) if we didn't have to drop the PTL, we can remove the page table
without even re-verifying whether the entries are pte_none(). We
If we want to remove the PTE page, we must hold the pmd lock (for
clearing pmd entry). To prevent ABBA deadlock, we must first release the
pte lock and then re-acquire the pmd lock + pte lock. Right? If so, then
rechecking pte_none() is unavoidable. Unless we hold the pmd lock + pte
lock in advance to execute the original code loop.
Try-locking the PMD should work, and succeed in many cases, right? And
if that fails, we could fallback to what you describe.
Ah, right, I got it! Will try to do it in the next version.
Thanks,
Qi