From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zachary Amsden Subject: Re: [PATCH: kvm 4/5] Fix hotremove of CPUs for KVM. Date: Sun, 27 Sep 2009 15:42:47 -1000 Message-ID: <4AC01497.6030309@redhat.com> References: <20090924151049.GB14102@amt.cnet> <1253839640-12695-1-git-send-email-zamsden@redhat.com> <1253839640-12695-2-git-send-email-zamsden@redhat.com> <1253839640-12695-3-git-send-email-zamsden@redhat.com> <1253839640-12695-4-git-send-email-zamsden@redhat.com> <1253839640-12695-5-git-send-email-zamsden@redhat.com> <4ABF2851.5090302@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Marcelo Tosatti To: Avi Kivity Return-path: In-Reply-To: <4ABF2851.5090302@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 09/26/2009 10:54 PM, Avi Kivity wrote: > > First, I'm not sure per_cpu works for possible but not actual cpus. > Second, we now eagerly allocate but lazily free, leading to lots of > ifs and buts. I think the code can be cleaner by eagerly allocating > and eagerly freeing. Eager freeing requires a hotplug remove notification to the arch layer. I had done that originally, but not sure. How does per_cpu() work when defined in a module anyway? The linker magic going on here evades a simple one-minute analysis. Zach