From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268033AbUH3N1v (ORCPT ); Mon, 30 Aug 2004 09:27:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268037AbUH3N1v (ORCPT ); Mon, 30 Aug 2004 09:27:51 -0400 Received: from mx2.elte.hu ([157.181.151.9]:41133 "EHLO mx2.elte.hu") by vger.kernel.org with ESMTP id S268033AbUH3N1t (ORCPT ); Mon, 30 Aug 2004 09:27:49 -0400 Date: Mon, 30 Aug 2004 15:29:25 +0200 From: Ingo Molnar To: Nathan Lynch Cc: akpm@osdl.org, lkml , Rusty Russell Subject: Re: [PATCH] cpu hotplug fixes for dependent_sleeper and wake_sleeping_dependent Message-ID: <20040830132925.GA1531@elte.hu> References: <1093858876.11274.50.camel@biclops.private.network> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1093858876.11274.50.camel@biclops.private.network> User-Agent: Mutt/1.4.1i X-ELTE-SpamVersion: MailScanner 4.31.6-itk1 (ELTE 1.2) SpamAssassin 2.63 ClamAV 0.73 X-ELTE-VirusStatus: clean X-ELTE-SpamCheck: no X-ELTE-SpamCheck-Details: score=-4.9, required 5.9, autolearn=not spam, BAYES_00 -4.90 X-ELTE-SpamLevel: X-ELTE-SpamScore: -4 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org * Nathan Lynch wrote: > To recap, offlining a cpu with current bk results in the "Aiee, > killing interrupt handler!" panic from do_exit(). This seems to be > triggered only with CONFIG_PREEMPT and CONFIG_SCHED_SMT both enabled. > I believe the problem is that when do_stop() calls schedule(), > dependent_sleeper() drops the "offline" cpu's rq->lock and never > reacquires it. > > The following seems to work (tested on ppc64). Is there a better way? > - if (!(sd->flags & SD_SHARE_CPUPOWER)) > + if (!(sd->flags & SD_SHARE_CPUPOWER) || cpu_is_offline(this_cpu)) > + if (!(sd->flags & SD_SHARE_CPUPOWER) || cpu_is_offline(this_cpu)) it would really be nice to do this without any runtime overhead. Rusty? Ingo