z3fold: limit use of stale list for allocation
authorVitaly Wool <[email protected]>
Thu, 5 Apr 2018 23:23:32 +0000 (16:23 -0700)
committerLinus Torvalds <[email protected]>
Fri, 6 Apr 2018 04:36:25 +0000 (21:36 -0700)
commit5c9bab592f53328b3e00d7293378b714abf47a2a
tree8785d51da7ca697c8a781e56d309f341e3bb13a3
parent605ca5ede7643a01f4c4a15913f9714ac297f8a6
z3fold: limit use of stale list for allocation

Currently if z3fold couldn't find an unbuddied page it would first try
to pull a page off the stale list.  The problem with this approach is
that we can't 100% guarantee that the page is not processed by the
workqueue thread at the same time unless we run cancel_work_sync() on
it, which we can't do if we're in an atomic context.  So let's just
limit stale list usage to non-atomic contexts only.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Vitaly Vul <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/z3fold.c