linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>, <konrad.wilk@oracle.com>
Cc: <xen-devel@lists.xenproject.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch on stack
Date: Tue, 19 Jan 2016 14:31:03 +0000	[thread overview]
Message-ID: <569E48A7.8060408@citrix.com> (raw)
In-Reply-To: <569E4784.10602@oracle.com>

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

      reply	other threads:[~2016-01-19 14:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 19:43 [PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch on stack Boris Ostrovsky
2016-01-15 19:50 ` [Xen-devel] " Andrew Cooper
2016-01-15 19:53   ` Boris Ostrovsky
2016-01-18 11:11 ` David Vrabel
2016-01-19 14:26   ` Boris Ostrovsky
2016-01-19 14:31     ` David Vrabel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=569E48A7.8060408@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).