From owner-svn-src-head@FreeBSD.ORG Tue Jul 2 17:12:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9C1C9CBF; Tue, 2 Jul 2013 17:12:57 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) by mx1.freebsd.org (Postfix) with ESMTP id 794FD1AF0; Tue, 2 Jul 2013 17:12:56 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id y10so4769209wgg.4 for ; Tue, 02 Jul 2013 10:12:55 -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=4JsQlM5PuByaoem78H4/JBtXL4Uukf9yIZ96peTO8dE=; b=a9DwAKchOz02L9IZyqWW3gtC7Dz3Dei4QPQluSUZ4RCG6obFUuHV2wrkdgJFZkfICv N9Rx0exVTaD3xsAVr+Cf3ezuvvdH4wZea3B8dpgDKwhC9y9XV8qEUJQTmZ4RAzOJSBE3 8oyGJaW9mzsIMBQ2rRgKrnrqQ2vqrNTgxjGVxzgBISZNl8cO2RL7r3LtGsQgprRhnlkz 753ja+BaeILnSTQChHGTOhYyFNM61K308HGdDSYM/xlwIt2KIBAUlqzhl21975J5LU4w PUH7w8SiO7mNYvl+2I/1esUKh6GsTzrl9R9f4rxWUaAEtuZ8vdT3ygVD8AoVSmSSNKtF sohQ== MIME-Version: 1.0 X-Received: by 10.180.211.202 with SMTP id ne10mr16096840wic.39.1372785175593; Tue, 02 Jul 2013 10:12:55 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.194.93.232 with HTTP; Tue, 2 Jul 2013 10:12:55 -0700 (PDT) In-Reply-To: <51D30463.50608@FreeBSD.org> References: <201306031736.r53Hain5093431@svn.freebsd.org> <51D30463.50608@FreeBSD.org> Date: Tue, 2 Jul 2013 19:12:55 +0200 X-Google-Sender-Auth: DlNzQ-9KEjPauUf5M5IgTdeTN9A 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, Konstantin Belousov 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:12:57 -0000 On Tue, Jul 2, 2013 at 6:48 PM, Andriy Gapon wrote: > on 03/06/2013 20:36 Konstantin Belousov said the following: >> Author: kib >> Date: Mon Jun 3 17:36:43 2013 >> New Revision: 251322 >> URL: http://svnweb.freebsd.org/changeset/base/251322 >> >> Log: >> Be more generous when donating the current thread time to the owner of >> the vnode lock while iterating over the free vnode list. Instead of >> yielding, pause for 1 tick. The change is reported to help in some >> virtualized environments. > > Kostik, > > I've just run into a problem where word "generous" does not seem to be > applicable at all unless I am mistaken about how the code works. 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. Attilio -- Peace can only be achieved by understanding - A. Einstein