storvsc: use small sg_tablesize on x86
Subsystems (2)
PATCH 1/1 storvsc: use small sg_tablesize on x86
Reducing the sg_tablesize allows booting of 32bit kernels in VMs, after commit be0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6 ("scsi: storvsc: Set the tablesize based on the information given by the host")
[ 5.567138] hv_storvsc vmbus_1: adjusting sg_tablesize 0x800 -> 0x20
--- drivers/scsi/storvsc_drv.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/scsi/storvsc_drv.c +5 -0
@@ -1907,6 +1907,11 @@ static int storvsc_probe(struct hv_device *device,* from the host. */ host->sg_tablesize = (stor_device->max_transfer_bytes >>PAGE_SHIFT ); +#if defined(CONFIG_X86_32 ) +dev_warn (&device->device,"adjusting sg_tablesize 0x%x -> 0x%x" , + host->sg_tablesize,MAX_MULTIPAGE_BUFFER_COUNT ); + host->sg_tablesize =MAX_MULTIPAGE_BUFFER_COUNT ; +#endif /* Register the HBA and start the scsi bus scan */ ret =scsi_add_host (host, &device->device);
Quoted 11 lines
-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Tuesday, September 8, 2015 3:07 AM
To: KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Olaf Hering <[email protected]>
Subject: [PATCH] storvsc: use smallsg_tablesizeon x86
Quoted 7 lines
Reducing the
sg_tablesizeallows booting of 32bit kernels in VMs, after commitbe0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6("scsi: storvsc: Set the tablesize based on the information given by the host")[ 5.567138] hv_storvsc vmbus_1: adjusting sg_tablesize 0x800 -> 0x20Signed-off-by Olaf Hering <[email protected]>
Quoted 22 lines
--- drivers/scsi/storvsc_drv.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/scsi/storvsc_drv.c +5
-0@@ -1907,6 +1907,11 @@ static int storvsc_probe(struct hv_device *device,* from the host. */ host->sg_tablesize = (stor_device->max_transfer_bytes >>PAGE_SHIFT ); +#if defined(CONFIG_X86_32 ) +dev_warn (&device->device,"adjusting sg_tablesize 0x%x -> 0x%x" , + host->sg_tablesize,MAX_MULTIPAGE_BUFFER_COUNT ); + host->sg_tablesize =MAX_MULTIPAGE_BUFFER_COUNT ; +#endif drivers/scsi/storvsc_drv.c +0
-0/* Register the HBA and start the scsi bus scan */ ret =scsi_add_host (host, &device->device);
James Bottomley
maintainerQuoted 22 lines · KY Srinivasan
Quoted 10 lines
-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Tuesday, September 8, 2015 3:07 AM
To: KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Olaf Hering <[email protected]>
Subject: [PATCH] storvsc: use smallsg_tablesizeon x86Quoted 7 lines
Reducing the
sg_tablesizeallows booting of 32bit kernels in VMs, after commitbe0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6("scsi: storvsc: Set the tablesize based on the information given by the host")[ 5.567138] hv_storvsc vmbus_1: adjusting sg_tablesize 0x800 -> 0x20Signed-off-by Olaf Hering <[email protected]>Reviewed-by K. Y. Srinivasan <[email protected]>Quoted 4 lines
--- drivers/scsi/storvsc_drv.c | 5 +++++ 1 file changed, 5 insertions(+)
Quoted 15 lines
Quoted 5 lines
drivers/scsi/storvsc_drv.c +0
-0drivers/scsi/storvsc_drv.c static int storvsc_probe(struct hv_device *device, · line 1916
Quoted 10 lines
drivers/scsi/storvsc_drv.c +5
-0@@ -1907,6 +1907,11 @@ static int storvsc_probe(struct hv_device *device,* from the host. */ host->sg_tablesize = (stor_device->max_transfer_bytes >>PAGE_SHIFT ); +#if defined(CONFIG_X86_32 ) +dev_warn (&device->device,"adjusting sg_tablesize 0x%x -> 0x%x" , + host->sg_tablesize,MAX_MULTIPAGE_BUFFER_COUNT ); + host->sg_tablesize =MAX_MULTIPAGE_BUFFER_COUNT ; +#endif
Um, this is a bit architecture specific (I know Azure is x86, but still). Can you make the define check CONFIG_32BIT rather than CONFIG_X86_32?
James
Quoted 41 lines
-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Thursday, October 1, 2015 1:52 PM
To: KY Srinivasan <[email protected]>
Cc: Olaf Hering <[email protected]>; Haiyang Zhang <[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH] storvsc: use smallsg_tablesizeon x86Quoted 10 lines · KY Srinivasan
Quoted 10 lines
-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Tuesday, September 8, 2015 3:07 AM
To: KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Olaf Hering <[email protected]>
Subject: [PATCH] storvsc: use smallsg_tablesizeon x86Quoted 2 lines
Quoted 2 lines
Reducing the
sg_tablesizeallows booting of 32bit kernels in VMs, after commitbe0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6("scsi: storvsc: Setthe
Quoted 10 lines
Quoted 5 lines
tablesize based on the information given by the host")
[ 5.567138] hv_storvsc vmbus_1: adjusting sg_tablesize 0x800 -> 0x20Signed-off-by Olaf Hering <[email protected]>Reviewed-by K. Y. Srinivasan <[email protected]>Quoted 4 lines
--- drivers/scsi/storvsc_drv.c | 5 +++++ 1 file changed, 5 insertions(+)Quoted 5 lines
drivers/scsi/storvsc_drv.c static int storvsc_probe(struct hv_device
Quoted 5 lines
drivers/scsi/storvsc_drv.c +0
-0@@ -1907,6 +1907,11 @@ static int storvsc_probe(struct hv_device*device,
Quoted 14 lines
Quoted 10 lines
drivers/scsi/storvsc_drv.c static int storvsc_probe(struct hv_device *device, · line 1914
Quoted 10 lines
drivers/scsi/storvsc_drv.c +5
-0* from the host. */ host->sg_tablesize = (stor_device->max_transfer_bytes >>PAGE_SHIFT ); +#if defined(CONFIG_X86_32 ) +dev_warn (&device->device,"adjusting sg_tablesize 0x%x -> 0x%x" , + host->sg_tablesize,MAX_MULTIPAGE_BUFFER_COUNT ); + host->sg_tablesize =MAX_MULTIPAGE_BUFFER_COUNT ; +#endif Um, this is a bit architecture specific (I know Azure is x86, but still). Can you make the define check
CONFIG_32BITrather thanCONFIG_X86_32?
Thanks, will do.
K. Y
Quoted 4 lines
James
Quoted 7 lines · James Bottomley
Quoted 1 line · KY Srinivasan
Quoted 1 line
+#if
defined(CONFIG_X86_32)Um, this is a bit architecture specific (I know Azure is x86, but still). Can you make the define check
CONFIG_32BITrather thanCONFIG_X86_32?
According to arch/x86/Kconfig there is no such thing.
Olaf
Quoted 11 lines · Olaf Hering
Quoted 7 lines · James Bottomley
Quoted 1 line · KY Srinivasan
Quoted 1 line
+#if
defined(CONFIG_X86_32)Um, this is a bit architecture specific (I know Azure is x86, but still). Can you make the define check
CONFIG_32BITrather thanCONFIG_X86_32?According to
arch/x86/Kconfigthere is no such thing.
What is the status of this change? Looks like there is nothing more to do on my side.
Olaf
Quoted 19 lines
-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Monday, January 25, 2016 12:35 AM
To: James Bottomley <[email protected]>
Cc: KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH] storvsc: use smallsg_tablesizeon x86Quoted 6 lines · Olaf Hering
Quoted 3 lines · James Bottomley
Quoted 1 line · KY Srinivasan
Quoted 1 line
+#if
defined(CONFIG_X86_32)
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Um, this is a bit architecture specific (I know Azure is x86, but still). Can you make the define check
CONFIG_32BITrather thanCONFIG_X86_32?According to
arch/x86/Kconfigthere is no such thing.What is the status of this change? Looks like there is nothing more to do on my side.
Olaf,
We do have the config option: CONFIG_X86_64. Perhaps we could use this. Could you resubmit the patch with this change.
Regards,
K. Y
Quoted 2 lines
Olaf
James Bottomley
maintainerQuoted 25 lines · KY Srinivasan
Quoted 25 lines
-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Monday, January 25, 2016 12:35 AM
To: James Bottomley <[email protected]>
Cc: KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH] storvsc: use smallsg_tablesizeon x86Quoted 12 lines · Olaf Hering
Quoted 8 lines · James Bottomley
Quoted 1 line · KY Srinivasan
Quoted 1 line
+#if
defined(CONFIG_X86_32)Um, this is a bit architecture specific (I know Azure is x86, but
still). Can you make the define checkCONFIG_32BITrather thanCONFIG_X86_32?According to
arch/x86/Kconfigthere is no such thing.
Quoted 7 lines
Quoted 2 lines
What is the status of this change? Looks like there is nothing more to do on my side.
Olaf,
We do have the config option:
CONFIG_X86_64. Perhaps we could use this. Could you resubmit the patch with this change.
It's not really architecture independent, is it? Just use the bit width config.
James
Quoted 2 lines · James Bottomley
It's not really architecture independent, is it? Just use the bit width config.
Again: which one? This driver is not for mips|powerpc|score|sh.
Olaf
James Bottomley
maintainerQuoted 6 lines · Olaf Hering
Quoted 2 lines · James Bottomley
It's not really architecture independent, is it? Just use the bit width config.
Again: which one? This driver is not for mips|powerpc|score|sh.
zgrep CONFIG_.*BIT /proc/config.gz
[...]CONFIG_64BIT=y
James
Quoted 17 lines
-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Thursday, January 28, 2016 7:37 AM
To: Olaf Hering <[email protected]>
Cc: KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH] storvsc: use smallsg_tablesizeon x86Quoted 5 lines · Olaf Hering
Quoted 2 lines · James Bottomley
It's not really architecture independent, is it? Just use the bit width config.
Quoted 7 lines
Quoted 1 line
Again: which one? This driver is not for mips|powerpc|score|sh.
zgrep CONFIG_.*BIT
/proc/config.gz
[...]CONFIG_64BIT=yJames
Olaf,
Would you be resubmitting this patch?
Thanks,
K. Y