From owner-freebsd-ppc@freebsd.org Wed Apr 3 16:11:24 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE485157276C; Wed, 3 Apr 2019 16:11:24 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78BDF88ED6; Wed, 3 Apr 2019 16:11:24 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [192.168.1.3] (p57BB4B1C.dip0.t-ipconnect.de [87.187.75.28]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 6E8E671B63002; Wed, 3 Apr 2019 18:11:20 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: powerpc64 head -r344018 stuck sleeping problems: th->th_scale * tc_delta(th) overflows unsigned 64 bits sometimes [patched failed] From: Michael Tuexen In-Reply-To: <20190403070045.GW1923@kib.kiev.ua> Date: Wed, 3 Apr 2019 18:11:19 +0200 Cc: Bruce Evans , freebsd-hackers Hackers , FreeBSD PowerPC ML Content-Transfer-Encoding: quoted-printable Message-Id: <8184C845-7721-4F88-974E-3F63F1980FDE@freebsd.org> References: <20190303161635.GJ68879@kib.kiev.ua> <20190304043416.V5640@besplex.bde.org> <20190304114150.GM68879@kib.kiev.ua> <20190305031010.I4610@besplex.bde.org> <20190306172003.GD2492@kib.kiev.ua> <20190308001005.M2756@besplex.bde.org> <20190307222220.GK2492@kib.kiev.ua> <20190309144844.K1166@besplex.bde.org> <20190324110138.GR1923@kib.kiev.ua> <20190403070045.GW1923@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3445.104.8) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 78BDF88ED6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Apr 2019 16:11:25 -0000 > On 3. Apr 2019, at 09:00, Konstantin Belousov = wrote: >=20 > On Wed, Apr 03, 2019 at 12:27:32AM +0200, Michael Tuexen wrote: >>> On 24. Mar 2019, at 12:01, Konstantin Belousov = wrote: >>>=20 >>> On Sat, Mar 09, 2019 at 06:00:14PM +1100, Bruce Evans wrote: >>>> I more strongly disclike (sic) the more complete merge. The = central APIs >>>> have even more parameters and reduced type safety to describe = objects as >>>> (offset, size) pairs. >>> I changed the patch to be type-safe. Now I like it even more. It = provides >>> 1. internal >>> 2. concise >>> 3. type-safe >>> API to fetch data from timehands. The implementation needs to be = read >>> only once. >> Hi, >>=20 >> I'm a bit lost... I think this started to fix a problem on G5 = PowerMacs. >> Do you think this patch solves the problem. Should this be tested? >> Or is this still work in progress or a general improvement not = necessary >> fixing the problem on G5 PowerMacs? >=20 > It started from a report of issues on G5. The specific issues are > bugs on G5, and the posted patches do not fix them. =46rom what I = see, > the timecounter values were wrapped. This is genuine ppc or G5 issue. Thanks a lot for the clarification. Best regards Michael >=20 > The patch fixes time keeping subsystem reaction to the already > bad situation, by correctly handling overflow in calculations. This > overflow can occur in more reasonable setups as well, e.g. if ddb was > activated and interrupts were stopped for prolonged period, even on = x86. >=20 > In addition, my version of the patch reorganizes the code and removes > excessive copies of the most delicate loops in lock-less readers. This > chunk can be split from the overflow part, but it is not completely > trivial.