Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1237738

Re: [PATCH] storvsc: use small sg_tablesize on x86

From James Bottomley <James.Bottomley@HansenPartnership.com>
Newsgroups linux.kernel
Subject Re: [PATCH] storvsc: use small sg_tablesize on x86
Date 2015-10-01 23:00 +0200
Message-ID <qeT7m-7th-45@gated-at.bofh.it> (permalink)
References <q6o0G-15W-29@gated-at.bofh.it> <qeSNY-71t-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

RE: [PATCH] storvsc: use small sg_tablesize on x86 KY Srinivasan <kys@microsoft.com> - 2015-10-01 22:40 +0200
  Re: [PATCH] storvsc: use small sg_tablesize on x86 James Bottomley <James.Bottomley@HansenPartnership.com> - 2015-10-01 23:00 +0200
    RE: [PATCH] storvsc: use small sg_tablesize on x86 KY Srinivasan <kys@microsoft.com> - 2015-10-01 23:50 +0200
    Re: [PATCH] storvsc: use small sg_tablesize on x86 Olaf Hering <olaf@aepfle.de> - 2015-10-02 19:20 +0200

csiph-web