mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
slub: rename calculate_min_partial() to set_min_partial()
As suggested by Christoph Lameter, rename calculate_min_partial() to set_min_partial() as the function doesn't really do any calculations. Cc: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
This commit is contained in:
parent
73d342b169
commit
c0bdb232b2
1 changed files with 3 additions and 3 deletions
|
@ -2170,7 +2170,7 @@ static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void calculate_min_partial(struct kmem_cache *s, unsigned long min)
|
static void set_min_partial(struct kmem_cache *s, unsigned long min)
|
||||||
{
|
{
|
||||||
if (min < MIN_PARTIAL)
|
if (min < MIN_PARTIAL)
|
||||||
min = MIN_PARTIAL;
|
min = MIN_PARTIAL;
|
||||||
|
@ -2321,7 +2321,7 @@ static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
|
||||||
* The larger the object size is, the more pages we want on the partial
|
* The larger the object size is, the more pages we want on the partial
|
||||||
* list to avoid pounding the page allocator excessively.
|
* list to avoid pounding the page allocator excessively.
|
||||||
*/
|
*/
|
||||||
calculate_min_partial(s, ilog2(s->size));
|
set_min_partial(s, ilog2(s->size));
|
||||||
s->refcount = 1;
|
s->refcount = 1;
|
||||||
#ifdef CONFIG_NUMA
|
#ifdef CONFIG_NUMA
|
||||||
s->remote_node_defrag_ratio = 1000;
|
s->remote_node_defrag_ratio = 1000;
|
||||||
|
@ -3853,7 +3853,7 @@ static ssize_t min_partial_store(struct kmem_cache *s, const char *buf,
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
calculate_min_partial(s, min);
|
set_min_partial(s, min);
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
SLAB_ATTR(min_partial);
|
SLAB_ATTR(min_partial);
|
||||||
|
|
Loading…
Reference in a new issue