Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2003 19:53:33 +0100
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        "Sam Leffler" <sam@errno.com>
Cc:        "John Baldwin" <jhb@FreeBSD.org>, src-committers@FreeBSD.org, cvs-src@FreeBSD.org, "Nate Lawson" <nate@root.org>
Subject:   Re: cvs commit: src/sys/sys devicestat.h 
Message-ID:  <3233.1047322413@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 10 Mar 2003 10:47:30 PST." <15bf01c2e735$825f1eb0$52557f42@errno.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <15bf01c2e735$825f1eb0$52557f42@errno.com>, "Sam Leffler" writes:
>> This is disk statistics, it's not really worth that effort.  The
>> data in the structure will not get corrupted, bue one of our
>> readings may.  So what...
>
>All the more reason why I question the complexity.  Are there really going
>to be that many clients polling for statistics that using a system call is
>bad?

Using mmap is _simpler_ (and cheaper: it saves ctx-switches) than
using sysctl or ioctl and it puts the entire burden in the userland
process.  That is IMO a good thing.

The complexity only comes in if we want to guarantee that userland can
detect inconsistent readings of a given struct.

I have no intention of giving that guarantee.

I will put the two counter elements there, which gives a very high
probability that inconsistent readings will be detected, but I give
no guarantee.

-- 
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3233.1047322413>