From owner-cvs-all Sun Feb 9 0:21:56 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7537337B401; Sun, 9 Feb 2003 00:21:55 -0800 (PST) Received: from smtp04.iprimus.com.au (smtp04.iprimus.com.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8BEE43F75; Sun, 9 Feb 2003 00:21:53 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from smtp02.iprimus.net.au (210.50.76.70) by smtp04.iprimus.com.au (6.7.010) id 3E41F723000671F4; Sun, 9 Feb 2003 19:21:46 +1100 Received: from dilbert.robbins.dropbear.id.au ([203.134.135.117]) by smtp02.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.5600); Sun, 9 Feb 2003 19:21:45 +1100 Received: from dilbert.robbins.dropbear.id.au (v56bserka2jkjskc@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id h198LZJd010677; Sun, 9 Feb 2003 19:21:35 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id h198LYqV010676; Sun, 9 Feb 2003 19:21:34 +1100 (EST) (envelope-from tim) Date: Sun, 9 Feb 2003 19:21:34 +1100 From: Tim Robbins To: Julian Elischer Cc: Bruce Evans , Julian Elischer , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys proc.h src/sys/kern kern_clock.c Message-ID: <20030209192134.A10064@dilbert.robbins.dropbear.id.au> References: <200302090606.WAA33546@InterJet.elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200302090606.WAA33546@InterJet.elischer.org>; from julian@elischer.org on Sat, Feb 08, 2003 at 10:06:46PM -0800 X-OriginalArrivalTime: 09 Feb 2003 08:21:46.0197 (UTC) FILETIME=[48F89850:01C2D014] Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Feb 08, 2003 at 10:06:46PM -0800, Julian Elischer wrote: [...] > So it turns out the code is correct. Thanks for the explanation. It seems reasonable now. My other concern is protecting addupc_{intr,task}() from profil() and also protecting addupc_task() from itself. There's an splstatclock() call in profil() which was presumably there to stop profil() from interfering with p_stats->p_prof while addupc_* were running. Maybe we could have a spinlock in struct uprof to synchronise access to it... I'm not entirely comfortable about this piece of code in the presence of multiple threads, either. It looks like it could lose ticks. addr = prof->pr_base + i; if (copyin(addr, &v, sizeof(v)) == 0) { v += ticks; if (copyout(&v, addr, sizeof(v)) == 0) Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message