From owner-freebsd-fs@FreeBSD.ORG  Fri Feb 25 00:37:04 2011
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 674EF1065673
	for <freebsd-fs@freebsd.org>; Fri, 25 Feb 2011 00:37:04 +0000 (UTC)
	(envelope-from yanegomi@gmail.com)
Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com
	[74.125.82.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 02ACF8FC14
	for <freebsd-fs@freebsd.org>; Fri, 25 Feb 2011 00:37:03 +0000 (UTC)
Received: by wyb32 with SMTP id 32so1350207wyb.13
	for <freebsd-fs@freebsd.org>; Thu, 24 Feb 2011 16:37:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:date:message-id:subject:from:to
	:content-type; bh=+TmSPS4z0Ks9mH+dEhJDdO0shorSU+7uV1a5+0CmJBk=;
	b=a7SfQYmmrGj0oHLaYGM2IoXT55XZPSuxr6ZuIQ3yV79b+oiEdI9DrB+DXZ2agEwXIJ
	cvYsA7RfqB29k39w5PwGK3v3494P7BXZfkjOg7ww/I0vy4Fm+SYROf4oyPkxET35nUZS
	OA364zmC/bOr31Pt9rpEQvYzKpZRaEU13Vlf4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	b=FUgiE2FUZBSOXw/HdwaQ0h7Onhkurpk0OPM93DqfWR0qZ4WbvfH4GsxsL7gSXS7t4C
	eOqBeHUK/lDYXTe9ccZPdU9zYYVXT2BmibWtUt7vLUCSEk+L9eXS56yHvcowKiHqVlJS
	FEUBkdkk0HrEy/0qyvWifpbywehQ5hsZKexh4=
MIME-Version: 1.0
Received: by 10.216.50.193 with SMTP id z43mr1454048web.49.1298594223010; Thu,
	24 Feb 2011 16:37:03 -0800 (PST)
Received: by 10.216.15.74 with HTTP; Thu, 24 Feb 2011 16:37:02 -0800 (PST)
Date: Thu, 24 Feb 2011 16:37:02 -0800
Message-ID: <AANLkTiko+Q2t1Qm_XnoRbnTGa42640ZriDuq_w1+bBQJ@mail.gmail.com>
From: Garrett Cooper <yanegomi@gmail.com>
To: freebsd-fs@freebsd.org
Content-Type: text/plain; charset=ISO-8859-1
Subject: Are ru_inblock/ru_oublock in struct rusage used in capturing all
 block/cluster activity?
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 25 Feb 2011 00:37:04 -0000

Hi FS folks,
    I'm trying to get a better understanding of these two statistics
recorded by getrusage(2):

             long ru_inblock;         /* block input operations */
             long ru_oublock;         /* block output operations */

    Are the block operations limited to filesystem access on disk, or
do they also apply to filesystems not backed by physical media, like
memory disks, tmpfs, etc? It looks like it applies to all vnode
operations in areas (the kern/vfs_*.c files), so I would assume that
it applies to non-physical backed filesystem access as well, but just
to be sure I thought I would ask the experts.
    ru_inblock and ru_oublock summed together compose the ac_io
statistic used by acct(2), so I'm curious as to whether or not the
utility of acct(2) on non-physical media backed filesystems was
intentional.
Thanks,
-Garrett

PS As a bonus question, why is ac_io a float primitive if it's just a
sum of two longs?