WSL2-Linux-Kernel/block
Christoph Lameter 0a31bd5f2b KMEM_CACHE(): simplify slab cache creation
This patch provides a new macro

KMEM_CACHE(<struct>, <flags>)

to simplify slab creation. KMEM_CACHE creates a slab with the name of the
struct, with the size of the struct and with the alignment of the struct.
Additional slab flags may be specified if necessary.

Example

struct test_slab {
	int a,b,c;
	struct list_head;
} __cacheline_aligned_in_smp;

test_slab_cache = KMEM_CACHE(test_slab, SLAB_PANIC)

will create a new slab named "test_slab" of the size sizeof(struct
test_slab) and aligned to the alignment of test slab.  If it fails then we
panic.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 12:12:55 -07:00
..
Kconfig [PATCH] Centralise definitions of sector_t and blkcnt_t 2006-12-04 19:41:15 -08:00
Kconfig.iosched update I/O sched Kconfig help texts - CFQ is now default, not AS. 2007-02-17 20:08:22 +01:00
Makefile [PATCH] BLOCK: Make it possible to disable the block layer [try #6] 2006-09-30 20:52:31 +02:00
as-iosched.c [PATCH] Allow as-iosched to be unloaded 2006-12-13 13:25:18 +01:00
blktrace.c [PATCH] mark struct file_operations const 3 2007-02-12 09:48:45 -08:00
cfq-iosched.c KMEM_CACHE(): simplify slab cache creation 2007-05-07 12:12:55 -07:00
deadline-iosched.c [BLOCK] Cleanup unused variable passing 2006-12-01 10:42:33 +01:00
elevator.c [PATCH] elevator: elv_list_lock does not need irq disabling 2007-04-30 09:08:17 +02:00
genhd.c remove "struct subsystem" as it is no longer needed 2007-05-02 18:57:59 -07:00
ioctl.c mm: remove destroy_dirty_buffers from invalidate_bdev() 2007-05-07 12:12:55 -07:00
ll_rw_blk.c Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-05-05 13:30:44 -07:00
noop-iosched.c [BLOCK] Cleanup unused variable passing 2006-12-01 10:42:33 +01:00
scsi_ioctl.c [SCSI] sg: cap reserved_size values at max_sectors 2007-04-17 18:09:56 -04:00