From owner-cvs-src Mon Mar 10 10:22:42 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3A5937B404; Mon, 10 Mar 2003 10:22:40 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEE1243F93; Mon, 10 Mar 2003 10:22:39 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.8/8.12.8) with ESMTP id h2AIMcuP002987; Mon, 10 Mar 2003 19:22:38 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: Nate Lawson Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/sys devicestat.h From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 10 Mar 2003 10:13:36 PST." Date: Mon, 10 Mar 2003 19:22:38 +0100 Message-ID: <2986.1047320558@critter.freebsd.dk> Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , Nate Lawson wri tes: Doesn't work: CPU0 (kernel) CPU1 (userland) increment seq start copy fiddle data end copy (copy is inconsistent) You need two sequence fields: CPU0 (kernel) CPU1 (userland) increment seq0 start copy fiddle data end copy increment seq1 (seq0 != seq1 indicates inconcistent data) Notice that to make it absolutely water-tight, the seq fields must be updated with appropriate write barriers and the order of the fields must be the opposite as the direction the copy is performed in. I may not think it worth going to that effort for io stats. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message