Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149601591
D26213.id76284.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26213.id76284.diff
View Options
Index: lib/libmemstat/memstat_uma.c
===================================================================
--- lib/libmemstat/memstat_uma.c
+++ lib/libmemstat/memstat_uma.c
@@ -455,9 +455,8 @@
mtp->mt_byteslimit = mtp->mt_countlimit * mtp->mt_size;
mtp->mt_count = mtp->mt_numallocs - mtp->mt_numfrees;
for (i = 0; i < ndomains; i++) {
- ret = kread(kvm,
- &uz.uz_cpu[mp_maxid + 1] + i * sizeof(uzd),
- &uzd, sizeof(uzd), 0);
+ ret = kread(kvm, ZDOM_GET(uzp, i), &uzd,
+ sizeof(uzd), 0);
if (ret != 0)
continue;
for (ubp =
Index: sys/vm/uma_int.h
===================================================================
--- sys/vm/uma_int.h
+++ sys/vm/uma_int.h
@@ -526,6 +526,10 @@
KASSERT(uma_zone_get_allocs((z)) == 0, \
("zone %s initialization after use.", (z)->uz_name))
+/* Domains are contiguous after the last CPU */
+#define ZDOM_GET(z, n) \
+ (&((uma_zone_domain_t)&(z)->uz_cpu[mp_maxid + 1])[n])
+
#undef UMA_ALIGN
#ifdef _KERNEL
@@ -561,10 +565,6 @@
KASSERT(uma_keg_get_allocs((k)) == 0, \
("keg %s initialization after use.", (k)->uk_name))
-/* Domains are contiguous after the last CPU */
-#define ZDOM_GET(z, n) \
- (&((uma_zone_domain_t)&(z)->uz_cpu[mp_maxid + 1])[n])
-
#define ZDOM_LOCK_INIT(z, zdom, lc) \
do { \
if ((lc)) \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 26, 1:25 PM (10 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30384134
Default Alt Text
D26213.id76284.diff (1 KB)
Attached To
Mode
D26213: memstat_kvm_uma: fix reading of uma_zone_domain structures
Attached
Detach File
Event Timeline
Log In to Comment