From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: [PATCH] kvm uses smp_call_function_mask() in kvm_flush_remote_tlbs() Date: Tue, 23 Oct 2007 13:50:58 +0200 Message-ID: <471DE022.1050600@de.ibm.com> References: <11930635871488-git-send-email-Laurent.Vivier@bull.net> <471CCEC8.9060200@de.ibm.com> <471CD876.5020404@qumranet.com> Reply-To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org, Laurent Vivier , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Avi Kivity Return-path: In-Reply-To: <471CD876.5020404-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: > A cpu unplug first evicts all tasks from the victim cpu. During this > process, it calls kvm via a hotplug notifier, which notifier calls > vcpu_clear() for all vcpus that are resident on that cpu. So after it > runs, there won't be any vcpus on the dead cpu. > > The notifier is called from within stop_machine_run(), which ensures > that no task is running on any cpu, so by the time the cpu is being > unplugged, any concurrent call to kvm_flush_remote_tlbs() will have ended. > > It's a miracle that it works. Really interresting. I put it on the "neat code I want to read" list for long and dark winter evenings :-). ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/