From: Mike Rapoport <rppt@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Hillf Danton <hillf.zj@alibaba-inc.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Pavel Emelyanov <xemul@virtuozzo.com>,
linux-mm@kvack.org, Mike Rapoport <rppt@linux.vnet.ibm.com>
Subject: [PATCH 3/3] userfaultfd: non-cooperative: selftest: enable REMOVE event test for shmem
Date: Thu, 19 Jan 2017 10:22:34 +0200 [thread overview]
Message-ID: <1484814154-1557-4-git-send-email-rppt@linux.vnet.ibm.com> (raw)
In-Reply-To: <1484814154-1557-1-git-send-email-rppt@linux.vnet.ibm.com>
Now when madvise(MADV_REMOVE) notifies uffd reader, we should verify that
appliciation actually sees zeros at the removed range.
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
---
tools/testing/selftests/vm/userfaultfd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c
index 9eb77df..e9449c8 100644
--- a/tools/testing/selftests/vm/userfaultfd.c
+++ b/tools/testing/selftests/vm/userfaultfd.c
@@ -569,9 +569,9 @@ static int userfaultfd_open(int features)
* part is accessed after mremap. Since hugetlbfs does not support
* mremap, the entire monitored area is accessed in a single pass for
* HUGETLB_TEST.
- * The release of the pages currently generates event only for
+ * The release of the pages currently generates event for shmem and
* anonymous memory (UFFD_EVENT_REMOVE), hence it is not checked
- * for hugetlb and shmem.
+ * for hugetlb.
*/
static int faulting_process(void)
{
@@ -610,7 +610,6 @@ static int faulting_process(void)
}
}
-#ifndef SHMEM_TEST
if (release_pages(area_dst))
return 1;
@@ -618,7 +617,6 @@ static int faulting_process(void)
if (my_bcmp(area_dst + nr * page_size, zeropage, page_size))
fprintf(stderr, "nr %lu is not zero\n", nr), exit(1);
}
-#endif /* SHMEM_TEST */
#endif /* HUGETLB_TEST */
--
1.9.1
--
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:[~2017-01-19 8:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 8:22 [PATCH 0/3] userfaultfd: non-cooperative: add madvise() event for MADV_REMOVE request Mike Rapoport
2017-01-19 8:22 ` [PATCH 1/3] userfaultfd: non-cooperative: rename *EVENT_MADVDONTNEED to *EVENT_REMOVE Mike Rapoport
2017-01-19 8:43 ` Hillf Danton
2017-01-19 8:22 ` [PATCH 2/3] userfaultfd: non-cooperative: add madvise() event for MADV_REMOVE request Mike Rapoport
2017-01-19 8:58 ` Hillf Danton
2017-01-19 8:22 ` Mike Rapoport [this message]
2017-01-19 18:15 ` [PATCH 0/3] " Andrea Arcangeli
2017-01-23 12:36 ` Pavel Emelyanov
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=1484814154-1557-4-git-send-email-rppt@linux.vnet.ibm.com \
--to=rppt@linux.vnet.ibm.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dgilbert@redhat.com \
--cc=hillf.zj@alibaba-inc.com \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=xemul@virtuozzo.com \
/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