Re: [PATCH 0/2] KVM: do not assume PTE is writable after follow_pfn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 08, 2021 at 02:51:33PM -0400, Jason Gunthorpe wrote:
> On Fri, Feb 05, 2021 at 01:14:11PM -0500, Peter Xu wrote:
> 
> > But I do have a question on why dax as the only user needs to pass in the
> > notifier to follow_pte() for initialization.
> 
> Not sure either, why does DAX opencode something very much like
> page_mkclean() with dax_entry_mkclean()?
> 
> Also it looks like DAX uses the wrong notifier, it calls
> MMU_NOTIFY_CLEAR but page_mkclean_one() uses
> MMU_NOTIFY_PROTECTION_PAGE for the same PTE modification sequence??
> 
> page_mkclean() has some technique to make the notifier have the right
> size without becoming entangled in the PTL locks..

Right.  I guess it's because dax doesn't have "struct page*" on the back, so it
can't directly use page_mkclean().  However the whole logic does look very
similar, so maybe they can be merged in some way.

Thanks,

-- 
Peter Xu




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux