Message ID | 1441706801-15300-1-git-send-email-olaf@aepfle.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
> -----Original Message----- > From: Olaf Hering [mailto:olaf@aepfle.de] > Sent: Tuesday, September 8, 2015 3:07 AM > To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang > <haiyangz@microsoft.com>; JBottomley@odin.com > Cc: linux-kernel@vger.kernel.org; linux-scsi@vger.kernel.org; Olaf Hering > <olaf@aepfle.de> > Subject: [PATCH] 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 > > Signed-off-by: Olaf Hering <olaf@aepfle.de> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> > --- > drivers/scsi/storvsc_drv.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c > index 40c43ae..36bf183 100644 > --- a/drivers/scsi/storvsc_drv.c > +++ b/drivers/scsi/storvsc_drv.c > @@ -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); -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2015-10-01 at 20:30 +0000, KY Srinivasan wrote: > > > -----Original Message----- > > From: Olaf Hering [mailto:olaf@aepfle.de] > > Sent: Tuesday, September 8, 2015 3:07 AM > > To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang > > <haiyangz@microsoft.com>; JBottomley@odin.com > > Cc: linux-kernel@vger.kernel.org; linux-scsi@vger.kernel.org; Olaf Hering > > <olaf@aepfle.de> > > Subject: [PATCH] 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 > > > > Signed-off-by: Olaf Hering <olaf@aepfle.de> > Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> > > --- > > drivers/scsi/storvsc_drv.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c > > index 40c43ae..36bf183 100644 > > --- a/drivers/scsi/storvsc_drv.c > > +++ b/drivers/scsi/storvsc_drv.c > > @@ -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 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogSmFtZXMgQm90dG9tbGV5 IFttYWlsdG86SmFtZXMuQm90dG9tbGV5Q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HN0cnVjdCBodl9kZXZpY2UNCj4gKmRldmljZSwNCj4gPiA+ICAJICogZnJvbSB0aGUgaG9zdC4N Cj4gPiA+ICAJICovDQo+ID4gPiAgCWhvc3QtPnNnX3RhYmxlc2l6ZSA9IChzdG9yX2RldmljZS0+ bWF4X3RyYW5zZmVyX2J5dGVzID4+DQo+ID4gPiBQQUdFX1NISUZUKTsNCj4gPiA+ICsjaWYgZGVm aW5lZChDT05GSUdfWDg2XzMyKQ0KPiA+ID4gKwlkZXZfd2FybigmZGV2aWNlLT5kZXZpY2UsICJh ZGp1c3Rpbmcgc2dfdGFibGVzaXplIDB4JXggLT4gMHgleCIsDQo+ID4gPiArCQkJaG9zdC0+c2df dGFibGVzaXplLA0KPiA+ID4gTUFYX01VTFRJUEFHRV9CVUZGRVJfQ09VTlQpOw0KPiA+ID4gKwlo b3N0LT5zZ190YWJsZXNpemUgPSBNQVhfTVVMVElQQUdFX0JVRkZFUl9DT1VOVDsNCj4gPiA+ICsj ZW5kaWYNCj4gDQo+IFVtLCB0aGlzIGlzIGEgYml0IGFyY2hpdGVjdHVyZSBzcGVjaWZpYyAoSSBr bm93IEF6dXJlIGlzIHg4NiwgYnV0DQo+IHN0aWxsKS4gIENhbiB5b3UgbWFrZSB0aGUgZGVmaW5l IGNoZWNrIENPTkZJR18zMkJJVCByYXRoZXIgdGhhbg0KPiBDT05GSUdfWDg2XzMyPw0KDQpUaGFu a3MsIHdpbGwgZG8uDQoNCksuIFkNCj4gDQo+IEphbWVzDQo+IA0KPiANCg0K -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Oct 01, James Bottomley wrote: > On Thu, 2015-10-01 at 20:30 +0000, KY Srinivasan wrote: > > > +#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_32BIT rather than > CONFIG_X86_32? According to arch/x86/Kconfig there is no such thing. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Oct 02, Olaf Hering wrote: > On Thu, Oct 01, James Bottomley wrote: > > > On Thu, 2015-10-01 at 20:30 +0000, KY Srinivasan wrote: > > > > > +#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_32BIT rather than > > CONFIG_X86_32? > > According to arch/x86/Kconfig there is no such thing. What is the status of this change? Looks like there is nothing more to do on my side. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> -----Original Message----- > From: Olaf Hering [mailto:olaf@aepfle.de] > Sent: Monday, January 25, 2016 12:35 AM > To: James Bottomley <James.Bottomley@HansenPartnership.com> > Cc: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang > <haiyangz@microsoft.com>; linux-kernel@vger.kernel.org; linux- > scsi@vger.kernel.org > Subject: Re: [PATCH] storvsc: use small sg_tablesize on x86 > > On Fri, Oct 02, Olaf Hering wrote: > > > On Thu, Oct 01, James Bottomley wrote: > > > > > On Thu, 2015-10-01 at 20:30 +0000, KY Srinivasan wrote: > > > > > > > +#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_32BIT rather than > > > CONFIG_X86_32? > > > > According to arch/x86/Kconfig there 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 > > Olaf
On Wed, 2016-01-27 at 23:09 +0000, KY Srinivasan wrote: > > > -----Original Message----- > > From: Olaf Hering [mailto:olaf@aepfle.de] > > Sent: Monday, January 25, 2016 12:35 AM > > To: James Bottomley <James.Bottomley@HansenPartnership.com> > > Cc: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang > > <haiyangz@microsoft.com>; linux-kernel@vger.kernel.org; linux- > > scsi@vger.kernel.org > > Subject: Re: [PATCH] storvsc: use small sg_tablesize on x86 > > > > On Fri, Oct 02, Olaf Hering wrote: > > > > > On Thu, Oct 01, James Bottomley wrote: > > > > > > > On Thu, 2015-10-01 at 20:30 +0000, KY Srinivasan wrote: > > > > > > > > > +#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_32BIT rather than > > > > CONFIG_X86_32? > > > > > > According to arch/x86/Kconfig there 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. It's not really architecture independent, is it? Just use the bit width config. James -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Jan 27, James Bottomley wrote: > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2016-01-28 at 07:48 +0100, Olaf Hering wrote: > On Wed, Jan 27, James Bottomley wrote: > > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> -----Original Message----- > From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com] > Sent: Thursday, January 28, 2016 7:37 AM > To: Olaf Hering <olaf@aepfle.de> > Cc: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang > <haiyangz@microsoft.com>; linux-kernel@vger.kernel.org; linux- > scsi@vger.kernel.org > Subject: Re: [PATCH] storvsc: use small sg_tablesize on x86 > > On Thu, 2016-01-28 at 07:48 +0100, Olaf Hering wrote: > > On Wed, Jan 27, James Bottomley wrote: > > > > > 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 Olaf, Would you be resubmitting this patch? Thanks, K. Y
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 40c43ae..36bf183 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -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);
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 Signed-off-by: Olaf Hering <olaf@aepfle.de> --- drivers/scsi/storvsc_drv.c | 5 +++++ 1 file changed, 5 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html