summaryrefslogtreecommitdiffstats
path: root/drivers/xen/gntdev.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2016-05-09 11:59:48 +0200
committerDavid Vrabel <david.vrabel@citrix.com>2016-05-24 13:58:17 +0200
commit36ae220aa62d382a8bacbf7ec080d9d36a2b4d49 (patch)
tree16cc6a9a504a130ffe9e3ab4926e19db7db38e68 /drivers/xen/gntdev.c
parentxen/x86: don't lose event interrupts (diff)
downloadlinux-36ae220aa62d382a8bacbf7ec080d9d36a2b4d49.tar.xz
linux-36ae220aa62d382a8bacbf7ec080d9d36a2b4d49.zip
xen/gntdev: reduce copy batch size to 16
IOCTL_GNTDEV_GRANT_COPY batches copy operations to reduce the number of hypercalls. The stack is used to avoid a memory allocation in a hot path. However, a batch size of 24 requires more than 1024 bytes of stack which in some configurations causes a compiler warning. xen/gntdev.c: In function ‘gntdev_ioctl_grant_copy’: xen/gntdev.c:949:1: warning: the frame size of 1248 bytes is larger than 1024 bytes [-Wframe-larger-than=] This is a harmless warning as there is still plenty of stack spare, but people keep trying to "fix" it. Reduce the batch size to 16 to reduce stack usage to less than 1024 bytes. This should have minimal impact on performance. Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to '')
-rw-r--r--drivers/xen/gntdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index dc495383ad73..67939578cd6d 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -748,7 +748,7 @@ static long gntdev_ioctl_notify(struct gntdev_priv *priv, void __user *u)
return rc;
}
-#define GNTDEV_COPY_BATCH 24
+#define GNTDEV_COPY_BATCH 16
struct gntdev_copy_batch {
struct gnttab_copy ops[GNTDEV_COPY_BATCH];