Re: mm: VM_BUG_ON_PAGE(PageTail(page)) in mbind

2016-01-26 Thread Vlastimil Babka
tter_hold::pages accordingly from mm core. > > Let's mark the VMA as VM_IO to indicate to mm core that the VMA is > migratable. ^ not migratable. Acked-by: Vlastimil Babka > > Signed-off-by: Kirill A. Shutemov > Reported-by: Dmitry Vyukov > --- > drivers

[PATCH 3/4] treewide: convert PF_MEMALLOC manipulations to new helpers

2017-04-05 Thread Vlastimil Babka
We now have memalloc_noreclaim_{save,restore} helpers for robust setting and clearing of PF_MEMALLOC. Let's convert the code which was using the generic tsk_restore_flags(). No functional change. Signed-off-by: Vlastimil Babka Cc: Josef Bacik Cc: Lee Duncan Cc: Chris Leech Cc: &qu

[PATCH 1/4] mm: prevent potential recursive reclaim due to clearing PF_MEMALLOC

2017-04-05 Thread Vlastimil Babka
where PF_MEMALLOC is already set. Fixes: a8161d1ed609 ("mm, page_alloc: restructure direct compaction handling in slowpath") Reported-by: Andrey Ryabinin Signed-off-by: Vlastimil Babka Cc: --- mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/

[PATCH 4/4] mtd: nand: nandsim: convert to memalloc_noreclaim_*()

2017-04-05 Thread Vlastimil Babka
Nandsim has own functions set_memalloc() and clear_memalloc() for robust setting and clearing of PF_MEMALLOC. Replace them by the new generic helpers. No functional change. Signed-off-by: Vlastimil Babka Cc: Boris Brezillon Cc: Richard Weinberger --- drivers/mtd/nand/nandsim.c | 29

[PATCH 2/4] mm: introduce memalloc_noreclaim_{save,restore}

2017-04-05 Thread Vlastimil Babka
similar to the existing memalloc_noio_* and memalloc_nofs_* helpers. Convert existing setting/clearing of PF_MEMALLOC within mm to the new helpers. There are no known issues with the converted code, but the change makes it more robust. Suggested-by: Michal Hocko Signed-off-by: Vlastim

[PATCH 0/4] more robust PF_MEMALLOC handling

2017-04-05 Thread Vlastimil Babka
xes (without the new helpers, to make backporting easier). Patch 2 introduces the new helpers, modelled after existing memalloc_noio_* and memalloc_nofs_* helpers, and converts mm core to use them. Patches 3 and 4 convert non-mm code. Based on next-20170404. Vlastimil Babka (4): mm: prevent potent

Re: [PATCH 4/4] mtd: nand: nandsim: convert to memalloc_noreclaim_*()

2017-04-05 Thread Vlastimil Babka
On 04/05/2017 01:36 PM, Richard Weinberger wrote: > Michal, > > Am 05.04.2017 um 13:31 schrieb Michal Hocko: >> On Wed 05-04-17 09:47:00, Vlastimil Babka wrote: >>> Nandsim has own functions set_memalloc() and clear_memalloc() for robust >>> setting and clearin

Re: [PATCH 1/4] mm: prevent potential recursive reclaim due to clearing PF_MEMALLOC

2017-04-07 Thread Vlastimil Babka
On 04/05/2017 01:40 PM, Andrey Ryabinin wrote: > On 04/05/2017 10:46 AM, Vlastimil Babka wrote: >> The function __alloc_pages_direct_compact() sets PF_MEMALLOC to prevent >> deadlock during page migration by lock_page() (see the comment in >> __unmap_and_move()). Then it uncon