From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Eric B Munson <emunson@akamai.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.cz>, Vlastimil Babka <vbabka@suse.cz>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Chris Metcalf <cmetcalf@ezchip.com>,
Guenter Roeck <linux@roeck-us.net>,
linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mips@linux-mips.org, linux-parisc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org,
linux-xtensa@linux-xtensa.org, linux-mm@kvack.org,
linux-arch@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [PATCH V4 5/6] mm: mmap: Add mmap flag to request VM_LOCKONFAULT
Date: Wed, 22 Jul 2015 18:45:29 +0300 [thread overview]
Message-ID: <20150722154529.GA9107@node.dhcp.inet.fi> (raw)
In-Reply-To: <20150722143220.GB3203@akamai.com>
On Wed, Jul 22, 2015 at 10:32:20AM -0400, Eric B Munson wrote:
> On Wed, 22 Jul 2015, Kirill A. Shutemov wrote:
>
> > On Tue, Jul 21, 2015 at 03:59:40PM -0400, Eric B Munson wrote:
> > > The cost of faulting in all memory to be locked can be very high when
> > > working with large mappings. If only portions of the mapping will be
> > > used this can incur a high penalty for locking.
> > >
> > > Now that we have the new VMA flag for the locked but not present state,
> > > expose it as an mmap option like MAP_LOCKED -> VM_LOCKED.
> >
> > What is advantage over mmap() + mlock(MLOCK_ONFAULT)?
>
> There isn't one, it was added to maintain parity with the
> mlock(MLOCK_LOCK) -> mmap(MAP_LOCKED) set. I think not having will lead
> to confusion because we have MAP_LOCKED so why don't we support
> LOCKONFAULT from mmap as well.
I don't think it's ia good idea to spend bits in flags unless we have a
reason for that.
BTW, you have typo on sparc: s/0x8000/0x80000/.
--
Kirill A. Shutemov
WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Eric B Munson <emunson@akamai.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.cz>, Vlastimil Babka <vbabka@suse.cz>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Chris Metcalf <cmetcalf@ezchip.com>,
Guenter Roeck <linux@roeck-us.net>,
linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mips@linux-mips.org, linux-parisc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org,
linux-xtensa@linux-xtensa.org, linux-mm@kvack.org,
linux-arch@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [PATCH V4 5/6] mm: mmap: Add mmap flag to request VM_LOCKONFAULT
Date: Wed, 22 Jul 2015 15:45:29 +0000 [thread overview]
Message-ID: <20150722154529.GA9107@node.dhcp.inet.fi> (raw)
In-Reply-To: <20150722143220.GB3203@akamai.com>
On Wed, Jul 22, 2015 at 10:32:20AM -0400, Eric B Munson wrote:
> On Wed, 22 Jul 2015, Kirill A. Shutemov wrote:
>
> > On Tue, Jul 21, 2015 at 03:59:40PM -0400, Eric B Munson wrote:
> > > The cost of faulting in all memory to be locked can be very high when
> > > working with large mappings. If only portions of the mapping will be
> > > used this can incur a high penalty for locking.
> > >
> > > Now that we have the new VMA flag for the locked but not present state,
> > > expose it as an mmap option like MAP_LOCKED -> VM_LOCKED.
> >
> > What is advantage over mmap() + mlock(MLOCK_ONFAULT)?
>
> There isn't one, it was added to maintain parity with the
> mlock(MLOCK_LOCK) -> mmap(MAP_LOCKED) set. I think not having will lead
> to confusion because we have MAP_LOCKED so why don't we support
> LOCKONFAULT from mmap as well.
I don't think it's ia good idea to spend bits in flags unless we have a
reason for that.
BTW, you have typo on sparc: s/0x8000/0x80000/.
--
Kirill A. Shutemov
WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Eric B Munson <emunson@akamai.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.cz>, Vlastimil Babka <vbabka@suse.cz>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Chris Metcalf <cmetcalf@ezchip.com>,
Guenter Roeck <linux@roeck-us.net>,
linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mips@linux-mips.org, linux-parisc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org,
linux-xtensa@linux-xtensa.org, linux-mm@kvack.org,
linux-arch@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [PATCH V4 5/6] mm: mmap: Add mmap flag to request VM_LOCKONFAULT
Date: Wed, 22 Jul 2015 18:45:29 +0300 [thread overview]
Message-ID: <20150722154529.GA9107@node.dhcp.inet.fi> (raw)
In-Reply-To: <20150722143220.GB3203@akamai.com>
On Wed, Jul 22, 2015 at 10:32:20AM -0400, Eric B Munson wrote:
> On Wed, 22 Jul 2015, Kirill A. Shutemov wrote:
>
> > On Tue, Jul 21, 2015 at 03:59:40PM -0400, Eric B Munson wrote:
> > > The cost of faulting in all memory to be locked can be very high when
> > > working with large mappings. If only portions of the mapping will be
> > > used this can incur a high penalty for locking.
> > >
> > > Now that we have the new VMA flag for the locked but not present state,
> > > expose it as an mmap option like MAP_LOCKED -> VM_LOCKED.
> >
> > What is advantage over mmap() + mlock(MLOCK_ONFAULT)?
>
> There isn't one, it was added to maintain parity with the
> mlock(MLOCK_LOCK) -> mmap(MAP_LOCKED) set. I think not having will lead
> to confusion because we have MAP_LOCKED so why don't we support
> LOCKONFAULT from mmap as well.
I don't think it's ia good idea to spend bits in flags unless we have a
reason for that.
BTW, you have typo on sparc: s/0x8000/0x80000/.
--
Kirill A. Shutemov
--
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>
next prev parent reply other threads:[~2015-07-22 15:45 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 19:59 [PATCH V4 0/6] Allow user to request memory to be locked on page fault Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-21 19:59 ` [PATCH V4 1/6] mm: mlock: Refactor mlock, munlock, and munlockall code Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-22 10:42 ` Kirill A. Shutemov
2015-07-22 10:42 ` Kirill A. Shutemov
2015-07-22 14:04 ` Eric B Munson
2015-07-21 19:59 ` [PATCH V4 2/6] mm: mlock: Add new mlock, munlock, and munlockall system calls Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-21 20:44 ` Andrew Morton
2015-07-21 20:44 ` Andrew Morton
2015-07-21 20:44 ` Andrew Morton
2015-07-21 20:44 ` Andrew Morton
2015-07-22 1:25 ` Michael Ellerman
2015-07-22 1:25 ` Michael Ellerman
2015-07-22 1:25 ` Michael Ellerman
2015-07-22 1:25 ` Michael Ellerman
2015-07-22 14:15 ` Eric B Munson
2015-07-22 14:15 ` Eric B Munson
2015-07-22 14:15 ` Eric B Munson
2015-07-23 6:58 ` Ralf Baechle
2015-07-23 6:58 ` Ralf Baechle
2015-07-23 6:58 ` Ralf Baechle
2015-07-23 6:58 ` Ralf Baechle
2015-07-23 6:58 ` Ralf Baechle
2015-07-23 6:58 ` Ralf Baechle
2015-07-24 14:39 ` Eric B Munson
2015-07-24 14:39 ` Eric B Munson
2015-07-24 14:39 ` Eric B Munson
2015-07-24 14:39 ` Eric B Munson
[not found] ` <20150724143936.GE9203-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
2015-07-24 15:46 ` Guenter Roeck
2015-07-24 15:46 ` Guenter Roeck
2015-07-24 15:46 ` Guenter Roeck
2015-07-24 15:46 ` Guenter Roeck
2015-07-24 15:46 ` Guenter Roeck
2015-07-24 15:53 ` Eric B Munson
2015-07-24 15:53 ` Eric B Munson
2015-07-24 15:53 ` Eric B Munson
2015-07-24 15:53 ` Eric B Munson
2015-07-22 9:16 ` Vlastimil Babka
2015-07-22 9:16 ` Vlastimil Babka
2015-07-22 9:16 ` Vlastimil Babka
2015-07-22 9:16 ` Vlastimil Babka
2015-07-22 9:16 ` Vlastimil Babka
2015-07-22 14:05 ` Eric B Munson
2015-07-22 14:05 ` Eric B Munson
2015-07-22 14:05 ` Eric B Munson
2015-07-22 14:05 ` Eric B Munson
2015-07-22 14:05 ` Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-21 19:59 ` [PATCH V4 3/6] mm: gup: Add mm_lock_present() Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-22 11:13 ` Kirill A. Shutemov
2015-07-22 11:13 ` Kirill A. Shutemov
2015-07-22 14:11 ` Eric B Munson
2015-07-21 19:59 ` [PATCH V4 4/6] mm: mlock: Introduce VM_LOCKONFAULT and add mlock flags to enable it Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-22 10:03 ` Vlastimil Babka
2015-07-22 10:03 ` Vlastimil Babka
2015-07-22 10:03 ` Vlastimil Babka
2015-07-22 18:43 ` Eric B Munson
2015-07-22 18:43 ` Eric B Munson
2015-07-23 10:03 ` Vlastimil Babka
2015-07-23 10:03 ` Vlastimil Babka
2015-07-23 10:03 ` Vlastimil Babka
2015-07-23 15:21 ` Eric B Munson
2015-07-23 15:21 ` Eric B Munson
2015-07-21 19:59 ` [PATCH V4 5/6] mm: mmap: Add mmap flag to request VM_LOCKONFAULT Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-21 19:59 ` Eric B Munson
2015-07-22 11:25 ` Kirill A. Shutemov
2015-07-22 11:25 ` Kirill A. Shutemov
2015-07-22 11:25 ` Kirill A. Shutemov
2015-07-22 14:32 ` Eric B Munson
2015-07-22 14:32 ` Eric B Munson
2015-07-22 15:45 ` Kirill A. Shutemov [this message]
2015-07-22 15:45 ` Kirill A. Shutemov
2015-07-22 15:45 ` Kirill A. Shutemov
2015-07-21 19:59 ` [PATCH V4 6/6] selftests: vm: Add tests for lock on fault Eric B Munson
2015-07-21 19:59 ` Eric B Munson
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=20150722154529.GA9107@node.dhcp.inet.fi \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=cmetcalf@ezchip.com \
--cc=emunson@akamai.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=linux@roeck-us.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mhocko@suse.cz \
--cc=paul.gortmaker@windriver.com \
--cc=sparclinux@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.