From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755723AbcASObW (ORCPT ); Tue, 19 Jan 2016 09:31:22 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:51151 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753920AbcASObQ (ORCPT ); Tue, 19 Jan 2016 09:31:16 -0500 Subject: Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch on stack To: David Vrabel , konrad.wilk@oracle.com References: <1452887025-27285-1-git-send-email-boris.ostrovsky@oracle.com> <569CC84A.1000401@citrix.com> Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org From: Boris Ostrovsky Message-ID: <569E4784.10602@oracle.com> Date: Tue, 19 Jan 2016 09:26:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <569CC84A.1000401@citrix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Do we expect this ioctl to be on some sort of a hot path? -boris