linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] mm: Fix checking unmapped holes for mbind
@ 2019-11-08 13:01 Li Xinhai
  2019-11-08 13:01 ` [PATCH v4 1/2] mm: Check range first in queue_pages_test_walk Li Xinhai
  2019-11-08 13:01 ` [PATCH v4 2/2] mm: Fix checking unmapped holes for mbind Li Xinhai
  0 siblings, 2 replies; 5+ messages in thread
From: Li Xinhai @ 2019-11-08 13:01 UTC (permalink / raw)
  To: linux-mm


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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-15 15:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 13:01 [PATCH v4 0/2] mm: Fix checking unmapped holes for mbind Li Xinhai
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
     [not found]   ` <20191114093018.GA2144@hori.linux.bs1.fc.nec.co.jp>
2019-11-15 15:33     ` lixinhai.lxh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).