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 /drivers/block/as-iosched.c | |
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 'drivers/block/as-iosched.c')
-rw-r--r-- | drivers/block/as-iosched.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/as-iosched.c b/drivers/block/as-iosched.c index 638db06de2be..3410b4d294b9 100644 --- a/drivers/block/as-iosched.c +++ b/drivers/block/as-iosched.c | |||
@@ -1871,20 +1871,22 @@ static int as_init_queue(request_queue_t *q, elevator_t *e) | |||
1871 | if (!arq_pool) | 1871 | if (!arq_pool) |
1872 | return -ENOMEM; | 1872 | return -ENOMEM; |
1873 | 1873 | ||
1874 | ad = kmalloc(sizeof(*ad), GFP_KERNEL); | 1874 | ad = kmalloc_node(sizeof(*ad), GFP_KERNEL, q->node); |
1875 | if (!ad) | 1875 | if (!ad) |
1876 | return -ENOMEM; | 1876 | return -ENOMEM; |
1877 | memset(ad, 0, sizeof(*ad)); | 1877 | memset(ad, 0, sizeof(*ad)); |
1878 | 1878 | ||
1879 | ad->q = q; /* Identify what queue the data belongs to */ | 1879 | ad->q = q; /* Identify what queue the data belongs to */ |
1880 | 1880 | ||
1881 | ad->hash = kmalloc(sizeof(struct list_head)*AS_HASH_ENTRIES,GFP_KERNEL); | 1881 | ad->hash = kmalloc_node(sizeof(struct list_head)*AS_HASH_ENTRIES, |
1882 | GFP_KERNEL, q->node); | ||
1882 | if (!ad->hash) { | 1883 | if (!ad->hash) { |
1883 | kfree(ad); | 1884 | kfree(ad); |
1884 | return -ENOMEM; | 1885 | return -ENOMEM; |
1885 | } | 1886 | } |
1886 | 1887 | ||
1887 | ad->arq_pool = mempool_create(BLKDEV_MIN_RQ, mempool_alloc_slab, mempool_free_slab, arq_pool); | 1888 | ad->arq_pool = mempool_create_node(BLKDEV_MIN_RQ, mempool_alloc_slab, |
1889 | mempool_free_slab, arq_pool, q->node); | ||
1888 | if (!ad->arq_pool) { | 1890 | if (!ad->arq_pool) { |
1889 | kfree(ad->hash); | 1891 | kfree(ad->hash); |
1890 | kfree(ad); | 1892 | kfree(ad); |