Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Apr 2015 03:35:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 199169] [patch] zone "UMA Zones" has bigger size than need
Message-ID:  <bug-199169-8-4WPSTdGotn@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-199169-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-199169-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199169

--- Comment #2 from luke.tw@gmail.com ---
hi, Dmitry,

Thanks for your feedback.
That's right, but there is already one uma_cache in the struct uma_zone.
Let me do an experiment on sleepq_zone. 
I have 4-core cpu and the mp_maxid is 3. 
(kgdb) p mp_maxid
$1 = 3

The size of all per-cpu cache in sleepq_zone is 640 bytes.
(kgdb) p sleepq_zone
$2 = 0xfffff80002bb8000
(kgdb) p sleepq_zone->uz_cpu
$3 = 0xfffff80002bb8200
(kgdb) p masterzone_z->uz_size - (0xfffff80002bb8200 - 0xfffff80002bb8000)
$4 = 640

So, there are total 5 elements in the uz_cpu array
(kgdb) p 640 / sizeof(struct uma_cache)
$5 = 5

Only the first 4 elements are used. 
(kgdb) p sleepq_zone->uz_cpu[0]
$6 = {uc_freebucket = 0x0, uc_allocbucket = 0xfffff80002bb1c00, uc_allocs = 73,
uc_frees = 0}
(kgdb) p sleepq_zone->uz_cpu[1]
$7 = {uc_freebucket = 0x0, uc_allocbucket = 0xfffff8000516a800, uc_allocs = 18,
uc_frees = 0}
(kgdb) p sleepq_zone->uz_cpu[2]
$8 = {uc_freebucket = 0x0, uc_allocbucket = 0xfffff80004747c00, uc_allocs = 18,
uc_frees = 0}
(kgdb) p sleepq_zone->uz_cpu[3]
$9 = {uc_freebucket = 0x0, uc_allocbucket = 0xfffff800047a1c00, uc_allocs = 36,
uc_frees = 0}
(kgdb) p sleepq_zone->uz_cpu[4]
$10 = {uc_freebucket = 0x0, uc_allocbucket = 0x0, uc_allocs = 0, uc_frees = 0}

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-199169-8-4WPSTdGotn>