Page MenuHomeFreeBSD

D23980.id69237.diff
No OneTemporary

D23980.id69237.diff

Index: sys/vm/uma_core.c
===================================================================
--- sys/vm/uma_core.c
+++ sys/vm/uma_core.c
@@ -1889,7 +1889,7 @@
}
#ifdef INVARIANTS
-struct noslabbits *
+static struct noslabbits *
slab_dbg_bits(uma_slab_t slab, uma_keg_t keg)
{
@@ -1900,7 +1900,7 @@
/*
* Actual size of embedded struct slab (!OFFPAGE).
*/
-size_t
+static size_t
slab_sizeof(int nitems)
{
size_t s;
@@ -1912,7 +1912,7 @@
/*
* Size of memory for embedded slabs (!OFFPAGE).
*/
-size_t
+static size_t __unused
slab_space(int nitems)
{
return (UMA_SLAB_SIZE - slab_sizeof(nitems));
@@ -1959,9 +1959,10 @@
}
/*
- * Compute the number of items that will fit in a slab for a startup zone.
+ * Compute the number of items that will fit in a slab for a startup zone
+ * (!OFFPAGE).
*/
-int
+static int __unused
slab_ipers(size_t size, int align)
{
int rsize;
Index: sys/vm/uma_int.h
===================================================================
--- sys/vm/uma_int.h
+++ sys/vm/uma_int.h
@@ -368,11 +368,6 @@
};
typedef struct uma_keg * uma_keg_t;
-#ifdef _KERNEL
-#define KEG_ASSERT_COLD(k) \
- KASSERT(uma_keg_get_allocs((k)) == 0, \
- ("keg %s initialization after use.", (k)->uk_name))
-
/*
* Free bits per-slab.
*/
@@ -391,11 +386,8 @@
uint8_t us_domain; /* Backing NUMA domain. */
struct noslabbits us_free; /* Free bitmask, flexible. */
};
-_Static_assert(sizeof(struct uma_slab) == offsetof(struct uma_slab, us_free),
+_Static_assert(sizeof(struct uma_slab) == __offsetof(struct uma_slab, us_free),
"us_free field must be last");
-#if MAXMEMDOM >= 255
-#error "Slab domain type insufficient"
-#endif
typedef struct uma_slab * uma_slab_t;
@@ -409,11 +401,6 @@
#define SLAB_BITSETS 1
#endif
-/* These three functions are for embedded (!OFFPAGE) use only. */
-size_t slab_sizeof(int nitems);
-size_t slab_space(int nitems);
-int slab_ipers(size_t size, int align);
-
/*
* Slab structure with a full sized bitset and hash link for both
* HASH and OFFPAGE zones.
@@ -460,7 +447,6 @@
data = (uintptr_t)slab_data(slab, keg);
return (((uintptr_t)item - data) / keg->uk_rsize);
}
-#endif /* _KERNEL */
STAILQ_HEAD(uma_bucketlist, uma_bucket);
@@ -579,6 +565,10 @@
("%s: Invalid zone %p type", __func__, (zone))); \
} while (0)
+#define KEG_ASSERT_COLD(k) \
+ 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])

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 23, 9:12 PM (2 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30206617
Default Alt Text
D23980.id69237.diff (2 KB)

Event Timeline