Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jul 2013 19:52:26 +0200
From:      Attilio Rao <attilio@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: should_yield problem [Was: svn commit: r251322 - head/sys/kern]
Message-ID:  <CAJ-FndATxzTwCkZGXw4jD_8O4KbnHbsjk4DwHwbp%2B0gd3VGTCQ@mail.gmail.com>
In-Reply-To: <51D30CE8.7030803@FreeBSD.org>
References:  <201306031736.r53Hain5093431@svn.freebsd.org> <51D30463.50608@FreeBSD.org> <CAJ-FndD5tCxe-L8V73MFtk_4xr0Wq3MHasKY4O_tcA3uYouKAw@mail.gmail.com> <51D30CE8.7030803@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 2, 2013 at 7:24 PM, Andriy Gapon <avg@freebsd.org> wrote:
> on 02/07/2013 20:12 Attilio Rao said the following:
>> While "ticks" is signed it is used as an unsigned int.
>> td_swvolticks is always derived by ticks, which again will always be
>> used as an unisgned and then the subtractions among the 2 will be
>> consistent.
>
> So returning to my example where ticks == -1946084020 and td_swvoltick == 0 and
> (ticks - td->td_swvoltick) == -1946084020.  Is this consistent in your opinion?

I was just pointing out that the real bug is not in the subtraction
itself but on the hogticks comparison.
This is because hogticks is not an absolute measurement but it
represents really a ticks difference.
In my opinion we should define hogticks as an unsigned int and add a
small comment saying that it is a differential.
This will fix the issue.

Thanks,
Attilio


--
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-FndATxzTwCkZGXw4jD_8O4KbnHbsjk4DwHwbp%2B0gd3VGTCQ>