From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [PATCH 1/4] reduce kvm stack usage in kvm_arch_vm_ioctl() Date: Mon, 28 Jul 2008 11:52:00 -0700 Message-ID: <1217271120.23502.17.camel@nimitz> References: <1217268909-13349-1-git-send-email-dave@linux.vnet.ibm.com> <488E1416.9040000@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Avi Kivity , kvm-devel To: Anthony Liguori Return-path: Received: from e31.co.us.ibm.com ([32.97.110.149]:46264 "EHLO e31.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755388AbYG1SwH (ORCPT ); Mon, 28 Jul 2008 14:52:07 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e31.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m6SIq5HR021443 for ; Mon, 28 Jul 2008 14:52:05 -0400 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m6SIq2m9032552 for ; Mon, 28 Jul 2008 12:52:04 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m6SIq1o9008075 for ; Mon, 28 Jul 2008 12:52:01 -0600 In-Reply-To: <488E1416.9040000@us.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 2008-07-28 at 13:46 -0500, Anthony Liguori wrote: > Tricking gcc seems like a bad thing to me. Who knows what crazy thing > GCC is going to do in the future. > > Why not just kmalloc() these things? Is kmalloc really that slow? In this case, I the kmalloc() just looked worse. I think there were more than 2 uses for each of those structures, and we would have needed a kmalloc() for every use. Those ioctl()s are hard enough to read as it is. :) It wasn't for speed in this case, at least. -- Dave