From owner-svn-src-head@FreeBSD.ORG Tue Jul 2 17:52:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 42624E2A; Tue, 2 Jul 2013 17:52:28 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) by mx1.freebsd.org (Postfix) with ESMTP id 5A02E1D0B; Tue, 2 Jul 2013 17:52:27 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id n11so5112211wgh.9 for ; Tue, 02 Jul 2013 10:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=SCdWLb/wG0q8QdtHQr6S0k8HQnao7BPxxuqJC4ED4G8=; b=Y9snN61gJle6lVAvK7NsN2a8UDygqX80d286zEc2RHDlRNMXJ1iM4iaolQBpDmoIek EGQGHq4sJMcq97FrrQg61En52tjQNo+Mgs6ymLKIW4nUea/UTzAQn0da9s8aNir3uEK+ Imp2HRC7aHix+qcBgSRA5AwwWkwuM+7OX51kgB8cuwgDsOZ6S8dlbK2+sLI7eweY33Qp SYAlsS8UFbtVmumv6LdwO765OVw/UYbWF9XHju0nq5AE/ttD0wpq9BJCfeqNPN+cy3Zi oxjctUpTPmfyHmTNzL0rRMkM4myzP7SxVRrgYrlN/aE8MT1h0pRmE6LWzPdpeXNGsay8 TbBw== MIME-Version: 1.0 X-Received: by 10.194.122.71 with SMTP id lq7mr23955090wjb.77.1372787546278; Tue, 02 Jul 2013 10:52:26 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.194.93.232 with HTTP; Tue, 2 Jul 2013 10:52:26 -0700 (PDT) In-Reply-To: <51D30CE8.7030803@FreeBSD.org> References: <201306031736.r53Hain5093431@svn.freebsd.org> <51D30463.50608@FreeBSD.org> <51D30CE8.7030803@FreeBSD.org> Date: Tue, 2 Jul 2013 19:52:26 +0200 X-Google-Sender-Auth: HWommTtTBzKQCUv7Q8BoB0MUuqY Message-ID: Subject: Re: should_yield problem [Was: svn commit: r251322 - head/sys/kern] From: Attilio Rao To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org 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: Tue, 02 Jul 2013 17:52:28 -0000 On Tue, Jul 2, 2013 at 7:24 PM, Andriy Gapon 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