diff options
author | Xiongwei Song <xiongwei.song@windriver.com> | 2024-04-04 13:58:26 +0800 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2024-04-04 11:29:26 +0200 |
commit | ff99b18fee793826dd5604da72d6259a531b45e9 (patch) | |
tree | fdcbfa4e5d0015161ce4709ea2ffe435736086d7 /net | |
parent | 721a2f8be134f9bb61f4358cbb7ae394eaf74573 (diff) |
mm/slub: simplify get_partial_node()
The break conditions for filling cpu partial can be more readable and
simple.
If slub_get_cpu_partial() returns 0, we can confirm that we don't need
to fill cpu partial, then we should break from the loop. On the other
hand, we also should break from the loop if we have added enough cpu
partial slabs.
Meanwhile, the logic above gets rid of the #ifdef and also fixes a weird
corner case that if we set cpu_partial_slabs to 0 from sysfs, we still
allocate at least one here.
Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions