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


Groups > linux.kernel > #1312297

Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch on stack

From David Vrabel <david.vrabel@citrix.com>
Newsgroups linux.kernel
Subject Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch on stack
Date 2016-01-19 15:40 +0100
Message-ID <qSFBU-HG-17@gated-at.bofh.it> (permalink)
References <qRixI-2cl-21@gated-at.bofh.it> <qSg0N-8k6-5@gated-at.bofh.it> <qSFBU-HG-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 19/01/16 14:26, Boris Ostrovsky wrote:
> On 01/18/2016 06:11 AM, David Vrabel wrote:
>> On 15/01/16 19:43, Boris Ostrovsky wrote:
>>> struct gntdev_copy_batch is over 1300 bytes in size, we shouldn't
>>> put it on stack.
>>>
>>> Some compilers (e.g. 5.2.1) complain:
>>>   drivers/xen/gntdev.c: In function ‘gntdev_ioctl_grant_copy.isra.5’:
>>>   drivers/xen/gntdev.c:949:1: warning: the frame size of 1416 bytes
>>>    is larger than 1024 bytes [-Wframe-larger-than=]
>> I thought I'd already reduced the size of this enough (from a batch size
>> of 32 to 24) but this obviously isn't enough for 64-bit platforms.
>>
>> In the absence of any performance data on the best approach I would
>> prefer just reducing the batch size to 16.
> 
> That would still leave us with over 900 bytes on the stack which I think
> is rather high.

The stack depth to here isn't very deep, so I think even the ~1500 byte
frame was fine.

> Do we expect this ioctl to be on some sort of a hot path?

Yes.

David

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


Thread

[PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch on stack Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-01-15 20:50 +0100
  Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct  gntdev_copy_batch on stack Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-01-15 21:00 +0100
  Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct  gntdev_copy_batch on stack Andrew Cooper <andrew.cooper3@citrix.com> - 2016-01-15 21:00 +0100
  Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch  on stack David Vrabel <david.vrabel@citrix.com> - 2016-01-18 12:20 +0100
    Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct  gntdev_copy_batch on stack David Vrabel <david.vrabel@citrix.com> - 2016-01-19 15:40 +0100
    Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct  gntdev_copy_batch on stack Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-01-19 15:40 +0100

csiph-web