mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
pmem, memremap: convert to numa aware allocations
Given that pmem ranges come with numa-locality hints, arrange for the resulting driver objects to be obtained from node-local memory. Reviewed-by: Tejun Heo <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
7eff93b7c9
commit
538ea4aa44
2 changed files with 7 additions and 5 deletions
|
|
@ -176,9 +176,10 @@ static void pmem_detach_disk(struct pmem_device *pmem)
|
|||
static int pmem_attach_disk(struct device *dev,
|
||||
struct nd_namespace_common *ndns, struct pmem_device *pmem)
|
||||
{
|
||||
int nid = dev_to_node(dev);
|
||||
struct gendisk *disk;
|
||||
|
||||
pmem->pmem_queue = blk_alloc_queue(GFP_KERNEL);
|
||||
pmem->pmem_queue = blk_alloc_queue_node(GFP_KERNEL, nid);
|
||||
if (!pmem->pmem_queue)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -188,7 +189,7 @@ static int pmem_attach_disk(struct device *dev,
|
|||
blk_queue_bounce_limit(pmem->pmem_queue, BLK_BOUNCE_ANY);
|
||||
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, pmem->pmem_queue);
|
||||
|
||||
disk = alloc_disk(0);
|
||||
disk = alloc_disk_node(0, nid);
|
||||
if (!disk) {
|
||||
blk_cleanup_queue(pmem->pmem_queue);
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in a new issue