]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm, page_alloc: reserve pageblocks for high-order atomic allocations on demand -fix
authorMel Gorman <mgorman@techsingularity.net>
Wed, 21 Oct 2015 22:03:08 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:08 +0000 (09:03 +1100)
commit0303b94393b5f4fc8087ecfa1f2881a1a2a54c28
tree629e2ca658bab8483bdb36f5de6dafa6f4fbb98f
parent7397950263d6bc619bcae168297558cdaddf00fb
mm, page_alloc: reserve pageblocks for high-order atomic allocations on demand -fix

nr_reserved_highatomic is checked outside the zone lock so there is a race
whereby the reserve is larger than the limit allows.  This patch rechecks
the count under the zone lock.

During unreserving, there is a possibility we could underflow if there
ever was a race between per-cpu drains, reserve and unreserving.  This
patch adds a comment about the potential race and protects against it.

These are two fixes to the mmotm patch
mm-page_alloc-reserve-pageblocks-for-high-order-atomic-allocations-on-demand.patch
.  They are not separate patches and they should all be folded together.

Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Vitaly Wool <vitalywool@gmail.com>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c