Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

From: Raj, Ashok
Date: Thu Dec 14 2017 - 15:23:38 EST


Hi Bob

On Thu, Dec 14, 2017 at 02:07:38PM +0800, Bob Liu wrote:
> On 2017/12/14 11:38, Lu Baolu wrote:

> >>>> We already have an existing MMU notifiers for userspace updates,
> >>>> however we lack the same thing for kernel page table updates. To
> >> Sorry, I didn't get which situation need this notification.
> >> Could you please describe the full scenario?
> >
> > Okay.
> >
> > 1. When an SVM capable driver calls intel_svm_bind_mm() with
> > SVM_FLAG_SUPERVISOR_MODE set in the @flags, the kernel
> > memory page mappings will be shared between CPUs and
> > the DMA remapping agent (a.k.a. IOMMU). The page table
> > entries will also be cached in both IOTLB (located in IOMMU)
> > and the DEVTLB (located in device).
> >
>
> But who/what kind of real device has the requirement to access a kernel VA?
> Looks like SVM_FLAG_SUPERVISOR_MODE is used by nobody?

That's right, there is no inkernel user at the moment, but we certainly see
them coming.

Maybe not the best example :-), but I'm told Lustre and some of the
modern NIC's also can benefit from SVM in kernel use.

Not a hypothetical use case certainly!


Cheers,
Ashok