summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorBrendan Jackman <jackmanb@google.com>2026-07-03 12:31:58 +0000
committerAndrew Morton <akpm@linux-foundation.org>2026-07-30 19:40:44 -0700
commit3a01af828138041eb4bd27403ad3bd25f8e89790 (patch)
treeb359b00c8ee4e4ca87250ae3c9e60c7bcd3aac11 /tools/lib/python
parent5df11ba0eb5ae3c4e90edb291c5be7fbfde33076 (diff)
mm: factor out can_spin_trylock()
Deduplicate checks for whether the current context is safe for spin_trylock(). Does this function really belong in mm/internal.h or is it generic? Not sure. If someone ends up duplicating this logic elsewhere in the kernel, that would be a shame. But if it goes in some generic header, someone treats it as documentation about where it's guaranteed safe to spin_trylock(), and then it emerges that there are other subtle preconditions that didn't affect the mm usecase, that would be worse. So, just be conservative and keep it local. Link: https://lore.kernel.org/20260703-alloc-trylock-v5-18-c87b714e19d3@google.com Signed-off-by: Brendan Jackman <jackmanb@google.com> Suggested-by: Harry Yoo <harry@kernel.org> Link: https://lore.kernel.org/all/397859cb-b127-4cc6-9c71-044afc99bf0c@kernel.org/ Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Reviewed-by: Harry Yoo (Oracle) <harry@kernel.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions