summaryrefslogtreecommitdiff
path: root/crypto/testmgr.h
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2014-04-03 14:47:24 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-09 12:21:28 -0700
commit29c2a88157819d1e68ffea8b7d80117b332c8efe (patch)
treeff14ff01a247ca8813070ca8a3cb3b95419b9541 /crypto/testmgr.h
parentd4995db1ea96e5f357b92469c9b6c3ecc6bdfbaa (diff)
downloadlwn-29c2a88157819d1e68ffea8b7d80117b332c8efe.tar.gz
lwn-29c2a88157819d1e68ffea8b7d80117b332c8efe.zip
mm: optimize put_mems_allowed() usage
commit d26914d11751b23ca2e8747725f2cae10c2f2c1b upstream. Since put_mems_allowed() is strictly optional, its a seqcount retry, we don't need to evaluate the function if the allocation was in fact successful, saving a smp_rmb some loads and comparisons on some relative fast-paths. Since the naming, get/put_mems_allowed() does suggest a mandatory pairing, rename the interface, as suggested by Mel, to resemble the seqcount interface. This gives us: read_mems_allowed_begin() and read_mems_allowed_retry(), where it is important to note that the return value of the latter call is inverted from its previous incarnation. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/testmgr.h')
0 files changed, 0 insertions, 0 deletions