Re: [PATCH v3 1/4] mm: introduce get_user_pages_longterm

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

 



On Fri, Dec 1, 2017 at 8:02 AM, Jason Gunthorpe <jgg@xxxxxxxx> wrote:
>
> On Fri, Dec 01, 2017 at 11:12:18AM +0100, Michal Hocko wrote:
> > On Thu 30-11-17 12:01:17, Jason Gunthorpe wrote:
> > > On Thu, Nov 30, 2017 at 10:32:42AM -0800, Dan Williams wrote:
> > > > > Who and how many LRU pages can pin that way and how do you prevent nasty
> > > > > users to DoS systems this way?
> > > >
> > > > I assume this is something the RDMA community has had to contend with?
> > > > I'm not an RDMA person, I'm just here to fix dax.
> > >
> > > The RDMA implementation respects the mlock rlimit
> >
> > OK, so then I am kind of lost in why do we need a special g-u-p variant.
> > The documentation doesn't say and quite contrary it assumes that the
> > caller knows what he is doing. This cannot be the right approach.
>
> I thought it was because get_user_pages_longterm is supposed to fail
> on DAX mappings?

Correct, the rlimit checks are a separate issue,
get_user_pages_longterm is only there to avoid open coding vma lookup
and vma_is_fsdax() checks in multiple code paths.

> And maybe we should think about moving the rlimit accounting into this
> new function too someday?

DAX pages are not accounted in any rlimit because they are statically
allocated reserved memory regions.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux