From owner-svn-src-head@freebsd.org Mon Feb 20 19:10:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A102CE6F62; Mon, 20 Feb 2017 19:10:50 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C11291ECB; Mon, 20 Feb 2017 19:10:49 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id v77so16016675wmv.0; Mon, 20 Feb 2017 11:10:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=P3L3E9k5+UkHpIiU20ABdVOEIR2ezfhaEqIV8O0aYRs=; b=I2LwoJYyVDFvoBB6S9OjQTZf9lux5VjzXba3r+zYPguDZxyVfW3oBHOW9B/Vm8LkuX DmzfylYBDpQfBl6l+fIfwHj4kMocmsG1VidyOtd7ONyht3R70Tja5W6dQI0junVxRlIR mwQr/C6L6q7S6vC5AQInhUiR6H5ghQ3jdodq/9DQmoVBncCm/RVu3ykoK3GKiC9ZV4Bq h3Z8kUHAgdadoMWfEn9N31dJ0nzUvXlpt9jdChM3IhP/AOD1oO6m0YnSRovHHeuuc25o o2t/HLb2G4FxHlsIaAhzQIMwiSQLH2luFbXcM0PZWROvU/RIKCmhzJSi/XSgYCdQCoQX 0Znw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=P3L3E9k5+UkHpIiU20ABdVOEIR2ezfhaEqIV8O0aYRs=; b=hm2l8veGi0KnJ+FKXwrCKBpJ9D71to8NkueFVyOHnHXSWp4JEoR3TMr/fsRssvRCuH hRHzsAXORpxkpHcTyl62BvK8gi3yX/Y7gToknI54WITOAL9+cLeqzT60L4KXhUWOjrsF pKixBqzj5Outj8LFhkO4L1a0Qc6R/sbBJz99qJv5Rl4GTDY0o4MkQBpSrooYwOKO0rG4 oF0jD2xY7bYerUfy/gFOGtPDuml5/p2HXeQTj4RnbVv+omhsl7alXXbCYPhSNFTbK59k 0dzu8mXEoo8b7mms+iMwFzlc5VsIH97oVM42cv+RZOYyhLnqEiJt6y+YcwTL7kcHFBJL wvyQ== X-Gm-Message-State: AMke39nBxWVc8FA/RRj0/xILraFuA7jUcJy/ZozS1BcUMWjlHhibCL37WtyQkqWE6CHUbA== X-Received: by 10.28.158.74 with SMTP id h71mr12396602wme.59.1487617848059; Mon, 20 Feb 2017 11:10:48 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id w51sm10692040wrc.12.2017.02.20.11.10.46 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 20 Feb 2017 11:10:47 -0800 (PST) Date: Mon, 20 Feb 2017 20:10:45 +0100 From: Mateusz Guzik To: Mark Millard Cc: mjg@freebsd.org, Justin Hibbits , svn-src-head@freebsd.org, FreeBSD PowerPC ML , FreeBSD Current , Nathan Whitehorn Subject: Re: svn commit: r313268 - head/sys/kern [through -r313271 for atomic_fcmpset use and later: fails on PowerMac G5 "Quad Core"; -r313266 works] Message-ID: <20170220191044.GA8526@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , Mark Millard , mjg@freebsd.org, Justin Hibbits , svn-src-head@freebsd.org, FreeBSD PowerPC ML , FreeBSD Current , Nathan Whitehorn References: <2FD12B8F-2255-470A-98D4-2DCE9C7495F5@dsl-only.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2FD12B8F-2255-470A-98D4-2DCE9C7495F5@dsl-only.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2017 19:10:50 -0000 On Sat, Feb 18, 2017 at 04:18:05AM -0800, Mark Millard wrote: > [Note: I experiment with clang based powerpc64 builds, > reporting problems that I find. Justin is familiar > with this, as is Nathan.] > > I tried to update the PowerMac G5 (a so-called "Quad Core") > that I have access to from head -r312761 to -r313864 and > ended up with random panics and hang ups in fairly short > order after booting. > > Some approximate bisecting for the kernel lead to: > (sometimes getting part way into a buildkernel attempt > for a different version before a failure happens) > > -r313266: works (just before use of atomic_fcmpset) > vs. > -r313271: fails (last of the "use atomic_fcmpset" check-ins) > > (I did not try -r313268 through -r313270 as the use was > gradually added.) > > So I'm currently running a -r313864 world with a -r313266 > kernel. > > No kernel that I tried that was from before -r313266 had the > problems. > > Any kernel that I tried that was from after -r313271 had the > problems. > > Of course I did not try them all in other direction. :) > I found that spin mutexes were not properly handling this, fixed in r313996. Locally I added a if (cpu_tick() % 2) return (0); snipped to amd64 fcmpset to simulate failures. Everything works, while it would easily fail without the patch. That said, I hope this concludes the 'missing check for not-reread value of failed fcmpset' saga. -- Mateusz Guzik