From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752186AbdLAKMX (ORCPT ); Fri, 1 Dec 2017 05:12:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:46609 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbdLAKMU (ORCPT ); Fri, 1 Dec 2017 05:12:20 -0500 Date: Fri, 1 Dec 2017 11:12:18 +0100 From: Michal Hocko To: Dan Williams Cc: Jason Gunthorpe , Andrew Morton , Linux MM , "linux-kernel@vger.kernel.org" , Christoph Hellwig , "stable@vger.kernel.org" , "linux-nvdimm@lists.01.org" , linux-rdma Subject: Re: [PATCH v3 1/4] mm: introduce get_user_pages_longterm Message-ID: <20171201101218.mxjyv4fc4cjwhf2o@dhcp22.suse.cz> References: <151197872943.26211.6551382719053304996.stgit@dwillia2-desk3.amr.corp.intel.com> <151197873499.26211.11687422577653326365.stgit@dwillia2-desk3.amr.corp.intel.com> <20171130095323.ovrq2nenb6ztiapy@dhcp22.suse.cz> <20171130174201.stbpuye4gu5rxwkm@dhcp22.suse.cz> <20171130181741.2y5nyflyhqxg6y5p@dhcp22.suse.cz> <20171130190117.GF7754@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171130190117.GF7754@ziepe.ca> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. In other words, what does V4L2 does in the same context? Does it account the pinned memory or it allows user to pin arbitrary amount of memory. -- Michal Hocko SUSE Labs