[PATCH 1/1] UBUNTU: SAUCE: storvsc: use small sg_tablesize on x86
Andy Whitcroft
apw at canonical.com
Fri Oct 16 10:14:55 UTC 2015
On Thu, Oct 15, 2015 at 01:53:12PM -0400, Joseph Salisbury wrote:
> BugLink: http://bugs.launchpad.net/bugs/1495983
>
> OriginalAuthor: Olaf Hering <olaf at aepfle.de>
> Signed-off-by: Joseph Salisbury <joseph.salisbury at canonical.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 3c6584f..8d9c504 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1849,6 +1849,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);
This feels like it could raise the limit if max_transfer_bytes is < than
MAX_MULTIPAGE_BUFFER_COUNT. I rather feel it should be a min(), but if
this is what is being applied upstream ...
-apw
More information about the kernel-team
mailing list