From mboxrd@z Thu Jan 1 00:00:00 1970 From: david ahern Subject: Re: soft lockup in kvm_flush_remote_tlbs Date: Thu, 25 Oct 2007 12:34:03 -0600 Message-ID: <4720E19B.20802@cisco.com> References: <471FCEA6.6000903@cisco.com> <47203BEB.9070509@qumranet.com> <47209A77.3090503@cisco.com> <47209E23.8080808@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Avi Kivity Return-path: In-Reply-To: <47209E23.8080808-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 The issue appears to be with the RHEL5 kernel (host OS is rhel5). I tried your suggestions below -- no effect; still hit the softlockup. I then moved the host to the 2.6.23.1 kernel but with the kvm-48 code base. Surprisingly, I had no issues starting my guest with '-smp 4'. david Avi Kivity wrote: > > No, it looks like the problem is indeed in kvm_flush_remote_tlbs(), and > not a corruption elsewhere. > > Things to check: > > - whether cpus_weight(mask) == needed > - whether wrapping the whole thing in preempt_disable()/preempt_enable() > helps > > hey! I see a bug! > >> continue; >> cpu = vcpu->cpu; >> if (cpu != -1 && cpu != raw_smp_processor_id()) >> if (!cpu_isset(cpu, cpus)) { >> cpu_set(cpu, cpus); >> ++needed; >> } >> } >> > > vcpu->cpu can change during execution if this snippet due to a vcpu > being migrated concurrently with this being executed. Since the > compiler is free to reload 'cpu' from 'vcpu->cpu', the code can operate > on corrupted data. > > A 'barrier();' after 'cpu = vcpu->cpu;' should fix it, if this is indeed > the bug. ------------------------------------------------------------------------- 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/