Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

From: Thomas Gleixner
Date: Wed Feb 21 2018 - 03:35:08 EST


On Tue, 20 Feb 2018, Mike Kravetz wrote:
> On 02/20/2018 03:21 PM, Thomas Gleixner wrote:
> > The other problem is that we'd need to have MAP_CONTIG first so you
> > actually can allocate physically contigous memory from user space. Mike is
> > working on that, but it's not available today. The only way to do so today
> > (with lots of waste) would be MAP_HUGETLB, which might be an acceptable
> > constraint up to the point where MAP_CONTIG is available.
>
> Just to clarify, there is not any activity on exposing a general purpose
> MAP_CONTIG interface to user space. When initially proposed, MAP_CONTIG
> was shot down and the suggestion was to create a new in kernel interface
> to make allocation of contiguous pages easier. The initial use case was
> a driver which could use the new internal interface as part of it's
> mmap() routine to give contiguous regions to user space.

Thanks for the clarification.

> Reinette is using this new interface, but that must be for the ?immediate
> allocation? case you are trying to move away from. Sorry, I have not been
> following development of this feature.
>
> If you would have to create a device to accept a user buffer, could you
> perhaps use the same device to create/hand out a contiguous mapping?

Yes, that's straight forward.

Thanks,

tglx