Commit Graph

21 Commits

Author SHA1 Message Date
Poul-Henning Kamp
801bb689ca Commit the correct copy of the g_stat structure.
Add debug.sizeof.g_stat sysctl.

Set the id field of the g_stat when we create consumers and providers.

Remove biocount from consumer, we will use the counters in the g_stat
structure instead.  Replace one field which will need to be atomically
manipulated with two fields which will not (stat.nop and stat.nend).

Change add companion field to bio_children: bio_inbed for the exact
same reason.

Don't output the biocount in the confdot output.

Fix KASSERT in g_io_request().

Add sysctl kern.geom.collectstats defaulting to off.

Collect the following raw statistics conditioned on this sysctl:

    for each consumer and provider {
        total number of operations started.
        total number of operations completed.
        time last operation completed.
        sum of idle-time.
        for each of BIO_READ, BIO_WRITE and BIO_DELETE {
            number of operations completed.
            number of bytes completed.
            number of ENOMEM errors.
            number of other errors.
            sum of transaction time.
        }
    }

API for getting hold of these statistics data not included yet.
2003-02-07 23:08:24 +00:00
Poul-Henning Kamp
0f9d3dba37 Constification and some s/int/u_int/ changes. 2002-12-16 22:33:27 +00:00
Poul-Henning Kamp
82e5a9a354 Do not call the dumpconf method unless there is one.
Compare pointers with NULL.

Partially submitted by:	Christian Carstensen <cc@gate5.de>
Approved by:	re
2002-11-20 18:10:42 +00:00
Poul-Henning Kamp
11af41920e Remove harmless but irritating printf. 2002-11-08 15:35:16 +00:00
Poul-Henning Kamp
5274973ae2 Make this compile in the userland shims again.
Sponsored by:	DARPA & NAI Labs
2002-11-01 15:57:55 +00:00
Poul-Henning Kamp
d518e53936 Add the remaning part of the new libdisk interaction.
WARNING:  This is not a published interface, it is a stopgap measure for
WARNING:  libdisk so we can get 5.0-R out of the door.

Sponsored by:	DARPA & NAI Labs
2002-10-28 22:43:54 +00:00
Poul-Henning Kamp
48444d6262 Make the sectorsize a property of providers so we can include it in the XML
output.

Sponsored by:	DARPA & NAI Labs
2002-10-20 19:18:07 +00:00
Poul-Henning Kamp
14ac6812b9 Use %jd instead of %lld now that we have it. 2002-10-20 18:48:12 +00:00
Poul-Henning Kamp
d0e17c1b91 Add more KASSERTS.
Sponsored by:	DARPA & NAI Labs.
2002-10-14 10:02:24 +00:00
Poul-Henning Kamp
2874f1cf36 Properly isolate the locking domains of sysctl from the topology lock
for the sysctls which report the configuration.

Sponsored by:	DARPA & NAI Labs.
2002-10-04 10:38:36 +00:00
Poul-Henning Kamp
72840432e0 Retire g_io_fail() and let g_io_deliver() take an error argument instead.
Sponsored by:	DARPA & NAI Labs.
2002-09-30 08:54:46 +00:00
Poul-Henning Kamp
4fbd12689a Remove "magicspace". It looks good on paper, it doesn't work in practice.
Sponsored by: DARPA & NAI Labs.
2002-09-06 08:50:28 +00:00
Poul-Henning Kamp
07107de9bc Introduce the concept of "magic spaces", and implement them in most of
the relevant classes.

Some methods may implement various "magic spaces", this is reserved
or magic areas on the disk, set a side for various and sundry purposes.
A good example is the BSD disklabel and boot code on i386 which occupies
a total of four magic spaces: boot1, the disklabel, the padding behind
the disklabel and boot2.  The reason we don't simply tell people to
write the appropriate stuff on the underlying device is that (some of)
the magic spaces might be real-time modifiable.  It is for instance
possible to change a disklabel while partitions are open, provided
the open partitions do not get trampled in the process.

Sponsored by:	DARPA & NAI Labs.
2002-05-21 20:33:49 +00:00
Poul-Henning Kamp
f6424ee53f Improve the cross-references in the XML output.
Explained by:	des
Sponsored by:	DARPA & NAI Labs.
2002-04-24 21:02:28 +00:00
Poul-Henning Kamp
7d590cc46f Introduce some serious paranoia to try to catch a memory overwrite problem
as early as possible.

Sponsored by:	DARPA & NAI Labs
2002-04-23 11:48:45 +00:00
Poul-Henning Kamp
50cbb62eab Make life easier for reference-vector generatorts in tools/regression/geom
by including a FreeBSD friendly CVS identifier in the XML output.

Sponsored by: DARPA & NAI Labs.
2002-04-19 09:21:27 +00:00
Poul-Henning Kamp
2654e1fc4e s/classs/classes/ to fixup grammer after the previous global renaming.
Sponsored by: DARPA & NAI Labs
2002-04-04 09:41:47 +00:00
Poul-Henning Kamp
4c0a424c67 In the absense of any smarter way to do this, cast various printf
arguments to silence printf format warnings.
2002-03-28 10:09:24 +00:00
Poul-Henning Kamp
b1876192f0 Eliminate some thread pointers which do not make sense anymore.
Split private parts of geom.h into geom_int.h.  The latter should
never be included in class implemtations.
2002-03-26 22:07:38 +00:00
Poul-Henning Kamp
e805e8f0e8 Cave in to tradition and rename "methods" to "classes". 2002-03-26 21:40:06 +00:00
Poul-Henning Kamp
dd84a43c1d First commit of the GEOM subsystem to make it easier for people to
test and play with this.

This is not yet production quality and should be run only on dedicated
test boxes.

For people who want to develop transformations for GEOM there exist a
set of shims to run geom in userland (ask phk@freebsd.org).

Reports of all kinds to: phk@freebsd.org
Please include in report:
        dmesg
        sysctl debug.geomdot
        sysctl debug.geomconf

Known significant limitations:
        no kernel dump facility.
        ioctls severely restricted.

Sponsored by:   DARPA, NAI Labs
2002-03-11 21:42:35 +00:00