From owner-freebsd-arch@FreeBSD.ORG Tue Jun 14 12:30:59 2005 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8564D16A41C for ; Tue, 14 Jun 2005 12:30:59 +0000 (GMT) (envelope-from howardsue@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34B0443D55 for ; Tue, 14 Jun 2005 12:30:59 +0000 (GMT) (envelope-from howardsue@gmail.com) Received: by wproxy.gmail.com with SMTP id 67so163873wri for ; Tue, 14 Jun 2005 05:30:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qmpNrUzL18gM4LvGc+GShK5pgO+/iGAhhyP0guvnUjxFskTzZixF6tzqsOwKj0xDG0tkeIJgixXGtSmyB7eifRsI7N7Uk/1PX64YmnkSIzMThHTOUu6FZZklyxce8aVqt9I+yaL+86smHMPGhRX8blTyRhNA+6fvSj2xCZvXZKU= Received: by 10.54.25.52 with SMTP id 52mr3431722wry; Tue, 14 Jun 2005 05:30:58 -0700 (PDT) Received: by 10.54.124.4 with HTTP; Tue, 14 Jun 2005 05:30:58 -0700 (PDT) Message-ID: <1e89cd51050614053073cd94cd@mail.gmail.com> Date: Tue, 14 Jun 2005 20:30:58 +0800 From: Sue Howard To: arch@freebsd.org In-Reply-To: <1e89cd51050614050373dca5af@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1e89cd510506140433437f7b7@mail.gmail.com> <36765.1118749442@critter.freebsd.dk> <1e89cd51050614050373dca5af@mail.gmail.com> Cc: Subject: Fwd: [DCR] Remove devstat X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Sue Howard List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2005 12:30:59 -0000 2005/6/14, Poul-Henning Kamp : > In message <1e89cd510506140433437f7b7@mail.gmail.com>, Sue Howard writes: > >Hi, > > > >I found devstat is not widely used in the device drivers. Based the > >grep result of 'devstat_new_entry', it shows only cam, ata, fd, > >geom_disk are using it. In my workstation, the output of 'sysctl > >kern.devstat' shows: > > >I am wondering if devstat can be replaced by the sysctl nodes %desc, > >%pnpinfo etc that jhb introduced. Almost all the information devstat > >can provide can be also exposed by such sysctl node. > > Uhm, are we confused here ? > > Devstat is what is used for collecting transaction statistics for > disks and scsi general devices in general. > > Programs like iostat and gstat uses it. > > The old access path (iostat) uses sysctls, but the new and practically > overhead free access path is mmap(2) which gstat uses. I am confused because, in the devstat.h file, it defines an enum devstat_type_flags that I am interested in. This enum defines the devices type(catalog). I think this type should be a general property of a device driver. So I think devstat is a general framework to collect all types of the information related to a device. Anyway, since devicestat is only used for collect statistics, I'd like to remove the this type from the devstat. And we can implement this type into devclass(device_t?? maybe). This is what I proposed. It will bring some benifits like remove the long regex to match NIC interface in devd.conf, etc. Howard