From owner-cvs-src-old@FreeBSD.ORG Tue Oct 12 17:41:02 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A156510657C0 for ; Tue, 12 Oct 2010 17:41:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 748D38FC14 for ; Tue, 12 Oct 2010 17:41:02 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o9CHf2h8002771 for ; Tue, 12 Oct 2010 17:41:02 GMT (envelope-from avg@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o9CHf2vf002770 for cvs-src-old@freebsd.org; Tue, 12 Oct 2010 17:41:02 GMT (envelope-from avg@repoman.freebsd.org) Message-Id: <201010121741.o9CHf2vf002770@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to avg@repoman.freebsd.org using -f From: Andriy Gapon Date: Tue, 12 Oct 2010 17:40:45 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern subr_smp.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 17:41:02 -0000 avg 2010-10-12 17:40:45 UTC FreeBSD src repository Modified files: sys/kern subr_smp.c Log: SVN rev 213736 on 2010-10-12 17:40:45Z by avg generic_stop_cpus: prevent parallel execution This is based on the same approach as used in panic(). In theory parallel execution of generic_stop_cpus() could lead to two CPUs stopping each other and everyone else, and thus a total system halt. Also, in theory, we should have some smarter locking here, because two (or more CPUs) could be stopping unrelated sets of CPUs. But in practice, it seems, this function is only used to stop "all other" CPUs. Additionally, I took this opportunity to make amd64-specific suspend_cpus() function use generic_stop_cpus() instead of rolling out essentially duplicate code. This code is based on code by Sandvine Incorporated. Suggested by: mdf Reviewed by: jhb, jkim (earlier version) MFC after: 2 weeks Revision Changes Path 1.222 +17 -45 src/sys/kern/subr_smp.c