summaryrefslogtreecommitdiff
path: root/scripts/coccicheck
diff options
context:
space:
mode:
authorMina Almasry <almasrymina@google.com>2019-12-01 04:56:54 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2019-12-01 23:59:08 +0300
commit5c9119542035dbbc61241ab8dc7feeac11fa82ca (patch)
tree059b96f3b2be7e3c25b24efaf36211ce11c45f0d /scripts/coccicheck
parent930668c34408ba983049322e04f13f03b6f1fafa (diff)
downloadlinux-5c9119542035dbbc61241ab8dc7feeac11fa82ca.tar.xz
hugetlb: region_chg provides only cache entry
Current behavior is that region_chg provides both a cache entry in resv->region_cache, AND a placeholder entry in resv->regions. region_add first tries to use the placeholder, and if it finds that the placeholder has been deleted by a racing region_del call, it uses the cache entry. This behavior is completely unnecessary and is removed in this patch for a couple of reasons: 1. region_add needs to either find a cached file_region entry in resv->region_cache, or find an entry in resv->regions to expand. It does not need both. 2. region_chg adding a placeholder entry in resv->regions opens up a possible race with region_del, where region_chg adds a placeholder region in resv->regions, and this region is deleted by a racing call to region_del during region_chg execution or before region_add is called. Removing the race makes the code easier to reason about and maintain. In addition, a follow up patch in another series that disables region coalescing, which would be further complicated if the race with region_del exists. Link: http://lkml.kernel.org/r/20190919200428.188797-2-almasrymina@google.com Signed-off-by: Mina Almasry <almasrymina@google.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Cc: David Rientjes <rientjes@google.com> Cc: Shakeel Butt <shakeelb@google.com> Cc: Greg Thelen <gthelen@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/coccicheck')
0 files changed, 0 insertions, 0 deletions