Date: Wed, 3 Apr 2019 10:00:45 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Michael Tuexen <tuexen@fh-muenster.de> Cc: Bruce Evans <brde@optusnet.com.au>, freebsd-hackers Hackers <freebsd-hackers@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: Re: powerpc64 head -r344018 stuck sleeping problems: th->th_scale * tc_delta(th) overflows unsigned 64 bits sometimes [patched failed] Message-ID: <20190403070045.GW1923@kib.kiev.ua> In-Reply-To: <E0785613-2B6E-4BB3-95CD-03DD96902CD8@fh-muenster.de> 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> <E0785613-2B6E-4BB3-95CD-03DD96902CD8@fh-muenster.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 03, 2019 at 12:27:32AM +0200, Michael Tuexen wrote: > > On 24. Mar 2019, at 12:01, Konstantin Belousov <kostikbel@gmail.com> wrote: > > > > 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, > > 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? It started from a report of issues on G5. The specific issues are bugs on G5, and the posted patches do not fix them. From what I see, the timecounter values were wrapped. This is genuine ppc or G5 issue. 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. 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190403070045.GW1923>