dragonfly.git
15 years agoFix an issue where libthread_xu was not accepting the full priority
Matthew Dillon [Tue, 15 Jul 2008 01:18:53 +0000 (01:18 +0000)]
Fix an issue where libthread_xu was not accepting the full priority
range returned by sched_get_priority_{min,max}(), causing firefox
to assert.

Reported-by: Jordan Gordeev <jgordeev@dir.bg>
Tested-by: walt <wa1ter@myrealbox.com>
15 years agoRemove useless types(5) manpage.
Sascha Wildner [Mon, 14 Jul 2008 23:59:34 +0000 (23:59 +0000)]
Remove useless types(5) manpage.

15 years agoExclude acd* and fd* from the list of disks.
Sascha Wildner [Mon, 14 Jul 2008 23:57:10 +0000 (23:57 +0000)]
Exclude acd* and fd* from the list of disks.

15 years agoFix a bug where mount_nfs would properly parse an IP address, but would
Matthew Dillon [Mon, 14 Jul 2008 22:22:40 +0000 (22:22 +0000)]
Fix a bug where mount_nfs would properly parse an IP address, but would
still fail if name resolution was down because it also tried to do a
reverse lookup on it.

Reported-by: Vincent Stemen <vince.dragonfly@hightek.org>
15 years agoFix a bug in vmntvnodescan() revealed by the recent NFS sync fix. The
Matthew Dillon [Mon, 14 Jul 2008 22:16:35 +0000 (22:16 +0000)]
Fix a bug in vmntvnodescan() revealed by the recent NFS sync fix.  The
function can improperly return -1 if the last element scanned is skipped
by the fastfunc.

15 years agoHAMMER Utilities: Sync with 61E
Matthew Dillon [Mon, 14 Jul 2008 20:28:07 +0000 (20:28 +0000)]
HAMMER Utilities: Sync with 61E

* Implement hammer iostats

15 years agoHAMMER 61E/Many: Features
Matthew Dillon [Mon, 14 Jul 2008 20:27:54 +0000 (20:27 +0000)]
HAMMER 61E/Many: Features

* Implement hammer iostats.

15 years agoNFS performance fixes.
Matthew Dillon [Mon, 14 Jul 2008 17:45:49 +0000 (17:45 +0000)]
NFS performance fixes.

* sync on an NFS mount was a big NOP due to a silly bug.

* utimes (setattr w/ mtime-changed) was unconditionally flushing the file,
  causing programs such as cpdup, rsync, rdist, and tar xp to sync on each
  file.

  change it so it does not unconditionally flush the file.

15 years ago2.0 Release Engineering:
Matthew Dillon [Mon, 14 Jul 2008 04:01:45 +0000 (04:01 +0000)]
2.0 Release Engineering:

* Post-branch adjustments to HEAD (2.1)

15 years ago2.0 Release Engineering:
Matthew Dillon [Mon, 14 Jul 2008 03:50:00 +0000 (03:50 +0000)]
2.0 Release Engineering:

* cvsup file, slip tag target

15 years ago2.0 Release Engineering:
Matthew Dillon [Mon, 14 Jul 2008 03:46:52 +0000 (03:46 +0000)]
2.0 Release Engineering:

* Bump DragonFly_version
* Bump HEAD sub-vers

15 years agoHAMMER Utilities: Features
Matthew Dillon [Mon, 14 Jul 2008 03:21:34 +0000 (03:21 +0000)]
HAMMER Utilities: Features

* hammer show: report the CRC in verbose mode.

15 years agoHAMMER 61F/Many: Stabilization w/ simultanious pruning and reblocking
Matthew Dillon [Mon, 14 Jul 2008 03:20:49 +0000 (03:20 +0000)]
HAMMER 61F/Many: Stabilization w/ simultanious pruning and reblocking

* BUG FIX: When doing direct-read check to see if any device buffers
  are aliasing the disk block and flush any we find which are dirty.
  This ensures that reblocked data gets to disk before a direct-read
  tries to read them FROM the disk.

* BUG FIX: Fix a bug introduced in a recent commit where the flusher
  wlll not always completely flush the UNDO FIFO or completely flush
  all meta-data, resulting in a rollback after a normal umount/mount.

* BUG FIX: Direct-writes queue I/O independant of the in-memory record.
  When the backend flusher flushes the record, making it available in the
  B-Tree, make sure that the indepent I/O has completed.  Otherwise
  a later reblocking operation might read the media before the direct-write
  has actually completed.

* BUG FIX: In-memory records are not subject direct-IO, since their data
  is not yet on the media.

* BUG FIX: Do not allow mount to succeed unless all volumes have been found.
  (Reported-by: Sascha Wildner <saw@online.de>)

* BUG FIX: The bd_heatup() call in the reblocker was in the wrong place,
  potentially causing the cursor to shift unexpectedly.

* Reorient some of the buffer invalidation code by enhancing
  the reservation code.

* Add read CRC verification logic for some direct-reads, but comment it out
  because the VM system's bogus-page replacement breaks it.

15 years agoKernel support for HAMMER:
Matthew Dillon [Mon, 14 Jul 2008 03:09:00 +0000 (03:09 +0000)]
Kernel support for HAMMER:

* Add another type to the bio->bio_caller_info1 union

* Add two new flags to getblk(), used by the cluster code.

  GETBLK_SZMATCH - Tell getblk() to fail and return NULL if a
  pre-existing buffer's size does not match
  the requested size (this prevents getblk()
  from doing a potentially undesired bwrite()
  sequence).

  GETBLK_NOWAIT - Tell getblk() to use a non-blocking lock.

* pop_bio() now returns the previous BIO (or NULL if there is no previous
  BIO).  This allows HAMMER to chain bio_done()'s

* Fix a bug in cluster_read().  The cluster code's read-ahead at the
  end could go past the caller-specified limit and force a block to
  the wrong block size.

15 years agoFix an asf core dump.
Matthew Dillon [Mon, 14 Jul 2008 00:09:42 +0000 (00:09 +0000)]
Fix an asf core dump.

Submitted-by: ejc <eric.j.christeson@gmail.com>
15 years agoSync the 'hammer show' description with reality.
Sascha Wildner [Sun, 13 Jul 2008 22:18:18 +0000 (22:18 +0000)]
Sync the 'hammer show' description with reality.

15 years agoUniformly refer to 'B-tree'.
Sascha Wildner [Sun, 13 Jul 2008 22:14:16 +0000 (22:14 +0000)]
Uniformly refer to 'B-tree'.

15 years agoUnload the bus dmamap, which was successfully loaded
Sepherosa Ziehau [Sun, 13 Jul 2008 11:02:50 +0000 (11:02 +0000)]
Unload the bus dmamap, which was successfully loaded

15 years agoWe're building live CDs using the installer in base for some time now,
Sascha Wildner [Sun, 13 Jul 2008 10:55:05 +0000 (10:55 +0000)]
We're building live CDs using the installer in base for some time now,
so they don't need to identify anymore as being built with it.

15 years agoFix deadlock occuring when booting vkernel from gdb. One lwp in the vkernel
Nicolas Thery [Sun, 13 Jul 2008 10:28:51 +0000 (10:28 +0000)]
Fix deadlock occuring when booting vkernel from gdb.  One lwp in the vkernel
sends a signal to another one and is preempted by the signal receiving one in
userexit().  As the vkernel is traced, the vkernel process is stopped and the
receiving lwp stops too.  The emitting lwp then resumes and blocks later on a
condition variable.  The gdb process sleeps on wait(2) which never completes
because the emitting lwp is not stopped.

To prevent this, stop lwps in userexit(), after lwkt_reschedule, if their
owning process is stopped.

Reported-by: Simon Schubert <corecode@fs.ei.tum.de>
15 years agoHAMMER 61E/Many: Stabilization, Performance
Matthew Dillon [Sun, 13 Jul 2008 09:32:48 +0000 (09:32 +0000)]
HAMMER 61E/Many: Stabilization, Performance

* PERFORMANCE: hammer_sync_inode() was generating a new transaction id
  for each inode, causing hammer_btree_do_propagation() to have to
  modify B-Tree nodes all the way to root on a per-file basis when
  syncing a rm -rf.

  Change the code to use the flusher's transaction id so all inodes
  bundled into the same flush group use the same transaction id.

* BUG FIX:  The reblocker was able to blow out the buffer cache with
  dirty data buffers.  Even though HAMMER allows these buffers to be
  flushed to the disk at any time by the kernel, calls to bwillwrite()
  are still needed to prevent a buffer cache deadlock.

15 years agoIncreate receive max coalesced bds to 80 to prevent system from being
Sepherosa Ziehau [Sun, 13 Jul 2008 03:57:41 +0000 (03:57 +0000)]
Increate receive max coalesced bds to 80 to prevent system from being
livelocked when 64bytes packets are injected @1.48Mpps.

It's RX side interrupt moderation logic is quite similar to et(4)'s:
(# recved packets > recv max coalesced bds) || (ticks > recv coalescing ticks)

# The 5750A1 I have tested could only sink packets @1.26Mpps

15 years agoUse a 64 bit quantity to collect file size data instead of
Matthew Dillon [Sun, 13 Jul 2008 03:37:43 +0000 (03:37 +0000)]
Use a 64 bit quantity to collect file size data instead of
32 bits, fixing overflows in the printed output.

Requested-by: "Trevor Kendall" <trevorjkendall@gmail.com>
15 years agoperror() will print its own colon.
Sascha Wildner [Sun, 13 Jul 2008 02:02:40 +0000 (02:02 +0000)]
perror() will print its own colon.

15 years agoHAMMER 61G/Many: Stabilization of new flush_group code
Matthew Dillon [Sun, 13 Jul 2008 01:12:41 +0000 (01:12 +0000)]
HAMMER 61G/Many: Stabilization of new flush_group code

* The mirroring, reblocking, and pruning code are now more robust in
  checking that too many meta-data buffers have not built up.

* Fix a bug in the flusher (today's flusher work) where pure meta-data
  changes to the media were not being flushed unless there was also a
  modified inode or two to flush.

15 years agoTypo fixing & minor cleanup.
Sascha Wildner [Sun, 13 Jul 2008 00:56:06 +0000 (00:56 +0000)]
Typo fixing & minor cleanup.

15 years agoHAMMER 61F2/Many: Fix bug in last commit
Matthew Dillon [Sat, 12 Jul 2008 23:55:22 +0000 (23:55 +0000)]
HAMMER 61F2/Many: Fix bug in last commit

* ip -> dip (pun intended)

15 years agoHAMMER 61F/Many: Stabilization
Matthew Dillon [Sat, 12 Jul 2008 23:47:13 +0000 (23:47 +0000)]
HAMMER 61F/Many: Stabilization

* Fix a bug triggered by rm -rf where HAMMER was failling to wait for
  reclaimed inodes to drain, allowing a build-up that would result in
  a kmalloc() pool-full panic.

  Add a required call to hammer_inode_waitreclaims() in the dounlink
  code.  Because this code acquires and releases inodes without having
  to mess around with related vnodes, it bypassed the reclaim checks in
  the vnode path.

Reported-by: Michael Neumann <mneumann@ntecs.de>
15 years agoHAMMER Utilities: Cleanup
Matthew Dillon [Sat, 12 Jul 2008 23:05:30 +0000 (23:05 +0000)]
HAMMER Utilities: Cleanup

* Cleanup the printfs for mirror-read, mirror-write, and mirror-copy.

15 years agoHAMMER 61E/Many: Stabilization, Performance
Matthew Dillon [Sat, 12 Jul 2008 23:04:50 +0000 (23:04 +0000)]
HAMMER 61E/Many: Stabilization, Performance

* The UNDO FIFO could get over-full, causing an assertion.  This was because
  certain load tests could cuase directories to end up with tens of
  thousands of directory entries and all of them were being flushed in
  a single flush group.

  Rewrite the flush group infrastructure to fix the issue.  Instead of
  having a two-stage flush we now have flush compartmentalization with
  the new hammer_flush_group structure.  Flushes can thus be broken down
  into transactions that don't blow out the UNDO FIFO.

* Improve flush performance by quite a bit.  The new infrastructure
  generates fewer B-Tree conflicts and appears to flush the work more
  smoothly, probably owing to the fact that the upper size of each
  flush group is now bounded.

15 years agoAdd quirk for the Samsung YP-U3.
Peter Avalos [Sat, 12 Jul 2008 20:36:06 +0000 (20:36 +0000)]
Add quirk for the Samsung YP-U3.

Obtained-from: FreeBSD

15 years agoFix an venerable bug: if we're reducing a rule that has an empty
Michael Neumann [Sat, 12 Jul 2008 16:52:48 +0000 (16:52 +0000)]
Fix an venerable bug: if we're reducing a rule that has an empty
right hand side and the yacc stackpointer is pointing at the very
end of the allocated stack, we end up accessing the stack out of
bounds by the implicit $$ = $1 action.

Obtained-from: OpenBSD (skeleton.c rev 1.29)

15 years ago* Add support for the nVidia MCP61, MCP65, MCP67, MCP73 and MCP77
Michael Neumann [Sat, 12 Jul 2008 16:38:10 +0000 (16:38 +0000)]
* Add support for the nVidia MCP61, MCP65, MCP67, MCP73 and MCP77
  series chipsets.

  Obtained-from: FreeBSD
  (ata-chipset.c rev 1.198 and parts of 1.204)
  (ata-pci.h rev 1.77 and 1.82)

* Fix clearing of nVidia interrupts.

  Obtained-from: FreeBSD
  (ata-chipset.c rev 1.214)

* Add support for MCP67 (revision 0xa2) not found in FreeBSD.

15 years agoUpdate build structure for libarchive-2.5.5.
Peter Avalos [Sat, 12 Jul 2008 14:57:33 +0000 (14:57 +0000)]
Update build structure for libarchive-2.5.5.

Start building bsdcpio.  It is not the default, but it can be installed by
setting WITH_BSDCPIO.  bsdcpio will become the default in 2.1, and GNU cpio
will be removed in 2.3.

15 years agoMerge from vendor branch LIBARCHIVE:
Peter Avalos [Sat, 12 Jul 2008 14:42:23 +0000 (14:42 +0000)]
Merge from vendor branch LIBARCHIVE:
Import libarchive-2.5.5.

15 years agoImport libarchive-2.5.5.
Peter Avalos [Sat, 12 Jul 2008 14:42:23 +0000 (14:42 +0000)]
Import libarchive-2.5.5.

15 years ago- Check number of free TX descs before trying to xmit packets
Sepherosa Ziehau [Sat, 12 Jul 2008 11:44:17 +0000 (11:44 +0000)]
- Check number of free TX descs before trying to xmit packets
- Recollect TX descs in nfe_start() if nfe(4) is going to enter OACTIVE
- Use dynamic segment limit for bus_dmamap_load() in nfe_encap()

This change gives me following result on AMD64X2 3600+ with MCP51:

10 seconds, TX 64bytes packets, before/after

256 TX desc
 imtimer | packets     | if_snd full    | if_oerrors
  -125     1.08M/1.08M   84532/82786      90/0
  -250     990K/1.08M    3735886/157125   38872/0

4096 TX desc
 imtimer | packets     | if_snd full    | if_oerrors
  -125     1.08M/1.09M   0/0              45/0
  -250     1.08M/1.10M   0/0              39/0

It gives great improvement when number of TX desc is 256 (default),
and it at least will not loose any packets if number TX desc is 4096.

15 years agoAdd brief description about tx_ring_count
Sepherosa Ziehau [Sat, 12 Jul 2008 09:31:08 +0000 (09:31 +0000)]
Add brief description about tx_ring_count

15 years agoAdd tunable for number of TX desc
Sepherosa Ziehau [Sat, 12 Jul 2008 09:27:49 +0000 (09:27 +0000)]
Add tunable for number of TX desc

15 years agoPrepare to rework nfe_start():
Sepherosa Ziehau [Sat, 12 Jul 2008 06:50:04 +0000 (06:50 +0000)]
Prepare to rework nfe_start():
Allow number of segments to exceeds the limit set by the caller; caller
detects and handles this error accordingly.

15 years ago- Decrease NFE_MAX_SCATTER to 32, should be enough
Sepherosa Ziehau [Sat, 12 Jul 2008 06:16:22 +0000 (06:16 +0000)]
- Decrease NFE_MAX_SCATTER to 32, should be enough
- Increase ifnet.if_snd length to (NFE_TX_RING_COUNT - 1)

15 years agoUse softc sc_rx_ring_count to allocate jumbo frame instead of nfe_rx_ring_count
Sepherosa Ziehau [Sat, 12 Jul 2008 06:01:37 +0000 (06:01 +0000)]
Use softc sc_rx_ring_count to allocate jumbo frame instead of nfe_rx_ring_count

15 years ago- Correct max segment size passed to various bus_dma_tag_create()
Sepherosa Ziehau [Sat, 12 Jul 2008 05:48:32 +0000 (05:48 +0000)]
- Correct max segment size passed to various bus_dma_tag_create()
- Pass softc's sysctl context to SYSCTL_ADD_INT
- Allow jumbo frame allocation to fail during attach.  If jumbo frame
  allocation failed, then MTU was not allowed to set above ETHERMTU
- Don't reinitialize device, if MTU is changed but the device is not
  running yet

15 years agoHAMMER Utillities: Sync with 61D
Matthew Dillon [Sat, 12 Jul 2008 02:48:46 +0000 (02:48 +0000)]
HAMMER Utillities: Sync with 61D

* Add the new pfs-upgrade, pfs-downgrade, and pfs-destroy directives.

* Add more safeties to the PFS directives.

15 years agoHAMMER 61D/Many: Mirroring features
Matthew Dillon [Sat, 12 Jul 2008 02:47:39 +0000 (02:47 +0000)]
HAMMER 61D/Many: Mirroring features

* Split PFS ioctls into their own source file.

* Add additional PFS/mirroring directives:  pfs-upgrade, pfs-downgrade, and
  finish implementing pfs-destroy.  (Yes, that means you can change the
  master/slave mode for a PFS now).

* Consolidate some of the B-Tree deletion code.

* Fix another sync_lock deadlock.

15 years agoCorrect a bug in the last commit.
Matthew Dillon [Sat, 12 Jul 2008 02:44:59 +0000 (02:44 +0000)]
Correct a bug in the last commit.

15 years agoAdd a vclean_unlocked() call that allows HAMMER to try to get rid of a
Matthew Dillon [Sat, 12 Jul 2008 01:09:46 +0000 (01:09 +0000)]
Add a vclean_unlocked() call that allows HAMMER to try to get rid of a
vnode.

15 years agoTunables are called loader tunables; fix this in a few places.
Thomas Nikolajsen [Fri, 11 Jul 2008 23:42:46 +0000 (23:42 +0000)]
Tunables are called loader tunables; fix this in a few places.

15 years agoUpdate netstat help:
Thomas Nikolajsen [Fri, 11 Jul 2008 23:09:18 +0000 (23:09 +0000)]
Update netstat help:
 - sync usage() with netstat.1
 - describe that -W shows MPLS label operations
 - add description of protocol families and carp(4)
 - add cross references to inet6(4) and carp(4)

15 years agoAdd patch from 9.3.5 to 9.3.5-P1. This is for adding randomization
Jeremy C. Reed [Fri, 11 Jul 2008 22:42:30 +0000 (22:42 +0000)]
Add patch from 9.3.5 to 9.3.5-P1. This is for adding randomization
for every query.

The patch for the security issues from 9.3.5 to 9.3.5-P1 (minus
win32 and doc) applies fine to HEAD contrib/bind-9.3 (which is
9.3.4-P1) other than a few RCS ident conflicts.

I made up my own version name for this for DragonFly: 9.3.4-P2.

This is for
http://www.kb.cert.org/vuls/id/800113
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-1447

Note that this -P1 patch is the unoptimized version.
Also on busy recursive caching systems you may need to set limits
to allow many sockets.

This also removes comment from DragonFly's named.conf as
that is now a "warning" and is not recommended. Remove any
query-source restriction for one port or this patch will not be used.

15 years agoUpdate LINT:
Thomas Nikolajsen [Fri, 11 Jul 2008 18:42:14 +0000 (18:42 +0000)]
Update LINT:
 - add reference to kernconf(5)
 - copy description of SMP from GENERIC,
espcially that APIC_IO can be laft out
 - truncate description of polling(4) & dummynet(4),
ensure reference to polling(4) & dummynet(4).
This also removed outdated description of dependency on HZ.
Corret information is in manual pages; it is best to have it in one place.
 - point out that SOFTUPDATES applies to UFS only.
 - add HAMMER to list of filesystems which cant be build as module.
 - point outthat ATA_STATIC_ID is for NATA also, not just ATA.

15 years agoAdd prototype for crc32_ext().
Sascha Wildner [Fri, 11 Jul 2008 11:59:44 +0000 (11:59 +0000)]
Add prototype for crc32_ext().

15 years agoMake support for polling(4) more visible,
Thomas Nikolajsen [Fri, 11 Jul 2008 10:38:50 +0000 (10:38 +0000)]
Make support for polling(4) more visible,
by including a sentence; not only a cross reference to polling(4).
bce.4 and bge.4 was missing any refence to polling(4).
Also add sentence with general reference to ifconfig(8) in manual pages missing it.

15 years agoChange how `options INCLUDE_CONFIG_FILE' is fixed:
Thomas Nikolajsen [Fri, 11 Jul 2008 09:28:20 +0000 (09:28 +0000)]
Change how `options INCLUDE_CONFIG_FILE' is fixed:
use gcc'ism, __used attribute,
instead of relying on compiler not doing global optimization.
This also doesn't introduce name space pollution.
Also add comment.

Suggested-by: corecode
15 years agoHAMMER 61C/Many: Stabilization
Matthew Dillon [Fri, 11 Jul 2008 05:44:23 +0000 (05:44 +0000)]
HAMMER 61C/Many: Stabilization

* Clean up flusher sequencing for the mirroring, pruning, and reblocking
  code.  Check free space and don't let the buffer cache implode.

15 years agoHAMMER 61B/Many: Stabilization
Matthew Dillon [Fri, 11 Jul 2008 01:22:29 +0000 (01:22 +0000)]
HAMMER 61B/Many: Stabilization

* Giving the sync_lock's exclusive locks priority over shared locks caused
  a 3-way deadlock, revert to using normal shared locks.

* Move the syncer_lock deeper, closer to the code that actually needs to
  hold but still paying attention to atomicy requirements.  This reduces
  lock contention and improves performance with parallel loads.

Reported-by: Michael Neumann (using his file-creator program)
15 years agoAdd remains from the libreadline removal.
Sascha Wildner [Thu, 10 Jul 2008 22:52:18 +0000 (22:52 +0000)]
Add remains from the libreadline removal.

15 years agoNuke libreadline, it's no longer being built.
Sascha Wildner [Thu, 10 Jul 2008 22:45:27 +0000 (22:45 +0000)]
Nuke libreadline, it's no longer being built.

15 years agoAdd some files that seem to have slipped during the conversion from
Sascha Wildner [Thu, 10 Jul 2008 22:24:18 +0000 (22:24 +0000)]
Add some files that seem to have slipped during the conversion from
etc/Makefile to Makefile_upgrade.inc.

15 years agoHAMMER 61A/Many: Stabilization
Matthew Dillon [Thu, 10 Jul 2008 21:23:58 +0000 (21:23 +0000)]
HAMMER 61A/Many: Stabilization

* Fix a buffer exhaustion issue.  When creating large numbers of empty files
  a single inode sync of the directory can exhaust the buffer cache because
  not enough other things get dirty enough to force a flush.

  Put a check in the record syncing code and do a partial finalization if
  necessary to avoid deadlocking the buffer cache.

* Fix a panic caused by a missing call to hammer_cursor_deleted_element().

Reported-by: Michael Neumann <mneumann@ntecs.de>,
     Gergo Szakal <bastyaelvtars@gmail.com>

15 years agoThe symlink generated during "hammer snapshot" should be "/filesystem/@@0x.."
Michael Neumann [Thu, 10 Jul 2008 18:47:22 +0000 (18:47 +0000)]
The symlink generated during "hammer snapshot" should be "/filesystem/@@0x.."
and not "/filesystem@@0x...".

15 years agostyle: compare return value of getopt() against -1 rather than EOF
Sascha Wildner [Thu, 10 Jul 2008 18:29:52 +0000 (18:29 +0000)]
style: compare return value of getopt() against -1 rather than EOF

15 years agoAdd crc32_ext() - allows continuation of a 32 bit crc.
Matthew Dillon [Thu, 10 Jul 2008 17:42:18 +0000 (17:42 +0000)]
Add crc32_ext() - allows continuation of a 32 bit crc.

15 years agoRemove unused file.
Sascha Wildner [Thu, 10 Jul 2008 10:26:11 +0000 (10:26 +0000)]
Remove unused file.

15 years agoHAMMER Utilities: Sync with 60J
Matthew Dillon [Thu, 10 Jul 2008 04:44:58 +0000 (04:44 +0000)]
HAMMER Utilities: Sync with 60J

* Minor changes, enhance mirror-dump a bit.

15 years agoHAMMER 60J/Many: Mirroring
Matthew Dillon [Thu, 10 Jul 2008 04:44:33 +0000 (04:44 +0000)]
HAMMER 60J/Many: Mirroring

Finish implementing the core mirroring algorithm.  The last bit was to add
support for no-history deletions on the master.  The same support also covers
masters which have pruned records away prior to the mirroring operation.
As with the work done previously, the algorithm is 100% queue-less and
has no age limitations.  You could wait a month, and then do a mirroring
update from master to slave, and the algorithm will efficiently handle it.

The basic issue that this commit tackles is what to do when records are
physically deleted from the master.  When this occurs the mirror master
cannot provide a list of records to delete to its slaves.

The solution is to use the mirror TID propagation to physically identify
swaths of the B-Tree in which a deletion MAY have taken place.  The
mirroring code uses this information to generate PASS and SKIP mrecords.

A PASS identifies a record (sans its data payload) that remains within
the identified swath and should already exist on the target.  The
mirroring target does a simultanious iteration of the same swath on the
target B-Tree and deletes records not identified by the master.

A SKIP is the heart of the algorithm's efficiency.  The same mirror TID
stored in the B-Tree can also identify large swaths of the B-Tree for which
*NO* deletions have taken place (which will be most of the B-Tree).  One
SKIP Record can identify an arbitrarily large swath.  The target uses
the SKIP record to skip that swath on the target.  No scan takes place.
SKIP records can be generated from any internal node of the B-Tree and cover
that node's entire sub-tree.

This also provides us with the feature where the retention policy can be
completely different between a master and a mirror, or between mirrors.
When the slave identifies a record that must be deleted through the above
algorithm it only needs to mark it as historically deleted, it does not
have to physically delete the record.

15 years agoUpdate example disklabel to bigger slice,
Thomas Nikolajsen [Thu, 10 Jul 2008 03:15:56 +0000 (03:15 +0000)]
Update example disklabel to bigger slice,
using partition sizes from recommendation and
Hammer partition of more realistic size.

Syncronize disklabel64.8 with disklabel.8.
Delete comments on partition `c' from disklabel64.8,
as partition `c' isn't special in disklabel64 label.

Change `M' to `MB' in disklabel64 output for partition sizes,
to make unit more clear.

15 years agoUpdate recommendation for disk partition sizes;
Thomas Nikolajsen [Thu, 10 Jul 2008 01:01:44 +0000 (01:01 +0000)]
Update recommendation for disk partition sizes;
with current abundance of disk space it is a bad idea to make scheme too tight.

15 years agoUpdate estimate of extra disk space for debug kernel from 10MB to 60MB.
Thomas Nikolajsen [Thu, 10 Jul 2008 00:46:57 +0000 (00:46 +0000)]
Update estimate of extra disk space for debug kernel from 10MB to 60MB.
Current extra disk space for GENERIC w/ modules is 53MB (make.conf empty),
these numbers usually grow in time (more features).

15 years agoAdd some cross references.
Thomas Nikolajsen [Thu, 10 Jul 2008 00:28:25 +0000 (00:28 +0000)]
Add some cross references.

15 years agoFix sockopt syscalls for the Nth time.
Aggelos Economopoulos [Thu, 10 Jul 2008 00:19:27 +0000 (00:19 +0000)]
Fix sockopt syscalls for the Nth time.

- update linux sys_{g,s}etsockopt to do copy{in,out}
- make sure we don't try to kmalloc(0) (use NULL)
- only test non-NULL addresses with kva_p()

15 years agoUpdate FILES section and add a few extra cross references.
Thomas Nikolajsen [Wed, 9 Jul 2008 23:54:42 +0000 (23:54 +0000)]
Update FILES section and add a few extra cross references.

15 years agoFix `option INCLUDE_CONFIG_FILE',
Thomas Nikolajsen [Wed, 9 Jul 2008 23:52:16 +0000 (23:52 +0000)]
Fix `option INCLUDE_CONFIG_FILE',
which was broken using gcc4.1.2 (default compiler).

Solution is to drop `static' for variable containing CONFIG.
Name of variable also change from config to config_INCLUDE_CONFIG_FILE,
to minimize chance of name clash, now that it is made public.
Variable isn't used, so gcc optimized it away.

15 years agoHAMMER Utilities: Mirroring work
Matthew Dillon [Wed, 9 Jul 2008 20:48:33 +0000 (20:48 +0000)]
HAMMER Utilities: Mirroring work

* Change the key used for the PFS config structure.

15 years agoInclude HAMMER file systems when checking for setuid diffs.
Sascha Wildner [Wed, 9 Jul 2008 20:33:32 +0000 (20:33 +0000)]
Include HAMMER file systems when checking for setuid diffs.

15 years agoAdd HAMMER to the list of file systems to be searched by locate.updatedb.
Sascha Wildner [Wed, 9 Jul 2008 19:53:27 +0000 (19:53 +0000)]
Add HAMMER to the list of file systems to be searched by locate.updatedb.

15 years agoClarify that the argument to -t is in seconds.
Sascha Wildner [Wed, 9 Jul 2008 18:32:19 +0000 (18:32 +0000)]
Clarify that the argument to -t is in seconds.

15 years agoFix error: `#' can be escaped by `\', not `\\'.
Thomas Nikolajsen [Wed, 9 Jul 2008 18:27:30 +0000 (18:27 +0000)]
Fix error: `#' can be escaped by `\', not `\\'.

Obtained-from: FreeBSD

15 years agoFix typo.
Thomas Nikolajsen [Wed, 9 Jul 2008 18:19:39 +0000 (18:19 +0000)]
Fix typo.

15 years agoFix typos.
Thomas Nikolajsen [Wed, 9 Jul 2008 18:15:10 +0000 (18:15 +0000)]
Fix typos.

15 years agoChange .Fx to .Dx where appropriate.
Thomas Nikolajsen [Wed, 9 Jul 2008 17:50:44 +0000 (17:50 +0000)]
Change .Fx to .Dx where appropriate.

15 years agoFix paths;
Thomas Nikolajsen [Wed, 9 Jul 2008 17:38:31 +0000 (17:38 +0000)]
Fix paths;
paths changed in the past when source tree restructured.

15 years agoIn manual pages and LINT,
Thomas Nikolajsen [Wed, 9 Jul 2008 16:23:56 +0000 (16:23 +0000)]
In manual pages and LINT,
 - Fix paths;
paths changed in past when source tree restructured.
 - Change .Fx/FreeBSD to .Dx/DragonFly where appropriate.

15 years agoChange name of kernel tunable from imtime to imtimer,
Thomas Nikolajsen [Wed, 9 Jul 2008 15:51:43 +0000 (15:51 +0000)]
Change name of kernel tunable from imtime to imtimer,
to match name of corresponding sysctl variable.

Update nfe.4 with support for MCP73/77/79, and
add description of sysctl variables / tunables.

15 years agoUpdate et(4) manpage after recent change
Sepherosa Ziehau [Wed, 9 Jul 2008 15:45:23 +0000 (15:45 +0000)]
Update et(4) manpage after recent change

15 years ago- Recollect TX descs, if et(4) is going to enter OACTIVE state.
Sepherosa Ziehau [Wed, 9 Jul 2008 15:42:12 +0000 (15:42 +0000)]
- Recollect TX descs, if et(4) is going to enter OACTIVE state.
- Add additional parameter to et_txeof(), so that calling et_txeof() in
  et_start() will not create recursion.
- Increase TX segments per interrupt to 256 after above changes.

This gives me additional +10Kpps 64bytes packet TX performance improvement
(now 918Kpps) and interrupt rate reduction.

15 years agoUpdate et(4) manpage according to recent changes
Sepherosa Ziehau [Wed, 9 Jul 2008 14:00:44 +0000 (14:00 +0000)]
Update et(4) manpage according to recent changes

15 years ago- Increase RX coalesced packets from 32 to 129 to avoid being livelocked when
Sepherosa Ziehau [Wed, 9 Jul 2008 13:57:59 +0000 (13:57 +0000)]
- Increase RX coalesced packets from 32 to 129 to avoid being livelocked when
  ~1.48Mpps 64bytes packets are injected.
- Increase RX coalescing ticks from 20 to 25 and correct the comment about its
  unit: it is 4us instead of 10us (thanks go to jsg@openbsd.org for giving me
  the informational material :).

# An interrupt is generated if
# (RX pkt count > ET_RX_INTR_NPKTS) || (timer > ET_RX_INTR_DELAY)
#
# I thought the interrupt generation condition was
# (RX pkt count > ET_RX_INTR_NPKTS) && (timer > ET_RX_INTR_DELAY)

15 years agoHAMMER Utilities: Sync with 60I
Matthew Dillon [Wed, 9 Jul 2008 10:32:30 +0000 (10:32 +0000)]
HAMMER Utilities: Sync with 60I

* Changes in the way PFS's are created and managed.

* Replace the pfs-create directive with pfs-master and pfs-slave.

* Add more checks against stupid user errors.

* A cycle file is no longer needed when using mirror-copy.  Mirror-copy
  now uses a two-way protocol and figures out what TID ranges need to
  be copied.

15 years agoHAMMER 60I/Many: Mirroring
Matthew Dillon [Wed, 9 Jul 2008 10:29:20 +0000 (10:29 +0000)]
HAMMER 60I/Many: Mirroring

* Flesh out the mirroring code a lot.  It is now 90% done.

* Change the way PFS's are managed.  The PFS management structure is no
  longer associated with the PFS root inode.  Instead all PFS management
  structures, for all PFSs, are associated with the master root inode.

  This allows a mirroring slave to also mirror the root inode itself.

* Remove the directory localization hacks used to link a PFS to its parent.
  PFS's are no longer linked to their parent.  Instead, a special
  @@PFS softlink is created.

* The master/slave mode must now be selected when a PFS is created and
  cannot be changed.

* PFSs are accessed via a special @@PFS softlink created in the parent
  directory.  HAMMER manipulates this special softlink in the readlink()
  command and returns a longer form to the kernel which changes whenever
  the snapshot TID changes.

  This allows updates to slave PFSs by mirroring commands to not create
  stale system caches.  Every time you CD through the special softlink
  you get the most recent completed snapshot of the PFS.

* Userland now manipulates PFS ids as a simple integer in the range 0-65535.

15 years agoAdd PF_MPLSOPS, route flag `m', to netstat.8.
Thomas Nikolajsen [Wed, 9 Jul 2008 09:29:17 +0000 (09:29 +0000)]
Add PF_MPLSOPS, route flag `m', to netstat.8.
Add mpls as -f option: `netstat -f mpls'.

15 years agoAdd some OLD_PKGSRC_PACKAGES again (accidentally removed in the last commit).
Sascha Wildner [Wed, 9 Jul 2008 07:54:34 +0000 (07:54 +0000)]
Add some OLD_PKGSRC_PACKAGES again (accidentally removed in the last commit).

15 years agoBuild the installer as part of normal build-/installworld if WANT_INSTALLER
Sascha Wildner [Wed, 9 Jul 2008 07:21:03 +0000 (07:21 +0000)]
Build the installer as part of normal build-/installworld if WANT_INSTALLER
is set.

Clean up nrelease/Makefile to define WANT_INSTALLER if the 'installer'
target is specified.

15 years agoAdd description for CVS_UPDATE and update description for SUP* variables.
Thomas Nikolajsen [Tue, 8 Jul 2008 15:12:36 +0000 (15:12 +0000)]
Add description for CVS_UPDATE and update description for SUP* variables.

15 years agoMake et(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2
Sepherosa Ziehau [Tue, 8 Jul 2008 14:36:02 +0000 (14:36 +0000)]
Make et(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2

15 years agoata(4) isn't used in GENERIC anymore.
Thomas Nikolajsen [Tue, 8 Jul 2008 14:12:45 +0000 (14:12 +0000)]
ata(4) isn't used in GENERIC anymore.

15 years agoUpdate file list and description.
Thomas Nikolajsen [Tue, 8 Jul 2008 14:04:11 +0000 (14:04 +0000)]
Update file list and description.

15 years agoHandle MPLS on ETHER_INPUT2 code path
Sepherosa Ziehau [Tue, 8 Jul 2008 13:50:52 +0000 (13:50 +0000)]
Handle MPLS on ETHER_INPUT2 code path

15 years agoUpdate names of rc.d diskless scripts.
Thomas Nikolajsen [Tue, 8 Jul 2008 12:08:29 +0000 (12:08 +0000)]
Update names of rc.d diskless scripts.

15 years agoAdd description of DragonFly-src-supfile.
Thomas Nikolajsen [Tue, 8 Jul 2008 11:59:15 +0000 (11:59 +0000)]
Add description of DragonFly-src-supfile.
Expand TABs.