* Re: [PATCH] drivers/vhost/scsi.c: avoid a 10-order allocation
[not found] ` <20130818091838.GB17111@redhat.com>
@ 2013-09-04 9:02 ` Michael S. Tsirkin
2013-09-04 9:27 ` Dan Aloni
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2013-09-04 9:02 UTC (permalink / raw)
To: Dan Aloni; +Cc: kvm, virtualization
On Sun, Aug 18, 2013 at 12:18:38PM +0300, Michael S. Tsirkin wrote:
> On Sun, Aug 18, 2013 at 11:48:56AM +0300, Dan Aloni wrote:
> > On 3.10.7 and x86_64, as a result of sizeof(struct vhost_scsi) being
> > 2152960 bytes the allocation failed once on my development machine.
> >
> > Saw it would be prudent to split the bulk of it, which is the vqs array
> > into separately allocated parts. sizeof(struct vhost_virtqueue) is
> > currently 16816 bytes.
> >
> > Signed-off-by: Dan Aloni <alonid@stratoscale.com>
>
> This extra indirection is likely to have measureable cost though.
>
> net core saw a similar problem, it was fixed in patch
> net: allow large number of tx queues
>
> So let's do it in a similar way: try to allocate with
> GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT
> and if that fails, do vmalloc.
>
> To free, we can do
> if (is_vmalloc_addr())
> vfree();
> else
> kfree();
>
>
Hi Dan,
were you going to make this change? Or prefer me to do it?
--
MST
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers/vhost/scsi.c: avoid a 10-order allocation
2013-09-04 9:02 ` [PATCH] drivers/vhost/scsi.c: avoid a 10-order allocation Michael S. Tsirkin
@ 2013-09-04 9:27 ` Dan Aloni
0 siblings, 0 replies; 2+ messages in thread
From: Dan Aloni @ 2013-09-04 9:27 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: kvm, virtualization
On Wed, Sep 04, 2013 at 12:02:01PM +0300, Michael S. Tsirkin wrote:
> On Sun, Aug 18, 2013 at 12:18:38PM +0300, Michael S. Tsirkin wrote:
> > On Sun, Aug 18, 2013 at 11:48:56AM +0300, Dan Aloni wrote:
> > > On 3.10.7 and x86_64, as a result of sizeof(struct vhost_scsi) being
> > > 2152960 bytes the allocation failed once on my development machine.
> > >
> > > Saw it would be prudent to split the bulk of it, which is the vqs array
> > > into separately allocated parts. sizeof(struct vhost_virtqueue) is
> > > currently 16816 bytes.
> > >
> > > Signed-off-by: Dan Aloni <alonid@stratoscale.com>
> >
> > This extra indirection is likely to have measureable cost though.
> >
> > net core saw a similar problem, it was fixed in patch
> > net: allow large number of tx queues
> >
> > So let's do it in a similar way: try to allocate with
> > GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT
> > and if that fails, do vmalloc.
> >
> > To free, we can do
> > if (is_vmalloc_addr())
> > vfree();
> > else
> > kfree();
> >
> >
>
> Hi Dan,
> were you going to make this change? Or prefer me to do it?
Hey Michael,
I prefer you go ahead and do as your suggestion. I got distracted with
other matters in the meanwhile.
--
Dan Aloni
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-04 9:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1376815736-21003-1-git-send-email-alonid@stratoscale.com>
[not found] ` <20130818091838.GB17111@redhat.com>
2013-09-04 9:02 ` [PATCH] drivers/vhost/scsi.c: avoid a 10-order allocation Michael S. Tsirkin
2013-09-04 9:27 ` Dan Aloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox