diff options
author | Christoph Lameter <christoph@lameter.com> | 2005-06-23 03:08:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-23 12:45:09 -0400 |
commit | 1946089a109251655c5438d92c539bd2930e71ea (patch) | |
tree | 819a492d5a7c4e6e695b150a86abeb99d5ac46eb /include/linux | |
parent | 8c5a09082f4e61a176382e96a831a0636b918602 (diff) |
[PATCH] NUMA aware block device control structure allocation
Patch to allocate the control structures for for ide devices on the node of
the device itself (for NUMA systems). The patch depends on the Slab API
change patch by Manfred and me (in mm) and the pcidev_to_node patch that I
posted today.
Does some realignment too.
Signed-off-by: Justin M. Forbes <jmforbes@linuxtx.org>
Signed-off-by: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Pravin Shelar <pravin@calsoftinc.com>
Signed-off-by: Shobhit Dayal <shobhit@calsoftinc.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/blkdev.h | 6 | ||||
-rw-r--r-- | include/linux/genhd.h | 1 | ||||
-rw-r--r-- | include/linux/ide.h | 2 | ||||
-rw-r--r-- | include/linux/mempool.h | 11 |
4 files changed, 15 insertions, 5 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4a99b76c5a33..235c3414d268 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -396,6 +396,7 @@ struct request_queue | |||
396 | */ | 396 | */ |
397 | unsigned int sg_timeout; | 397 | unsigned int sg_timeout; |
398 | unsigned int sg_reserved_size; | 398 | unsigned int sg_reserved_size; |
399 | int node; | ||
399 | 400 | ||
400 | struct list_head drain_list; | 401 | struct list_head drain_list; |
401 | 402 | ||
@@ -615,6 +616,8 @@ static inline void blkdev_dequeue_request(struct request *req) | |||
615 | /* | 616 | /* |
616 | * Access functions for manipulating queue properties | 617 | * Access functions for manipulating queue properties |
617 | */ | 618 | */ |
619 | extern request_queue_t *blk_init_queue_node(request_fn_proc *rfn, | ||
620 | spinlock_t *lock, int node_id); | ||
618 | extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *); | 621 | extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *); |
619 | extern void blk_cleanup_queue(request_queue_t *); | 622 | extern void blk_cleanup_queue(request_queue_t *); |
620 | extern void blk_queue_make_request(request_queue_t *, make_request_fn *); | 623 | extern void blk_queue_make_request(request_queue_t *, make_request_fn *); |
@@ -646,7 +649,8 @@ extern void blk_wait_queue_drained(request_queue_t *, int); | |||
646 | extern void blk_finish_queue_drain(request_queue_t *); | 649 | extern void blk_finish_queue_drain(request_queue_t *); |
647 | 650 | ||
648 | int blk_get_queue(request_queue_t *); | 651 | int blk_get_queue(request_queue_t *); |
649 | request_queue_t *blk_alloc_queue(int); | 652 | request_queue_t *blk_alloc_queue(int gfp_mask); |
653 | request_queue_t *blk_alloc_queue_node(int,int); | ||
650 | #define blk_put_queue(q) blk_cleanup_queue((q)) | 654 | #define blk_put_queue(q) blk_cleanup_queue((q)) |
651 | 655 | ||
652 | /* | 656 | /* |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 47dedaf971d6..af26dc718ef6 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -403,6 +403,7 @@ extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | |||
403 | extern void add_partition(struct gendisk *, int, sector_t, sector_t); | 403 | extern void add_partition(struct gendisk *, int, sector_t, sector_t); |
404 | extern void delete_partition(struct gendisk *, int); | 404 | extern void delete_partition(struct gendisk *, int); |
405 | 405 | ||
406 | extern struct gendisk *alloc_disk_node(int minors, int node_id); | ||
406 | extern struct gendisk *alloc_disk(int minors); | 407 | extern struct gendisk *alloc_disk(int minors); |
407 | extern struct kobject *get_disk(struct gendisk *disk); | 408 | extern struct kobject *get_disk(struct gendisk *disk); |
408 | extern void put_disk(struct gendisk *disk); | 409 | extern void put_disk(struct gendisk *disk); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 336d6e509f59..92129078d4f3 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -917,7 +917,7 @@ typedef struct hwif_s { | |||
917 | unsigned dma; | 917 | unsigned dma; |
918 | 918 | ||
919 | void (*led_act)(void *data, int rw); | 919 | void (*led_act)(void *data, int rw); |
920 | } ide_hwif_t; | 920 | } ____cacheline_maxaligned_in_smp ide_hwif_t; |
921 | 921 | ||
922 | /* | 922 | /* |
923 | * internal ide interrupt handler type | 923 | * internal ide interrupt handler type |
diff --git a/include/linux/mempool.h b/include/linux/mempool.h index 4a36edf1c974..796220ce47cc 100644 --- a/include/linux/mempool.h +++ b/include/linux/mempool.h | |||
@@ -20,9 +20,14 @@ typedef struct mempool_s { | |||
20 | mempool_free_t *free; | 20 | mempool_free_t *free; |
21 | wait_queue_head_t wait; | 21 | wait_queue_head_t wait; |
22 | } mempool_t; | 22 | } mempool_t; |
23 | extern mempool_t * mempool_create(int min_nr, mempool_alloc_t *alloc_fn, | 23 | |
24 | mempool_free_t *free_fn, void *pool_data); | 24 | extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, |
25 | extern int mempool_resize(mempool_t *pool, int new_min_nr, unsigned int __nocast gfp_mask); | 25 | mempool_free_t *free_fn, void *pool_data); |
26 | extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, | ||
27 | mempool_free_t *free_fn, void *pool_data, int nid); | ||
28 | |||
29 | extern int mempool_resize(mempool_t *pool, int new_min_nr, | ||
30 | unsigned int __nocast gfp_mask); | ||
26 | extern void mempool_destroy(mempool_t *pool); | 31 | extern void mempool_destroy(mempool_t *pool); |
27 | extern void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask); | 32 | extern void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask); |
28 | extern void mempool_free(void *element, mempool_t *pool); | 33 | extern void mempool_free(void *element, mempool_t *pool); |