From owner-freebsd-current@FreeBSD.ORG Tue Nov 1 15:28:13 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74007106566B; Tue, 1 Nov 2011 15:28:13 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 740F68FC1A; Tue, 1 Nov 2011 15:28:11 +0000 (UTC) Received: by wyg36 with SMTP id 36so593377wyg.13 for ; Tue, 01 Nov 2011 08:28:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ByjM4/R2GSbwGemkN4G6IGtKFX91jrtYO19ZWMU8wUs=; b=ZTY6N3bXVtly4YCwP01C/EQM3xXDRxsZCDjDAhGmAldNbLf+/fM3KFtLj+V0sXerhj A+rRfSMaXkAl9OdC/wipQhJSEGGHFBGwt23x2TREdg51TEGiJU8oBlxhtcjjMgiNp2ty t76KyIAjVipvxDgw8D/am0d17Lfzs1OHoX64U= MIME-Version: 1.0 Received: by 10.227.202.143 with SMTP id fe15mr24898171wbb.25.1320161291064; Tue, 01 Nov 2011 08:28:11 -0700 (PDT) Received: by 10.180.8.34 with HTTP; Tue, 1 Nov 2011 08:28:11 -0700 (PDT) In-Reply-To: References: Date: Tue, 1 Nov 2011 11:28:11 -0400 Message-ID: From: Ryan Stone To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Cc: mdf@freebsd.org, FreeBSD Current , mlaier@freebsd.org Subject: Re: smp_rendezvous runs with interrupts and preemption enabled on unicore systems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2011 15:28:13 -0000 On Mon, Oct 31, 2011 at 7:43 PM, Attilio Rao wrote: > I'm not entirely sure why this exactly breaks though (do you see that > happening with a random rendezvous callback or it is always the > same?), because that just becames a simple function calling on cpu0, > even if I think that there is still a bug as smp_rendezvous callbacks > may expect to have interrupts and preemption disabled and the > short-circuit breaks that assumption. I have only observed the problem with i686_mrstoreone(smp_rendezvous is called from i686_mrstore). I notice that i686_mrstoreone does scary things like disabling the cache and global TLB entries. My experience was that everything got very slow when i686_mrstoreone was preempted, so it easily could be the case that the system because so slow with the cache disabled that it became livelocked. > I don't think that we strictly need the lock here, my preferred > solution would be (only test-compiled): I tried the same thing for the SMP case, and it fixed my problem.