powerpc64 head -r344018 stuck sleeping problems: th->th_scale * tc_delta(th) overflows unsigned 64 bits sometimes [patched failed]

Michael Tuexen tuexen at freebsd.org
Wed Apr 3 16:11:25 UTC 2019


> On 3. Apr 2019, at 09:00, Konstantin Belousov <kostikbel at gmail.com> wrote:
> 
> On Wed, Apr 03, 2019 at 12:27:32AM +0200, Michael Tuexen wrote:
>>> On 24. Mar 2019, at 12:01, Konstantin Belousov <kostikbel at 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.
Thanks a lot for the clarification.

Best regards
Michael
> 
> 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.



More information about the freebsd-ppc mailing list