/* When batching pgtable pointers for RCU freeing, we store *theindexsizeinthelowbits.Tablealignmentmustbe *bigenoughtofitit.
*/ unsignedlong minalign = MAX_PGTABLE_INDEX_SIZE + 1; struct kmem_cache *new = NULL;
/* It would be nice if this was a BUILD_BUG_ON(), but at the *moment,gccdoesn'tseemtorecognizeis_power_of_2asa
* constant expression, so so much for that. */
BUG_ON(!is_power_of_2(minalign));
BUG_ON(shift > MAX_PGTABLE_INDEX_SIZE);
if (PGT_CACHE(shift)) return; /* Already have a cache of this size */
align = max_t(unsignedlong, align, minalign);
name = kasprintf(GFP_KERNEL, "pgtable-2^%d", shift); if (name) new = kmem_cache_create(name, table_size, align, 0, ctor(shift)); if (!new)
panic("Could not allocate pgtable cache for order %d", shift);
kfree(name);
pgtable_cache[shift] = new;
pr_debug("Allocated pgtable cache for order %d\n", shift);
}
EXPORT_SYMBOL_GPL(pgtable_cache_add); /* used by kvm_hv module */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.