linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Christopher Lameter <cl@linux.com>
Cc: Guy Shattah <sguy@mellanox.com>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	"Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Anshuman Khandual <khandual@linux.vnet.ibm.com>,
	Laura Abbott <labbott@redhat.com>,
	Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [RFC PATCH 3/3] mm/map_contig: Add mmap(MAP_CONTIG) support
Date: Mon, 16 Oct 2017 19:42:29 +0200	[thread overview]
Message-ID: <20171016174229.pz3o4uhzz3qbrp6n@dhcp22.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.20.1710161058470.12436@nuc-kabylake>

On Mon 16-10-17 11:00:19, Cristopher Lameter wrote:
> On Mon, 16 Oct 2017, Michal Hocko wrote:
> 
> > But putting that aside. Pinning a lot of memory might cause many
> > performance issues and misbehavior. There are still kernel users
> > who need high order memory to work properly. On top of that you are
> > basically allowing an untrusted user to deplete higher order pages very
> > easily unless there is a clever way to enforce per user limit on this.
> 
> We already have that issue and have ways to control that by tracking
> pinned and mlocked pages as well as limits on their allocations.

Ohh, it is very different because mlock limit is really small (64kB)
which is not even close to what this is supposed to be about. Moreover
mlock doesn't prevent from migration and so it doesn't prevent
compaction to form higher order allocations.

Really, this is just too dangerous without a deep consideration of all
the potential consequences. The more I am thinking about this the more I
am convinced that this all should be driver specific mmap based thing.
If it turns out to be too restrictive over time and there are more
experiences about the usage we can consider thinking about a more
generic API. But starting from the generic MAP_ flag is just asking for
problems.

> > That being said, the list is far from being complete, I am pretty sure
> > more would pop out if I thought more thoroughly. The bottom line is that
> > while I see many problems to actually implement this feature and
> > maintain it longterm I simply do not see a large benefit outside of a
> > very specific HW.
> 
> There is not much new here in terms of problems. The hardware that
> needs this seems to become more and more plentiful. That is why we need a
> generic implementation.

It would really help to name that HW and other potential usecases
independent on the HW because I am rather skeptical about the
_plentiful_ part. And so I really do not see any foundation to claim
the generic part. Because, fundamentally, it is the HW which requires
the specific memory placement/physically contiguous range etc. So the
generic implementation doesn't really make sense in such a context.

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-10-16 17:42 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 23:56 [RFC] mmap(MAP_CONTIG) Mike Kravetz
2017-10-04 11:54 ` Michal Nazarewicz
2017-10-04 17:08   ` Mike Kravetz
2017-10-04 21:29     ` Laura Abbott
2017-10-04 13:49 ` Anshuman Khandual
2017-10-04 16:05   ` Christopher Lameter
2017-10-04 17:38     ` Mike Kravetz
2017-10-04 17:35   ` Mike Kravetz
2017-10-05  7:06 ` Vlastimil Babka
2017-10-05  8:58   ` Guy Shattah
2017-10-05 12:36     ` Guy Shattah
2017-10-05 14:30   ` Christopher Lameter
2017-10-12  1:46 ` [RFC PATCH 0/3] Add mmap(MAP_CONTIG) support Mike Kravetz
2017-10-12  1:46   ` [RFC PATCH 1/3] mm/map_contig: Add VM_CONTIG flag to vma struct Mike Kravetz
2017-10-12  1:46   ` [RFC PATCH 2/3] mm/map_contig: Use pre-allocated pages for VM_CONTIG mappings Mike Kravetz
2017-10-12 11:04     ` Anshuman Khandual
2017-10-12  1:46   ` [RFC PATCH 3/3] mm/map_contig: Add mmap(MAP_CONTIG) support Mike Kravetz
2017-10-12 11:22     ` Anshuman Khandual
2017-10-13 15:14       ` Christopher Lameter
2017-10-12 14:37     ` Michal Hocko
2017-10-12 17:19       ` Mike Kravetz
2017-10-13  8:40         ` Michal Hocko
2017-10-13 15:20           ` Christopher Lameter
2017-10-13 15:28             ` Michal Hocko
2017-10-13 15:42               ` Christopher Lameter
2017-10-13 15:47                 ` Michal Hocko
     [not found]                   ` <20171013154747.2jv7rtfqyyagiodn-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-10-13 15:56                     ` Christopher Lameter
2017-10-13 16:17                       ` Michal Hocko
2017-10-15  7:50                         ` Guy Shattah
2017-10-16  8:24                           ` Michal Hocko
2017-10-16  9:11                             ` Guy Shattah
2017-10-16 12:32                               ` Michal Hocko
     [not found]                                 ` <20171016123248.csntl6luxgafst6q-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-10-16 16:00                                   ` Christopher Lameter
2017-10-16 17:42                                     ` Michal Hocko [this message]
     [not found]                                       ` <20171016174229.pz3o4uhzz3qbrp6n-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-10-16 17:56                                         ` Christopher Lameter
2017-10-16 18:17                                           ` Michal Hocko
2017-10-23 15:25                                       ` David Nellans
2017-10-17 10:50                                 ` Guy Shattah
2017-10-17 10:59                                   ` Michal Hocko
2017-10-17 13:22                                   ` Michal Nazarewicz
2017-10-17 14:20                                     ` Guy Shattah
2017-10-17 17:44                                       ` Vlastimil Babka
2017-10-17 18:23                                       ` Mike Kravetz
2017-10-17 19:56                                         ` Vlastimil Babka
2017-10-16 10:33                           ` Michal Nazarewicz
2017-10-16 11:09                             ` Guy Shattah
2017-10-16 17:43                           ` Mike Kravetz
2017-10-16 18:07                             ` Michal Hocko
2017-10-16 20:32                               ` Mike Kravetz
2017-10-16 20:58                                 ` Michal Hocko
2017-10-16 21:03                                 ` Laura Abbott
2017-10-16 21:18                                   ` Mike Kravetz
2017-10-17  6:59                                 ` Vlastimil Babka
2017-10-15  6:58                   ` Pavel Machek
2017-10-16  8:18                     ` Michal Hocko
2017-10-16  9:54                       ` Pavel Machek
2017-10-16 12:18                         ` Michal Hocko
     [not found]                           ` <20171016121808.m4sq3g5nxeyxoymc-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-10-16 16:02                             ` Christopher Lameter
2017-10-16 17:33                               ` Michal Hocko
2017-10-16 17:53                                 ` Christopher Lameter
2017-10-15  8:07     ` Guy Shattah
2017-10-12 10:36   ` [RFC PATCH 0/3] " Anshuman Khandual
2017-10-12 14:25     ` Anshuman Khandual
2017-10-23 22:10 ` [RFC] mmap(MAP_CONTIG) Dave Hansen
2017-10-24 22:49   ` Mike Kravetz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171016174229.pz3o4uhzz3qbrp6n@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=labbott@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mike.kravetz@oracle.com \
    --cc=mina86@mina86.com \
    --cc=sguy@mellanox.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox