Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146465564
D22453.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
D22453.diff
View Options
Index: head/sys/vm/uma_core.c
===================================================================
--- head/sys/vm/uma_core.c
+++ head/sys/vm/uma_core.c
@@ -585,7 +585,7 @@
uma_keg_t keg;
u_int slabs;
- if ((zone->uz_flags & UMA_ZFLAG_CACHE) != 0)
+ if ((zone->uz_flags & UMA_ZONE_HASH) == 0)
goto update_wss;
keg = zone->uz_keg;
@@ -1568,7 +1568,14 @@
"new wasted space = %d\n", keg->uk_name, keg, wastedspace,
slabsize / UMA_MAX_WASTE, keg->uk_ipers,
slabsize - keg->uk_ipers * keg->uk_rsize);
- keg->uk_flags |= UMA_ZONE_OFFPAGE;
+ /*
+ * If we had access to memory to embed a slab header we
+ * also have a page structure to use vtoslab() instead of
+ * hash to find slabs. If the zone was explicitly created
+ * OFFPAGE we can't necessarily touch the memory.
+ */
+ if ((keg->uk_flags & UMA_ZONE_OFFPAGE) == 0)
+ keg->uk_flags |= UMA_ZONE_OFFPAGE | UMA_ZONE_VTOSLAB;
}
if ((keg->uk_flags & UMA_ZONE_OFFPAGE) &&
@@ -1608,7 +1615,7 @@
* slab header.
*/
if ((keg->uk_flags & UMA_ZFLAG_INTERNAL) == 0)
- keg->uk_flags |= UMA_ZONE_OFFPAGE;
+ keg->uk_flags |= UMA_ZONE_OFFPAGE | UMA_ZONE_VTOSLAB;
else
keg->uk_ppera++;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 3, 10:09 PM (7 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29205324
Default Alt Text
D22453.diff (1 KB)
Attached To
Mode
D22453: Set VTOSLAB when we set OFFPAGE so that we don't use the hash.
Attached
Detach File
Event Timeline
Log In to Comment