Use literal bucket sizes for smaller buckets rather than the rounding
system. Small bucket sizes already pack well even if they are an odd number of words. This prevents any potential new instances of the problem fixed in r357463 as well as making the system easier to understand. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D23494
This commit is contained in:
parent
fa5ce7a2a6
commit
6503b1afcf
@ -236,16 +236,15 @@ struct uma_bucket_zone {
|
|||||||
(((sizeof(void *) * (n)) - sizeof(struct uma_bucket)) / sizeof(void *))
|
(((sizeof(void *) * (n)) - sizeof(struct uma_bucket)) / sizeof(void *))
|
||||||
|
|
||||||
#define BUCKET_MAX BUCKET_SIZE(256)
|
#define BUCKET_MAX BUCKET_SIZE(256)
|
||||||
#define BUCKET_MIN BUCKET_SIZE(4)
|
#define BUCKET_MIN 2
|
||||||
|
|
||||||
struct uma_bucket_zone bucket_zones[] = {
|
struct uma_bucket_zone bucket_zones[] = {
|
||||||
#ifndef __ILP32__
|
/* Literal bucket sizes. */
|
||||||
{ NULL, "4 Bucket", BUCKET_SIZE(4), 4096 },
|
{ NULL, "2 Bucket", 2, 4096 },
|
||||||
#endif
|
{ NULL, "4 Bucket", 4, 3072 },
|
||||||
{ NULL, "6 Bucket", BUCKET_SIZE(6), 3072 },
|
{ NULL, "8 Bucket", 8, 2048 },
|
||||||
{ NULL, "8 Bucket", BUCKET_SIZE(8), 2048 },
|
{ NULL, "16 Bucket", 16, 1024 },
|
||||||
{ NULL, "12 Bucket", BUCKET_SIZE(12), 1536 },
|
/* Rounded down power of 2 sizes for efficiency. */
|
||||||
{ NULL, "16 Bucket", BUCKET_SIZE(16), 1024 },
|
|
||||||
{ NULL, "32 Bucket", BUCKET_SIZE(32), 512 },
|
{ NULL, "32 Bucket", BUCKET_SIZE(32), 512 },
|
||||||
{ NULL, "64 Bucket", BUCKET_SIZE(64), 256 },
|
{ NULL, "64 Bucket", BUCKET_SIZE(64), 256 },
|
||||||
{ NULL, "128 Bucket", BUCKET_SIZE(128), 128 },
|
{ NULL, "128 Bucket", BUCKET_SIZE(128), 128 },
|
||||||
|
Loading…
Reference in New Issue
Block a user