Commit 90f055df authored by Vlastimil Babka's avatar Vlastimil Babka
Browse files

mm/slub: refactor calculate_order() and calc_slab_order()



After the previous cleanups, we can now move some code from
calc_slab_order() to calculate_order() so it's executed just once, and
do some more cleanups.

- move the min_order and MAX_OBJS_PER_PAGE evaluation to
  calculate_order().

- change calc_slab_order() parameter min_objects to min_order

Also make MAX_OBJS_PER_PAGE check more robust by considering also
min_objects in addition to slub_min_order. Otherwise this is not a
functional change.

Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
Reviewed-by: default avatarFeng Tang <feng.tang@intel.com>
Reviewed-and-tested-by: default avatarJay Patel <jaypatel@linux.ibm.com>
parent 5886fc82
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment