Re: [PATCH 1/4] reduce kvm stack usage in kvm_arch_vm_ioctl()
- From: Avi Kivity <avi@xxxxxxxxxxxx>
- Date: Tue, 12 Aug 2008 16:00:08 +0300
Dave Hansen wrote:
On my machine with gcc 3.4, kvm uses ~2k of stack in a few
select functions. This is mostly because gcc fails to
notice that the different case: statements could have their
stack usage combined. It overflows very nicely if interrupts
happen during one of these large uses.
This patch uses two methods for reducing stack usage.
1. dynamically allocate large objects instead of putting
on the stack.
2. Use a union{} member for all of the case variables. This
tricks gcc into combining them all into a single stack
allocation. (There's also a comment on this)
Applied all, thanks.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH 1/4] reduce kvm stack usage in kvm_arch_vm_ioctl()
- From: Dave Hansen
- [PATCH 1/4] reduce kvm stack usage in kvm_arch_vm_ioctl()
- Prev by Date: Re: RFC: I/O bandwidth controller
- Next by Date: Re: [PATCH] WATCHDOG: don't auto-grab eurotechwdt.
- Previous by thread: [PATCH 3/4] reduce stack usage in kvm_arch_vcpu_ioctl()
- Next by thread: lirc drivers out of tree forever?
- Index(es):