Commit ff99b18f authored by Xiongwei Song's avatar Xiongwei Song Committed by Vlastimil Babka
Browse files

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: default avatarXiongwei Song <xiongwei.song@windriver.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 721a2f8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment