Re: [PATCH] userfaultfd_zeropage: return -ENOSPC in case mm has gone

2017-07-31 Thread Mike Rapoport
On Mon, Jul 31, 2017 at 02:22:04PM +0200, Michal Hocko wrote: > On Thu 27-07-17 09:26:59, Mike Rapoport wrote: > > In the non-cooperative userfaultfd case, the process exit may race with > > outstanding mcopy_atomic called by the uffd monitor. Returning -ENOSPC > > inste

[PATCH] userfaultfd: non-cooperative: flush event_wqh at release time

2017-07-30 Thread Mike Rapoport
uffd descriptor") Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- fs/userfaultfd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 2d8c2d848668..06ea26b8c996 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -854,6 +854

Re: [PATCH v2 2/2] userfaultfd: selftest: Add tests for UFFD_FEATURE_SIGBUS feature

2017-07-30 Thread Mike Rapoport
On Thu, Jul 27, 2017 at 10:18:40PM -0400, Prakash Sangappa wrote: > This patch adds tests for UFFD_FEATURE_SIGBUS feature. The > tests will verify signal delivery instead of userfault events. > Also, test use of UFFDIO_COPY to allocate memory and retry > accessing monitored area after signal

Re: [PATCH] userfaultfd_zeropage: return -ENOSPC in case mm has gone

2017-08-02 Thread Mike Rapoport
On Mon, Jul 31, 2017 at 03:45:08PM +0200, Michal Hocko wrote: > On Mon 31-07-17 15:32:47, Andrea Arcangeli wrote: > > On Mon, Jul 31, 2017 at 02:22:04PM +0200, Michal Hocko wrote: > > > On Thu 27-07-17 09:26:59, Mike Rapoport wrote: > > > > In the non-cooperative user

Re: [PATCH] userfaultfd_zeropage: return -ENOSPC in case mm has gone

2017-08-03 Thread Mike Rapoport
On Wed, Aug 02, 2017 at 06:40:01PM +0200, Andrea Arcangeli wrote: > On Wed, Aug 02, 2017 at 06:22:49PM +0200, Michal Hocko wrote: > > ESRCH refers to "no such process". Strictly speaking userfaultfd code is > > about a mm which is gone but that is a mere detail. In fact the owner of > > Well this

[PATCH] userfaultfd_zeropage: return -ENOSPC in case mm has gone

2017-07-27 Thread Mike Rapoport
Fixes: 96333187ab162 ("userfaultfd_copy: return -ENOSPC in case mm has gone") Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- Unfortunately, I've overlooked userfaultfd_zeropage when I updated userfaultd_copy :( fs/userfaultfd.c | 2 ++ 1 file changed, 2 insertions(+)

Re: [RESEND PATCH 2/2] userfaultfd: selftest: Add tests for UFFD_FREATURE_SIGBUS

2017-07-26 Thread Mike Rapoport
On Tue, Jul 25, 2017 at 12:47:42AM -0400, Prakash Sangappa wrote: > Signed-off-by: Prakash Sangappa > --- > tools/testing/selftests/vm/userfaultfd.c | 121 > +- > 1 files changed, 118 insertions(+), 3 deletions(-) Please describe the

Re: [RESEND PATCH 1/2] userfaultfd: Add feature to request for a signal delivery

2017-07-26 Thread Mike Rapoport
; leading to this proposal as suggested by Andrea. > > http://www.spinics.net/lists/linux-mm/msg129224.html > > Signed-off-by: Prakash Sangappa <prakash.sanga...@oracle.com> Reviewed-by: Mike Rapoport <r...@linux.vnet.ibm.com> > --- > fs/userfaultfd.c

Re: [RFC PATCH v2] userfaultfd: Add feature to request for a signal delivery

2017-07-04 Thread Mike Rapoport
On Tue, Jun 27, 2017 at 09:08:40AM -0700, Prakash Sangappa wrote: > Applications like the database use hugetlbfs for performance reason. > Files on hugetlbfs filesystem are created and huge pages allocated > using fallocate() API. Pages are deallocated/freed using fallocate() hole > punching

Re: [RFC PATCH v2] userfaultfd: Add feature to request for a signal delivery

2017-07-06 Thread Mike Rapoport
On Wed, Jul 05, 2017 at 05:41:14PM -0700, prakash.sangappa wrote: > > > On 07/04/2017 11:28 AM, Mike Rapoport wrote: > >On Tue, Jun 27, 2017 at 09:08:40AM -0700, Prakash Sangappa wrote: > >>Applications like the database use hugetlbfs for performance reason. > >

Re: [RFC PATCH] userfaultfd: Add feature to request for a signal delivery

2017-06-29 Thread Mike Rapoport
On Wed, Jun 28, 2017 at 11:23:32AM -0700, Prakash Sangappa wrote: > > > On 6/28/17 6:18 AM, Mike Rapoport wrote: > >On Tue, Jun 27, 2017 at 09:01:20AM -0700, Prakash Sangappa wrote: > >>On 6/27/17 8:35 AM, Mike Rapoport wrote: > >> > >>>On Tue, J

Re: [RFC PATCH] userfaultfd: Add feature to request for a signal delivery

2017-06-28 Thread Mike Rapoport
On Tue, Jun 27, 2017 at 09:01:20AM -0700, Prakash Sangappa wrote: > On 6/27/17 8:35 AM, Mike Rapoport wrote: > > >On Tue, Jun 27, 2017 at 09:06:43AM +0200, Michal Hocko wrote: > >>This is an user visible API so let's CC linux-api mailing list. > >> > >>On

Re: [PATCH 0/5] {ioctl_}userfaultfd.2: initial updates for 4.11

2017-04-26 Thread Mike Rapoport
On Wed, Apr 26, 2017 at 09:23:45AM +0200, Michael Kerrisk (man-pages) wrote: > Hello Mike, > > On 04/25/2017 06:29 PM, Mike Rapoport wrote: > > Hello Michael, > > > > These patches are some kind of brief highlights of the changes to the > > userfaultfd pages.

[PATCH man-pages 2/2] ioctl_userfaultfd.2: start adding details about userfaultfd features

2017-04-27 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/ioctl_userfaultfd.2 | 53 ++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index 42bf7a7..cdc07e0 100644 ---

[PATCH man-pages 0/2] some more userfault pages updates

2017-04-27 Thread Mike Rapoport
Hi Michael, Here are some more updates to {ioctl_}userfaultfd.2 pages. Mike Rapoport (2): userfaultfd.2: start documenting non-cooperative events ioctl_userfaultfd.2: start adding details about userfaultfd features man2/ioctl_userfaultfd.2 | 53 ++- man2/userfaultfd.2

[PATCH man-pages 1/2] userfaultfd.2: start documenting non-cooperative events

2017-04-27 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/userfaultfd.2 | 135 ++--- 1 file changed, 128 insertions(+), 7 deletions(-) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index cfea5cb..44af3e4 100644 --- a/man2/userfau

[PATCH 0/5] {ioctl_}userfaultfd.2: initial updates for 4.11

2017-04-25 Thread Mike Rapoport
=5a02026d390ea1bb0c16a0e214e45613a3e3d885 Mike Rapoport (5): userfaultfd.2: describe memory types that can be used from 4.11 ioctl_userfaultfd.2: describe memory types that can be used from 4.11 ioctl_userfaultfd.2: update UFFDIO_API description userfaultfd.2: add Linux container migration use-case

[PATCH 3/5] ioctl_userfaultfd.2: update UFFDIO_API description

2017-04-25 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/ioctl_userfaultfd.2 | 38 -- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index 78abc4d..dade631 100644 ---

[PATCH 1/5] userfaultfd.2: describe memory types that can be used from 4.11

2017-04-25 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/userfaultfd.2 | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index 1603c20..c89484f 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -130,8 +

[PATCH 5/5] usefaultfd.2: add brief description of "non-cooperative" mode

2017-04-25 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/userfaultfd.2 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index dc37319..291dd10 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -89,6 +89,20 @@ them

[PATCH 2/5] ioctl_userfaultfd.2: describe memory types that can be used from 4.11

2017-04-25 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/ioctl_userfaultfd.2 | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index 66fbfdc..78abc4d 100644 --- a/man2/ioctl_userfaultfd.2 +++

[PATCH 4/5] userfaultfd.2: add Linux container migration use-case to NOTES

2017-04-25 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/userfaultfd.2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index c89484f..dc37319 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -279,7 +279,8 @@

Re: Review request: draft ioctl_userfaultfd(2) manual page

2017-04-25 Thread Mike Rapoport
Hello Michael, On Fri, Apr 21, 2017 at 01:41:18PM +0200, Michael Kerrisk (man-pages) wrote: > Hi Mike, > [...] > > > > Yes. > > Just the future is only a week or two from today as we are at 4.11-rc7 :) > > Yes, I understand :-). So of course there's a *lot* more > new stuff to document,

Re: [PATCH] userfaultfd: replace ENOSPC with ESRCH in case mm has gone during copy/zeropage

2017-08-08 Thread Mike Rapoport
(adding Michal) On Mon, Aug 07, 2017 at 04:12:25PM +0300, Mike Rapoport wrote: > When the process exit races with outstanding mcopy_atomic, it would be > better to return ESRCH error. When such race occurs the process and it's mm > are going away and returning "no such proces

Re: [RESEND PATCH v3 2/2] userfaultfd: selftest: Add tests for UFFD_FEATURE_SIGBUS feature

2017-08-01 Thread Mike Rapoport
after signal delivery. > > This patch also fixes a bug in uffd_poll_thread() where 'uffd' > is leaked. > > Signed-off-by: Prakash Sangappa <prakash.sanga...@oracle.com> > --- Reviewed-by: Mike Rapoport <r...@linux.vnet.ibm.com> > Change log > > v3: Elimina

[PATCH] userfaultfd: replace ENOSPC with ESRCH in case mm has gone during copy/zeropage

2017-08-07 Thread Mike Rapoport
@suse.com> Cc: Andrea Arcangeli <aarca...@redhat.com> Cc: "Dr. David Alan Gilbert" <dgilb...@redhat.com> Cc: Pavel Emelyanov <xe...@virtuozzo.com> Cc: Mike Kravetz <mike.krav...@oracle.com> Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- The man-p

[PATCH] exit: don't include unused userfaultfd_k.h

2017-05-16 Thread Mike Rapoport
Commit dd0db88d8094 (userfaultfd: non-cooperative: rollback userfaultfd_exit) removed userfaultfd callback from exit() which makes include of unnecessary. Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- kernel/exit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/ex

[PATCH] userfaultfd: drop dead code

2017-05-16 Thread Mike Rapoport
Calculation of start end end in __wake_userfault function are not used and can be removed. Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- fs/userfaultfd.c | 5 - 1 file changed, 5 deletions(-) diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index f7555fc..1446e9d

[PATCH 7/7] userfaultfd: selftest: enable testing of UFFDIO_ZEROPAGE for shmem

2017-06-20 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- tools/testing/selftests/vm/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c index 1eae79a..b0c9263 100644 --- a

[PATCH 4/7] userfaultfd: mcopy_atomic: introduce mfill_atomic_pte helper

2017-06-20 Thread Mike Rapoport
Shuffle the code a bit to improve readability. Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- mm/userfaultfd.c | 46 ++ 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c index 8

[PATCH 2/7] shmem: introduce shmem_inode_acct_block

2017-06-20 Thread Mike Rapoport
The shmem_acct_block and the update of used_blocks are following one another in all the places they are used. Combine these two into a helper function. Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- mm/shmem.c | 102 --

[PATCH 5/7] userfaultfd: shmem: wire up shmem_mfill_zeropage_pte

2017-06-20 Thread Mike Rapoport
For shmem VMAs we can use shmem_mfill_zeropage_pte for UFFDIO_ZEROPAGE Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- mm/userfaultfd.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c index 48c015c..8119270 100644 --

[PATCH 1/7] shmem: shmem_charge: verify max_block is not exceeded before inode update

2017-06-20 Thread Mike Rapoport
Currently we update inode and shmem_inode_info before verifying that used_blocks will not exceed max_blocks. In case it will, we undo the update. Let's switch the order and move the verification of the blocks count before the inode and shmem_inode_info update. Signed-off-by: Mike Rapoport &l

[PATCH 0/7] userfaultfd: enable zeropage support for shmem

2017-06-20 Thread Mike Rapoport
Hi, These patches enable support for UFFDIO_ZEROPAGE for shared memory. The first two patches are not strictly related to userfaultfd, they are just minor refactoring to reduce amount of code duplication. Mike Rapoport (7): shmem: shmem_charge: verify max_block is not exceeded before inode

[PATCH 6/7] userfaultfd: report UFFDIO_ZEROPAGE as available for shmem VMAs

2017-06-20 Thread Mike Rapoport
Now when shmem VMAs can be filled with zero page via userfaultfd we can report that UFFDIO_ZEROPAGE is available for those VMAs Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- fs/userfaultfd.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --gi

[PATCH 3/7] userfaultfd: shmem: add shmem_mfill_zeropage_pte for userfaultfd support

2017-06-20 Thread Mike Rapoport
shmem_mfill_zeropage_pte is the low level routine that implements the userfaultfd UFFDIO_ZEROPAGE command. Since for shmem mappings zero pages are always allocated and accounted, the new method is a slight extension of the existing shmem_mcopy_atomic_pte. Signed-off-by: Mike Rapoport &l

Re: [RFC PATCH] userfaultfd: Add feature to request for a signal delivery

2017-06-27 Thread Mike Rapoport
On Tue, Jun 27, 2017 at 09:06:43AM +0200, Michal Hocko wrote: > This is an user visible API so let's CC linux-api mailing list. > > On Mon 26-06-17 12:46:13, Prakash Sangappa wrote: > > In some cases, userfaultfd mechanism should just deliver a SIGBUS signal > > to the faulting process, instead

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-22 Thread Mike Rapoport
On Mon, May 22, 2017 at 05:52:47PM +0200, Vlastimil Babka wrote: > On 05/22/2017 04:29 PM, Mike Rapoport wrote: > > On Mon, May 22, 2017 at 03:55:48PM +0200, Michal Hocko wrote: > >> On Mon 22-05-17 16:36:00, Mike Rapoport wrote: > >>> On Mon, May 22, 2017 at 02:42:

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-24 Thread Mike Rapoport
On Wed, May 24, 2017 at 09:58:06AM +0200, Vlastimil Babka wrote: > On 05/24/2017 09:50 AM, Mike Rapoport wrote: > > On Mon, May 22, 2017 at 05:52:47PM +0200, Vlastimil Babka wrote: > >> On 05/22/2017 04:29 PM, Mike Rapoport wrote: > >>> > >>&g

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-24 Thread Mike Rapoport
On Wed, May 24, 2017 at 01:18:00PM +0200, Michal Hocko wrote: > On Wed 24-05-17 13:39:48, Mike Rapoport wrote: > > On Wed, May 24, 2017 at 09:58:06AM +0200, Vlastimil Babka wrote: > > > On 05/24/2017 09:50 AM, Mike Rapoport wrote: > > > > On Mon, May 22, 2017 at 05:

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-24 Thread Mike Rapoport
On Wed, May 24, 2017 at 04:54:38PM +0200, Vlastimil Babka wrote: > On 05/24/2017 04:28 PM, Pavel Emelyanov wrote: > > On 05/24/2017 02:31 PM, Vlastimil Babka wrote: > >> On 05/24/2017 12:39 PM, Mike Rapoport wrote: > >>>> Hm so the prctl does: >

[PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-22 Thread Mike Rapoport
ags and allows managing THP in the region according to system-wide settings. Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- include/uapi/asm-generic/mman-common.h | 3 +++ mm/khugepaged.c| 7 +++ mm/madvise.c | 5 + 3 files ch

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-22 Thread Mike Rapoport
On Mon, May 22, 2017 at 12:56:45PM +0530, Anshuman Khandual wrote: > On 05/22/2017 11:42 AM, Mike Rapoport wrote: > > Currently applications can explicitly enable or disable THP for a memory > > region using MADV_HUGEPAGE or MADV_NOHUGEPAGE. However, once either of > >

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-22 Thread Mike Rapoport
On Mon, May 22, 2017 at 03:55:48PM +0200, Michal Hocko wrote: > On Mon 22-05-17 16:36:00, Mike Rapoport wrote: > > On Mon, May 22, 2017 at 02:42:43PM +0300, Kirill A. Shutemov wrote: > > > On Mon, May 22, 2017 at 09:12:42AM +0300, Mike Rapoport wrote: > > > > Current

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-22 Thread Mike Rapoport
On Mon, May 22, 2017 at 02:42:43PM +0300, Kirill A. Shutemov wrote: > On Mon, May 22, 2017 at 09:12:42AM +0300, Mike Rapoport wrote: > > Currently applications can explicitly enable or disable THP for a memory > > region using MADV_HUGEPAGE or MADV_NOHUGEPAGE. Howev

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-24 Thread Mike Rapoport
On Mon, May 22, 2017 at 05:52:47PM +0200, Vlastimil Babka wrote: > On 05/22/2017 04:29 PM, Mike Rapoport wrote: > > On Mon, May 22, 2017 at 03:55:48PM +0200, Michal Hocko wrote: > >> On Mon 22-05-17 16:36:00, Mike Rapoport wrote: > >>> On Mon, May 22, 2017 at 02:42:

[PATCH v2] mm: introduce MADV_RESET_HUGEPAGE

2017-05-28 Thread Mike Rapoport
ags and allows managing THP in the region according to system-wide settings. Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> Acked-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com> --- v2 changes: * Use _RESET_ instead of _CLR_ as per Kirill's suggestion * Fix build on

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-30 Thread Mike Rapoport
On Tue, May 30, 2017 at 09:44:08AM +0200, Michal Hocko wrote: > On Wed 24-05-17 17:27:36, Mike Rapoport wrote: > > On Wed, May 24, 2017 at 01:18:00PM +0200, Michal Hocko wrote: > [...] > > > Why cannot khugepaged simply skip over all VMAs which have userfault > > >

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-31 Thread Mike Rapoport
On Wed, May 31, 2017 at 10:24:14AM +0200, Michal Hocko wrote: > On Wed 31-05-17 08:30:08, Vlastimil Babka wrote: > > On 05/30/2017 06:06 PM, Andrea Arcangeli wrote: > > > > > > I'm not sure if it should be considered a bug, the prctl is intended > > > to use normally by wrappers so it looks

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-05-31 Thread Mike Rapoport
On Tue, May 30, 2017 at 12:39:30PM +0200, Michal Hocko wrote: > On Tue 30-05-17 13:19:22, Mike Rapoport wrote: > > > > But then we'll have to populate these regions with > > > > UFFDIO_COPY which adds quite an overhead. > > > > > > How big is

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-06-02 Thread Mike Rapoport
On Thu, Jun 01, 2017 at 03:45:22PM +0200, Andrea Arcangeli wrote: > On Thu, Jun 01, 2017 at 10:09:09AM +0200, Michal Hocko wrote: > > That is a bit surprising. I didn't think that the userfault syscall > > (ioctl) can be faster than a regular #PF but considering that > > __mcopy_atomic bypasses

[PATCH] mm: make PR_SET_THP_DISABLE immediately active

2017-06-02 Thread Mike Rapoport
f-by: Michal Hocko <mho...@suse.com> Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- include/linux/huge_mm.h| 1 + include/linux/khugepaged.h | 3 ++- include/linux/sched/coredump.h | 5 - kernel/sys.c | 6 +++--- mm/khugepaged.c| 3 ++-

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-06-01 Thread Mike Rapoport
On Wed, May 31, 2017 at 04:18:09PM +0200, Andrea Arcangeli wrote: > On Wed, May 31, 2017 at 03:39:22PM +0300, Mike Rapoport wrote: > > For the CRIU usecase, disabling THP for a while and re-enabling it > > back will do the trick, provided VMAs flags are not affected, like > >

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-06-01 Thread Mike Rapoport
On Tue, May 30, 2017 at 04:39:41PM +0200, Michal Hocko wrote: > On Tue 30-05-17 16:04:56, Andrea Arcangeli wrote: > > > > UFFDIO_COPY while not being a major slowdown for sure, it's likely > > measurable at the microbenchmark level because it would add a > > enter/exit kernel to every 4k memcpy.

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-06-01 Thread Mike Rapoport
On Thu, Jun 01, 2017 at 10:09:09AM +0200, Michal Hocko wrote: > On Thu 01-06-17 09:53:02, Mike Rapoport wrote: > > On Tue, May 30, 2017 at 04:39:41PM +0200, Michal Hocko wrote: > > > On Tue 30-05-17 16:04:56, Andrea Arcangeli wrote: > > > > > > > > UF

Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

2017-06-01 Thread Mike Rapoport
On Wed, May 31, 2017 at 10:24:14AM +0200, Michal Hocko wrote: > On Wed 31-05-17 08:30:08, Vlastimil Babka wrote: > > On 05/30/2017 06:06 PM, Andrea Arcangeli wrote: > > > > > > I'm not sure if it should be considered a bug, the prctl is intended > > > to use normally by wrappers so it looks

Re: [PATCH] mm: make PR_SET_THP_DISABLE immediately active

2017-06-05 Thread Mike Rapoport
On Sat, Jun 03, 2017 at 01:34:52PM +0300, Mike Rapoprt wrote: > > > On June 2, 2017 11:55:12 PM GMT+03:00, Vlastimil Babka wrote: > >On 06/02/2017 10:40 PM, Andrew Morton wrote: > >> On Fri, 2 Jun 2017 22:31:47 +0200 Vlastimil Babka > >wrote: > Perhaps we

[PATCH man-pages 4/5] userfaultfd.2: add note about asynchronios events delivery

2017-04-30 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/userfaultfd.2 | 12 1 file changed, 12 insertions(+) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index 8b89162..f177bba 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -112,6 +112,18 @@ c

[PATCH man-pages 1/5] ioctl_userfaultfd.2: update description of shared memory areas

2017-04-30 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/ioctl_userfaultfd.2 | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index 889feb9..6edd396 100644 --- a/man2/ioctl_userfaultfd.2 +++

[PATCH man-pages 3/5] ioctl_userfaultfd.2: add BUGS section

2017-04-30 Thread Mike Rapoport
The features handshake is not quite convenient. Elaborate about it in the BUGS section. Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/ioctl_userfaultfd.2 | 9 + 1 file changed, 9 insertions(+) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2

[PATCH man-pages 5/5] userfaultfd.2: update VERSIONS section with 4.11 chanegs

2017-04-30 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/userfaultfd.2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index f177bba..07a69f1 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -404,6 +404,9 @@ Insufficient

[PATCH man-pages 2/5] ioctl_userfaultfd.2: UFFDIO_COPY: add ENOENT and ENOSPC description

2017-04-30 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/ioctl_userfaultfd.2 | 13 + 1 file changed, 13 insertions(+) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index 6edd396..e12b9de 100644 --- a/man2/ioctl_userfaultfd.2 +++ b/man2/ioctl_userfau

[PATCH man-pages 0/5] {ioctl_}userfaultfd.2: yet another update

2017-04-30 Thread Mike Rapoport
Hi Michael, These updates pretty much complete the coverage of 4.11 additions, IMHO. Mike Rapoport (5): ioctl_userfaultfd.2: update description of shared memory areas ioctl_userfaultfd.2: UFFDIO_COPY: add ENOENT and ENOSPC description ioctl_userfaultfd.2: add BUGS section userfaultfd.2

Re: [PATCH man-pages 0/5] {ioctl_}userfaultfd.2: yet another update

2017-05-02 Thread Mike Rapoport
On Mon, May 01, 2017 at 08:34:07PM +0200, Michael Kerrisk (man-pages) wrote: > Hi Mike, > > On 05/01/2017 07:43 AM, Mike Rapoport wrote: > > Hi Michael, > > > > These updates pretty much complete the coverage of 4.11 additions, IMHO. > > Thanks for this, but

Re: [PATCH man-pages 1/2] userfaultfd.2: start documenting non-cooperative events

2017-05-02 Thread Mike Rapoport
m> wrote: > >> Hi Mike, > >> > >> I've applied this, but have some questions/points I think > >> further clarification. > >> > >> On 04/27/2017 04:14 PM, Mike Rapoport wrote: > >>> Signed-off-by: Mike Rapoport <r...@linux.vnet.

Re: [PATCH man-pages 1/5] ioctl_userfaultfd.2: update description of shared memory areas

2017-05-02 Thread Mike Rapoport
On Mon, May 01, 2017 at 08:33:31PM +0200, Michael Kerrisk (man-pages) wrote: > Hello Mike, > > I've applied this patch, but have a question. > > On 05/01/2017 07:43 AM, Mike Rapoport wrote: > > Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> > > --- &

Re: [PATCH man-pages 3/5] ioctl_userfaultfd.2: add BUGS section

2017-05-02 Thread Mike Rapoport
On Mon, May 01, 2017 at 08:33:50PM +0200, Michael Kerrisk (man-pages) wrote: > Hi Mike, > > I've applied this, but have a question. > > On 05/01/2017 07:43 AM, Mike Rapoport wrote: > > The features handshake is not quite convenient. > > Elaborate about it in the BUGS s

Re: [PATCH man-pages 4/5] userfaultfd.2: add note about asynchronios events delivery

2017-05-02 Thread Mike Rapoport
On Mon, May 01, 2017 at 08:33:45PM +0200, Michael Kerrisk (man-pages) wrote: > Hi Mike, > > On 05/01/2017 07:43 AM, Mike Rapoport wrote: > > Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> > > Thanks. Applied. One question below. > > > --- > > m

Re: [PATCH] Userfaultfd: Add description for UFFD_FEATURE_SIGBUS

2017-10-08 Thread Mike Rapoport
Hello Prakash, On Fri, Oct 06, 2017 at 07:52:20PM -0700, Prakash Sangappa wrote: > Userfaultfd feature UFFD_FEATURE_SIGBUS was merged recently and should > be available in Linux 4.14 release. This patch is for the manpage > changes documenting this API. > > Documents the following commit: > >

Re: [PATCH v5 0/4] Certificate insertion support for x86 bzImages

2017-09-25 Thread Mike Rapoport
Hi, > These patches add support for modifying the reserved space for extra > certificates in a compressed bzImage in x86. This allows separating the > system keyring certificate from the kernel build process. After the kernel > image is distributed, the insert-sys-cert script can be used to

Re: [PATCH v2] Userfaultfd: Add description for UFFD_FEATURE_SIGBUS

2017-10-09 Thread Mike Rapoport
it: > > commit 2d6d6f5a09a96cc1fec7ed992b825e05f64cb50e > Author: Prakash Sangappa <prakash.sanga...@oracle.com> > Date: Wed Sep 6 16:23:39 2017 -0700 > > mm: userfaultfd: add feature to request for a signal delivery > > Signed-off-by: Prakash Sangappa <prakash.san

Re: [PATCH] mm,madvise: bugfix of madvise systemcall infinite loop under special circumstances.

2017-11-27 Thread Mike Rapoport
On Mon, Nov 27, 2017 at 12:58:47PM +0100, Michal Hocko wrote: > On Mon 27-11-17 19:53:18, guoxuenan wrote: > > From: chenjie > > > > The madvise() system call supported a set of "conventional" advice values, > > the MADV_WILLNEED parameter has possibility of triggering an

Re: [PATCH v3 0/4] vm: add a syscall to map a process memory into a pipe

2017-11-22 Thread Mike Rapoport
On Wed, Nov 22, 2017 at 09:43:31PM +0100, Michael Kerrisk (man-pages) wrote: > Hi Mike, > > On 22 November 2017 at 20:36, Mike Rapoport <r...@linux.vnet.ibm.com> wrote: > > Hi, > > > > This patches introduces new process_vmsplice system call that combines >

Re: [PATCH v3 4/4] test: add a test for the process_vmsplice syscall

2017-11-23 Thread Mike Rapoport
On Thu, Nov 23, 2017 at 09:01:03AM +0100, Greg KH wrote: > On Wed, Nov 22, 2017 at 09:36:31PM +0200, Mike Rapoport wrote: > > From: Andrei Vagin <ava...@openvz.org> > > > > This test checks that process_vmsplice() can splice pages from a remote > > process and re

[PATCH v4 2/4] vm: add a syscall to map a process memory into a pipe

2017-11-26 Thread Mike Rapoport
flags to get_user_pages_remote() Signed-off-by: Andrei Vagin <ava...@virtuozzo.com> Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- fs/splice.c | 205 ++ include/linux/compat.h| 3 + include/linux/syscall

[PATCH v4 4/4] test: add a test for the process_vmsplice syscall

2017-11-26 Thread Mike Rapoport
From: Andrei Vagin <ava...@openvz.org> This test checks that process_vmsplice() can splice pages from a remote process and returns EFAULT, if process_vmsplice() tries to splice pages by an unaccessiable address. Signed-off-by: Andrei Vagin <ava...@openvz.org> Signed-off-by: Mike

[PATCH] process_vmsplice.2: New page describing process_vmsplice(2) system call.

2017-11-26 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- man2/process_vmsplice.2 | 188 1 file changed, 188 insertions(+) create mode 100644 man2/process_vmsplice.2 diff --git a/man2/process_vmsplice.2 b/man2/process_vmsplice.2 new fil

[PATCH v4 3/4] x86: wire up the process_vmsplice syscall

2017-11-26 Thread Mike Rapoport
From: Andrei Vagin Signed-off-by: Andrei Vagin --- arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/x86/entry/syscalls/syscall_32.tbl

[PATCH v4 1/4] fs/splice: introduce pages_to_pipe helper

2017-11-26 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- fs/splice.c | 57 - 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/fs/splice.c b/fs/splice.c index 39e2dc0..7f1ffc5 100644 --- a/fs/splice.c +++ b/fs/sp

[PATCH v4 0/4] vm: add a syscall to map a process memory into a pipe

2017-11-26 Thread Mike Rapoport
ORY_ATTACH give correct flags to get_user_pages_remote() Andrei Vagin (3): vm: add a syscall to map a process memory into a pipe x86: wire up the process_vmsplice syscall test: add a test for the process_vmsplice syscall Mike Rapoport (1): fs/splice: introduce pages_to_pipe helper arch

[PATCH v3 1/4] fs/splice: introduce pages_to_pipe helper

2017-11-22 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- fs/splice.c | 57 - 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/fs/splice.c b/fs/splice.c index 39e2dc0..7f1ffc5 100644 --- a/fs/splice.c +++ b/fs/sp

[PATCH v3 0/4] vm: add a syscall to map a process memory into a pipe

2017-11-22 Thread Mike Rapoport
ve correct flags to get_user_pages_remote() Andrei Vagin (3): vm: add a syscall to map a process memory into a pipe x86: wire up the process_vmsplice syscall test: add a test for the process_vmsplice syscall Mike Rapoport (1): fs/splice: introduce pages_to_pipe helper arch/x86/entry/syscall

[PATCH v3 4/4] test: add a test for the process_vmsplice syscall

2017-11-22 Thread Mike Rapoport
From: Andrei Vagin This test checks that process_vmsplice() can splice pages from a remote process and returns EFAULT, if process_vmsplice() tries to splice pages by an unaccessiable address. Signed-off-by: Andrei Vagin ---

[PATCH v3 2/4] vm: add a syscall to map a process memory into a pipe

2017-11-22 Thread Mike Rapoport
y from a previous iteration. After a few pre-dump operations, a process is stopped and dumped finally. The pre-dump operations allow to significantly decrease a process downtime, when a process is migrated to another host. Signed-off-by: Andrei Vagin <ava...@virtuozzo.com> Signed-off-by: Mike

[PATCH v3 3/4] x86: wire up the process_vmsplice syscall

2017-11-22 Thread Mike Rapoport
From: Andrei Vagin Signed-off-by: Andrei Vagin --- arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/x86/entry/syscalls/syscall_32.tbl

Re: [PATCH 2/3] userfaultfd: use fault_wqh lock

2017-12-16 Thread Mike Rapoport
hew Wilcox <mawil...@microsoft.com> > [hch: slight changelog updates] > Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Mike Rapoport <r...@linux.vnet.ibm.com> > --- > fs/userfaultfd.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH v3] pids: introduce find_get_task_by_vpid helper

2017-11-01 Thread Mike Rapoport
There are several functions that do find_task_by_vpid() followed by get_task_struct(). We can use a helper function instead. Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> Acked-by: Oleg Nesterov <o...@redhat.com> --- v3: update arch/ia64/kernel/perfmon.c and security/yam

Re: [PATCH v2] mmap.2: MAP_FIXED updated documentation

2017-12-04 Thread Mike Rapoport
On Sun, Dec 03, 2017 at 06:14:11PM -0800, john.hubb...@gmail.com wrote: > From: John Hubbard > > Previously, MAP_FIXED was "discouraged", due to portability > issues with the fixed address. In fact, there are other, more > serious issues. Also, in some limited cases, this

Re: [PATCH v2] pids: introduce find_get_task_by_vpid helper

2017-10-30 Thread Mike Rapoport
On Mon, Oct 30, 2017 at 07:51:42PM +1100, Balbir Singh wrote: > On Sat, Oct 28, 2017 at 4:52 AM, Mike Rapoport <r...@linux.vnet.ibm.com> > wrote: > > There are several functions that do find_task_by_vpid() followed by > > get_task_struct(). We can use a helper function ins

[PATCH 2/3] docs/vm: transhuge: minor updates

2018-05-14 Thread Mike Rapoport
Some formatting changes and addition of a sentence introducing khugepaged Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- Documentation/vm/transhuge.rst | 47 -- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/Documentat

[PATCH 3/3] docs/vm: transhuge: split userspace bits to admin-guide/mm/transhuge

2018-05-14 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- Documentation/admin-guide/kernel-parameters.txt | 3 +- Documentation/admin-guide/mm/index.rst | 1 + Documentation/admin-guide/mm/transhuge.rst | 418 Documentation/vm/transhu

[PATCH 0/3] docs/vm: transhuge: split userspace bits to admin-guide/mm

2018-05-14 Thread Mike Rapoport
related bits to Documentation/admin-guide/mm, which is done by the third patch. Mike Rapoport (3): docs/vm: transhuge: change sections order docs/vm: transhuge: minor updates docs/vm: transhuge: split userspace bits to admin-guide/mm/transhuge Documentation/admin-guide/kernel-parameters.txt

[PATCH 1/3] docs/vm: transhuge: change sections order

2018-05-14 Thread Mike Rapoport
so that userspace interface and implementation description will be grouped together Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- Documentation/vm/transhuge.rst | 82 +- 1 file changed, 41 insertions(+), 41 deletions(-) diff

Re: [PATCH v3] selftests: add headers_install to lib.mk

2018-05-14 Thread Mike Rapoport
On Mon, May 14, 2018 at 01:58:09PM +0200, Anders Roxell wrote: > If the kernel headers aren't installed we can't build all the tests. > Add a new make target rule 'khdr' in the file lib.mk to generate the > kernel headers and that gets include for every test-dir Makefile that > includes lib.mk If

[PATCH 1/3] docs/vm: numa_memory_policy: formatting and spelling updates

2018-05-08 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- Documentation/vm/numa_memory_policy.rst | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Documentation/vm/numa_memory_policy.rst b/Documentation/vm/numa_memory_policy.rst index 8

[PATCH 2/3] docs/vm: numa_memory_policy: s/Linux memory policy/NUMA memory policy/

2018-05-08 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- Documentation/vm/numa_memory_policy.rst | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/vm/numa_memory_policy.rst b/Documentation/vm/numa_memory_policy.rst index ac0b396

[PATCH 3/3] docs/vm: move numa_memory_policy.rst to Documentation/admin-guide/mm

2018-05-08 Thread Mike Rapoport
The document describes userspace API and as such it belongs to Documentation/admin-guide/mm Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> --- Documentation/admin-guide/mm/hugetlbpage.rst| 2 +- Documentation/admin-guide/mm/index.rst

[PATCH 0/3] docs/vm: move numa_memory_policy.rst to admin-guide/mm

2018-05-08 Thread Mike Rapoport
Hi, These patches include minor formatting and spelling updates to Documentation/vm/numa_memory_policy.rst and move this file to Documentation/admin-guide/mm. Mike Rapoport (3): docs/vm: numa_memory_policy: formatting and spelling updates docs/vm: numa_memory_policy: s/Linux memory policy

Re: vmalloc with GFP_NOFS

2018-05-09 Thread Mike Rapoport
On Wed, May 09, 2018 at 08:13:51AM -0700, Darrick J. Wong wrote: > On Wed, May 09, 2018 at 03:42:22PM +0200, Michal Hocko wrote: > > On Tue 24-04-18 13:25:42, Michal Hocko wrote: > > [...] > > > > As a suggestion, could you take > > > > documentation about how to convert to the

[PATCH v2] selftests: cgroup/memcontrol: add basic test for socket accounting

2018-05-17 Thread Mike Rapoport
Signed-off-by: Mike Rapoport <r...@linux.vnet.ibm.com> Acked-by: Roman Gushchin <g...@fb.com> --- v2 changes: * bumped error percentage for comparing memory.current with memory.stat.sock * added checks that memory.stat.sock == 0 and memory.current >= 0 after TCP server exits * s

<    1   2   3   4   5   6   7   8   9   10   >