Following is the 1 of 2 patches.
D: Name: slabchange-2.5.50-1.patch
D: Description: Exposes malloc_sizes for kmalloc_percpu
D: Author: Ravikiran Thirumalai
include/linux/slab.h | 13 +++++++++++++
mm/slab.c | 9 +--------
2 files changed, 14 insertions(+), 8 deletions(-)
diff -ruN linux-2.5.50/include/linux/slab.h kmalloc_percpu-2.5.50/include/linux/slab.h
--- linux-2.5.50/include/linux/slab.h Thu Nov 28 04:06:23 2002
+++ kmalloc_percpu-2.5.50/include/linux/slab.h Sun Dec 1 11:13:49 2002
@@ -75,6 +75,19 @@
extern kmem_cache_t *sigact_cachep;
extern kmem_cache_t *bio_cachep;
+/*
+ * Size description struct for general caches.
+ * This had to be exposed for kmalloc_percpu.
+ */
+
+struct cache_sizes {
+ size_t cs_size;
+ kmem_cache_t *cs_cachep;
+ kmem_cache_t *cs_dmacachep;
+};
+
+extern struct cache_sizes malloc_sizes[];
+
#endif /* __KERNEL__ */
#endif /* _LINUX_SLAB_H */
diff -ruN linux-2.5.50/mm/slab.c kmalloc_percpu-2.5.50/mm/slab.c
--- linux-2.5.50/mm/slab.c Thu Nov 28 04:06:17 2002
+++ kmalloc_percpu-2.5.50/mm/slab.c Sun Dec 1 11:13:49 2002
@@ -369,15 +369,8 @@
#define SET_PAGE_SLAB(pg,x) ((pg)->list.prev = (struct list_head *)(x))
#define GET_PAGE_SLAB(pg) ((struct slab *)(pg)->list.prev)
-/* Size description struct for general caches. */
-struct cache_sizes {
- size_t cs_size;
- kmem_cache_t *cs_cachep;
- kmem_cache_t *cs_dmacachep;
-};
-
/* These are the default caches for kmalloc. Custom caches can have other sizes. */
-static struct cache_sizes malloc_sizes[] = {
+struct cache_sizes malloc_sizes[] = {
#if PAGE_SIZE == 4096
{ 32, NULL, NULL},
#endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/