Commit 90f055d
committed
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: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Feng Tang <feng.tang@intel.com>
Reviewed-and-tested-by: Jay Patel <jaypatel@linux.ibm.com>1 parent 5886fc8 commit 90f055d
1 file changed
Lines changed: 12 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4110 | 4110 | | |
4111 | 4111 | | |
4112 | 4112 | | |
4113 | | - | |
| 4113 | + | |
4114 | 4114 | | |
4115 | 4115 | | |
4116 | | - | |
4117 | 4116 | | |
4118 | 4117 | | |
4119 | | - | |
4120 | | - | |
4121 | | - | |
4122 | | - | |
4123 | | - | |
| 4118 | + | |
4124 | 4119 | | |
4125 | 4120 | | |
4126 | 4121 | | |
| |||
4139 | 4134 | | |
4140 | 4135 | | |
4141 | 4136 | | |
4142 | | - | |
| 4137 | + | |
4143 | 4138 | | |
4144 | 4139 | | |
4145 | 4140 | | |
| |||
4152 | 4147 | | |
4153 | 4148 | | |
4154 | 4149 | | |
4155 | | - | |
| 4150 | + | |
4156 | 4151 | | |
4157 | 4152 | | |
4158 | 4153 | | |
4159 | 4154 | | |
4160 | | - | |
| 4155 | + | |
| 4156 | + | |
4161 | 4157 | | |
4162 | 4158 | | |
| 4159 | + | |
| 4160 | + | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
4163 | 4164 | | |
4164 | 4165 | | |
4165 | 4166 | | |
| |||
4176 | 4177 | | |
4177 | 4178 | | |
4178 | 4179 | | |
4179 | | - | |
| 4180 | + | |
4180 | 4181 | | |
4181 | 4182 | | |
4182 | 4183 | | |
| |||
0 commit comments