From owner-cvs-all@FreeBSD.ORG Fri Jan 18 14:36:18 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4014C16A41A for ; Fri, 18 Jan 2008 14:36:18 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 806EE13C4CE for ; Fri, 18 Jan 2008 14:36:17 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so1221625fgg.35 for ; Fri, 18 Jan 2008 06:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=344tAGSVgPemTK4c9qjGKvLCKICC1Eeu5nFovwavKzE=; b=r+ix4ItxKAl6DCfUc28g4tBbQqJD9qt9R9E0ExXNs9nktJorFBReG4kTN2Jv+y6gTGeumWYRe73DrLvK1oL9S7zsRK2FEbRpXvKtY0iEt92i7VdUs1mFJn+4WaOz+kWIhe4PsYQqqb8iEfjkEPT/zsDzLQYgaLSqoDdHv5O8kd0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=hE7IZCrURTnyxPnWxGF1DkevyQlcZLwWKAzCbCy9HkHQIX5w3htIE17VKEmHsM5bUBF39/Rkp7zU0Pb511nwPTd9bUQ9C1aesXtKAJZ0QM4CJ5kN7GlXu7sj23bsdDlV8T1VnpZjgFzYfUyxxa3eCJ4TgOBnQ3W+3QQqFScjJK8= Received: by 10.86.99.9 with SMTP id w9mr3145231fgb.22.1200666976339; Fri, 18 Jan 2008 06:36:16 -0800 (PST) Received: by 10.86.53.7 with HTTP; Fri, 18 Jan 2008 06:36:16 -0800 (PST) Message-ID: <3bbf2fe10801180636q3e286316w9ca685f92cf53828@mail.gmail.com> Date: Fri, 18 Jan 2008 15:36:16 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "John Baldwin" In-Reply-To: <200801180929.45123.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200801181300.m0ID0SMi041767@repoman.freebsd.org> <3bbf2fe10801180534y7f97f39meb0b12624e0b919a@mail.gmail.com> <200801180929.45123.jhb@freebsd.org> X-Google-Sender-Auth: 1ae9f3f83cd9828c Cc: cvs-src@freebsd.org, src-committers@freebsd.org, David Xu , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_time.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2008 14:36:18 -0000 2008/1/18, John Baldwin : > On Friday 18 January 2008 08:34:57 am Attilio Rao wrote: > > 2008/1/18, David Xu : > > > davidxu 2008-01-18 13:00:28 UTC > > > > > > FreeBSD src repository > > > > > > Modified files: > > > sys/kern kern_time.c > > > Log: > > > Make sure reading td_runtime in critical section since thread may be > > > preempted and td_runtime will be modified. > > > > If you don't need the operation to be atomical with other operations > > inside the critical path (and I don't expect so) this change is > > pointless as our reading are always atomic. > > Not on 32-bit archs like i386. They may do two 32-bit reads and you could > have problems if the lower 32 wraps in between the reads. Ah, right, td_runtime is uint64_t, sorry. Attilio -- Peace can only be achieved by understanding - A. Einstein