From: Johannes Weiner Date: Wed, 6 Aug 2014 23:05:44 +0000 (-0700) Subject: mm: memcontrol: rearrange charging fast path X-Git-Tag: cleanup-for-v3.18~96^2~159 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06b078fc065fe1fe7097675c8ee416aa2ef94fb3;p=pandora-kernel.git mm: memcontrol: rearrange charging fast path The charging path currently starts out with OOM condition checks when OOM is the rarest possible case. Rearrange this code to run OOM/task dying checks only after trying the percpu charge and the res_counter charge and bail out before entering reclaim. Attempting a charge does not hurt an (oom-)killed task as much as every charge attempt having to check OOM conditions. Also, only check __GFP_NOFAIL when the charge would actually fail. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Hugh Dickins Cc: Tejun Heo Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed