summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2022-10-24 10:14:30 +0200
committerDennis Zhou <dennis@kernel.org>2022-11-08 07:59:06 +0100
commite04cb6976340d5ebf2b28ad91bf6a13a285aa566 (patch)
tree63bef7a09be17db1345adb1227d126d5f82d1d9e /mm
parentmm/percpu: use list_first_entry_or_null in pcpu_reclaim_populated() (diff)
downloadlinux-e04cb6976340d5ebf2b28ad91bf6a13a285aa566.tar.xz
linux-e04cb6976340d5ebf2b28ad91bf6a13a285aa566.zip
mm/percpu: Update the code comment when creating new chunk
The lock pcpu_alloc_mutex taking code has been moved to the beginning of pcpu_allo() if it's non atomic allocation. So the code comment above above pcpu_create_chunk() callsite need be updated. Signed-off-by: Baoquan He <bhe@redhat.com> Signed-off-by: Dennis Zhou <dennis@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/percpu.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/mm/percpu.c b/mm/percpu.c
index 841bb93aaae6..68d5ba61c935 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1817,16 +1817,12 @@ restart:
spin_unlock_irqrestore(&pcpu_lock, flags);
- /*
- * No space left. Create a new chunk. We don't want multiple
- * tasks to create chunks simultaneously. Serialize and create iff
- * there's still no empty chunk after grabbing the mutex.
- */
if (is_atomic) {
err = "atomic alloc failed, no space left";
goto fail;
}
+ /* No space left. Create a new chunk. */
if (list_empty(&pcpu_chunk_lists[pcpu_free_slot])) {
chunk = pcpu_create_chunk(pcpu_gfp);
if (!chunk) {