Re: [patch,v2 05/10] sd: use alloc_disk_node

2012-11-05 Thread Jeff Moyer
Bart Van Assche bvanass...@acm.org writes:

 On 11/02/12 22:45, Jeff Moyer wrote:
 Signed-off-by: Jeff Moyer jmo...@redhat.com
 ---
   drivers/scsi/sd.c |2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
 index 12f6fdf..8deb915 100644
 --- a/drivers/scsi/sd.c
 +++ b/drivers/scsi/sd.c
 @@ -2714,7 +2714,7 @@ static int sd_probe(struct device *dev)
  if (!sdkp)
  goto out;

 -gd = alloc_disk(SD_MINORS);
 +gd = alloc_disk_node(SD_MINORS, dev_to_node(dev));
  if (!gd)
  goto out_free;

 shost-numa_node can be another NUMA node than dev_to_node(dev). Have
 you considered using shost-numa_node here ?

It can?  How?

Just so I'm clear, you're suggesting I use the scsi_device's host
pointer to get to the Scsi_Host, and that *will* be filled in that this
point, right?

Cheers,
Jeff
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch,v2 05/10] sd: use alloc_disk_node

2012-11-05 Thread Bart Van Assche

On 11/05/12 15:12, Jeff Moyer wrote:

Bart Van Assche bvanass...@acm.org writes:


On 11/02/12 22:45, Jeff Moyer wrote:

Signed-off-by: Jeff Moyer jmo...@redhat.com
---
   drivers/scsi/sd.c |2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 12f6fdf..8deb915 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2714,7 +2714,7 @@ static int sd_probe(struct device *dev)
if (!sdkp)
goto out;

-   gd = alloc_disk(SD_MINORS);
+   gd = alloc_disk_node(SD_MINORS, dev_to_node(dev));
if (!gd)
goto out_free;


shost-numa_node can be another NUMA node than dev_to_node(dev). Have
you considered using shost-numa_node here ?


It can?  How?


E.g. if the LLD allows the user to specify the value of numa_node and 
passes that value to scsi_host_alloc_node() (see also 
http://lkml.org/lkml/2012/10/23/477 for further information).



Just so I'm clear, you're suggesting I use the scsi_device's host
pointer to get to the Scsi_Host, and that *will* be filled in that this
point, right?


As far as I can see the sdev-host pointer is set in scsi_alloc_sdev() 
and that happens before sd_probe() is invoked.


Bart.

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch,v2 05/10] sd: use alloc_disk_node

2012-11-05 Thread taco

On 11/05/2012 10:57 PM, Bart Van Assche wrote:

On 11/05/12 15:12, Jeff Moyer wrote:

Bart Van Assche bvanass...@acm.org writes:


On 11/02/12 22:45, Jeff Moyer wrote:

Signed-off-by: Jeff Moyer jmo...@redhat.com
---
   drivers/scsi/sd.c |2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 12f6fdf..8deb915 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2714,7 +2714,7 @@ static int sd_probe(struct device *dev)
   if (!sdkp)
   goto out;

-gd = alloc_disk(SD_MINORS);
+gd = alloc_disk_node(SD_MINORS, dev_to_node(dev));
   if (!gd)
   goto out_free;


shost-numa_node can be another NUMA node than dev_to_node(dev). Have
you considered using shost-numa_node here ?


It can?  How?


E.g. if the LLD allows the user to specify the value of numa_node and 
passes that value to scsi_host_alloc_node() (see also 
http://lkml.org/lkml/2012/10/23/477 for further information).



Just so I'm clear, you're suggesting I use the scsi_device's host
pointer to get to the Scsi_Host, and that *will* be filled in that this
point, right?


As far as I can see the sdev-host pointer is set in scsi_alloc_sdev() 
and that happens before sd_probe() is invoked.



yes, struct scsi_device was created before sd, sd is the top layer.

Bart.

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html




--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch,v2 05/10] sd: use alloc_disk_node

2012-11-03 Thread Bart Van Assche

On 11/02/12 22:45, Jeff Moyer wrote:

Signed-off-by: Jeff Moyer jmo...@redhat.com
---
  drivers/scsi/sd.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 12f6fdf..8deb915 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2714,7 +2714,7 @@ static int sd_probe(struct device *dev)
if (!sdkp)
goto out;

-   gd = alloc_disk(SD_MINORS);
+   gd = alloc_disk_node(SD_MINORS, dev_to_node(dev));
if (!gd)
goto out_free;


shost-numa_node can be another NUMA node than dev_to_node(dev). Have 
you considered using shost-numa_node here ?


Bart.

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch,v2 05/10] sd: use alloc_disk_node

2012-11-02 Thread Jeff Moyer

Signed-off-by: Jeff Moyer jmo...@redhat.com
---
 drivers/scsi/sd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 12f6fdf..8deb915 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2714,7 +2714,7 @@ static int sd_probe(struct device *dev)
if (!sdkp)
goto out;
 
-   gd = alloc_disk(SD_MINORS);
+   gd = alloc_disk_node(SD_MINORS, dev_to_node(dev));
if (!gd)
goto out_free;
 
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html