From: Li Xinhai <lixinhai.lxh@gmail.com>
To: linux-mm@kvack.org
Subject: [PATCH v4 0/2] mm: Fix checking unmapped holes for mbind
Date: Fri, 8 Nov 2019 21:01:42 +0800 [thread overview]
Message-ID: <1573218104-11021-1-git-send-email-lixinhai.lxh@gmail.com> (raw)
This patchset fix checking unmapped holes for mbind().
First patch makes sure the vma been correctly tracked in .test_walk(),
so each time when .test_walk() is called, the neighborhood of two vma
is correct.
Current problem is that the !vma_migratable() check could
cause return immediately without update tracking to vma.
Second patch fix the inconsistent report of EFAULT when mbind() is
called for MPOL_DEFAULT and non MPOL_DEFAULT cases, so application do
not need to have workaround code to handle this special behavior.
Currently there are two problems, one is that the .test_walk() can not
know there is hole at tail side of range, because .test_walk() only
call for vma not for hole. The other one is that mbind_range() checks
for hole at head side of range but do not consider the
MPOL_MF_DISCONTIG_OK flag as done in .test_walk().
Changes v3->v4:
- Split to two patch;
- Illustrates the application visible behaviors in changelog;
- Hole at tail side of range is checked in .test_walk(), not after
walk page. Only the case for whole range in hole is checked after
walk page, because our .test_walk() function would not be called at
all in this case.
Changes v2->v3:
- Add more details in change log;
- Check holes in .test_walk() and after call walk_page_range();
Li Xinhai (2):
mm: Check range first in queue_pages_test_walk
mm: Fix checking unmapped holes for mbind
mm/mempolicy.c | 47 +++++++++++++++++++++++++++++++----------------
1 file changed, 31 insertions(+), 16 deletions(-)
--
1.8.3.1
next reply other threads:[~2019-11-08 13:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 13:01 Li Xinhai [this message]
2019-11-08 13:01 ` [PATCH v4 1/2] mm: Check range first in queue_pages_test_walk Li Xinhai
2019-11-14 9:35 ` Naoya Horiguchi
2019-11-08 13:01 ` [PATCH v4 2/2] mm: Fix checking unmapped holes for mbind Li Xinhai
2019-11-14 9:30 ` Naoya Horiguchi
2019-11-15 15:33 ` lixinhai.lxh
2019-11-15 15:33 ` lixinhai.lxh
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=1573218104-11021-1-git-send-email-lixinhai.lxh@gmail.com \
--to=lixinhai.lxh@gmail.com \
--cc=linux-mm@kvack.org \
/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.