From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: [PATCH kvm-unit-tests v2 0/2] arm/arm64: smp: on_cpu improvements Date: Fri, 2 Jun 2017 17:31:07 +0200 Message-ID: <20170602153109.2904-1-drjones@redhat.com> Cc: pbonzini@redhat.com, rkrcmar@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49960 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751153AbdFBPbO (ORCPT ); Fri, 2 Jun 2017 11:31:14 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 11EBD334592 for ; Fri, 2 Jun 2017 15:31:14 +0000 (UTC) Sender: kvm-owner@vger.kernel.org List-ID: After posting on_cpu() support yesterday I thought of some potential issues. 1) cpu0 was the only cpu allowed to call on_cpus, and no cpu was allowed to call on_cpu on cpu0 (as it'll never idle). 2) deadlocks are easy with this idle state scheduling model, but also easy to detect, so we should. v2: - fix race in cpu_wait() by ordering set/check correctly Andrew Jones (2): arm/arm64: smp: cpu0 is special arm/arm64: smp: add deadlock detection lib/arm/asm/smp.h | 2 ++ lib/arm/smp.c | 46 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 10 deletions(-) -- 2.9.4