11 years agoAdd __sreadahead() to help with pkgsrc's devel/m4.
Matthew Dillon [Tue, 15 Apr 2008 01:16:14 +0000 (01:16 +0000)]
Add __sreadahead() to help with pkgsrc's devel/m4.

11 years agos/.Nm/.Xr/
Sascha Wildner [Mon, 14 Apr 2008 22:18:14 +0000 (22:18 +0000)]

11 years agoUpdate the documentation for umtx_sleep() and umtx_wakeup().
Matthew Dillon [Mon, 14 Apr 2008 20:17:41 +0000 (20:17 +0000)]
Update the documentation for umtx_sleep() and umtx_wakeup().

11 years agoFix some issues in libthread_xu's condvar implementation.
Matthew Dillon [Mon, 14 Apr 2008 20:12:41 +0000 (20:12 +0000)]
Fix some issues in libthread_xu's condvar implementation.

* Non-broadcast mode is not guaranteed to signal just one waiter, loosen
  it up a bit to close race conditions and signal more if necessary.

* Clean up the condition structure.  Do not try to track non-broadcast
  wakeups.  Do not try to block waiting for individual wakeups... the
  spec does not require it and, in fact, doing so can create more
  problems then it solves.

* Load oldseq from cv->c_seqno *BEFORE* releasing the passed mutex to
  close a race.  The mutex is there precisely so that userland can
  guarantee that no race will occur between waiter and signaler.

Reported-by: Jordan Gordeev <jgordeev@dir.bg>,
             "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>

11 years agoFix a bug in umtx_sleep(). This function sleeps on the mutex's physical
Matthew Dillon [Mon, 14 Apr 2008 20:00:29 +0000 (20:00 +0000)]
Fix a bug in umtx_sleep().  This function sleeps on the mutex's physical
address and will get lost if the physical page underlying the VM address is
copied on write.  This case can occur when a threaded program fork()'s.

Introduce a VM page event notification mechanism and use it to wake-up
the umtx_sleep() if the underlying page takes a COW fault.

Reported-by: Jordan Gordeev <jgordeev@dir.bg>,
     "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>

11 years agoMinor optimization to LIST_FOREACH_MUTABLE taken from FreeBSD.
Matthew Dillon [Mon, 14 Apr 2008 19:44:18 +0000 (19:44 +0000)]
Minor optimization to LIST_FOREACH_MUTABLE taken from FreeBSD.

11 years agoDon't free held clean pages when asked to clean.
Matthew Dillon [Mon, 14 Apr 2008 19:43:02 +0000 (19:43 +0000)]
Don't free held clean pages when asked to clean.

11 years agoFix ktrace for threaded processes. Move the KTRFAC_ACTIVE flag to the LWP
Matthew Dillon [Mon, 14 Apr 2008 12:01:53 +0000 (12:01 +0000)]
Fix ktrace for threaded processes.  Move the KTRFAC_ACTIVE flag to the LWP
so a ktrace occuring on one LWP does not cause another LWP to fail to log
a trace entry.

11 years agoFix various typos in our manual pages.
Sascha Wildner [Mon, 14 Apr 2008 08:17:09 +0000 (08:17 +0000)]
Fix various typos in our manual pages.

11 years agoFix multiple issues with -p<parallel>, including several data corruption
Matthew Dillon [Mon, 14 Apr 2008 05:40:51 +0000 (05:40 +0000)]
Fix multiple issues with -p<parallel>, including several data corruption

* Use malloc'd buffers instead of static buffers
* Fix memory leaks
* Fix races with hardlink tracking structures
* Fix bug in remote mknod (it wasn't creating the node on the remote host)
* Fix stack blowouts from deep recursions by starting a new thread.
* Postpend the pid for tmp file creation.

11 years agopfsync_state doesn't have or need a hash field, the state will be hashed
Matthew Dillon [Sat, 12 Apr 2008 17:39:41 +0000 (17:39 +0000)]
pfsync_state doesn't have or need a hash field, the state will be hashed
when it is moved into a real pf_state structure.

Reported-by: Sascha Wildner <saw@online.de>
11 years agoAdd MLINKS for MD[245]Pad.3.
Sascha Wildner [Sat, 12 Apr 2008 08:38:40 +0000 (08:38 +0000)]
Add MLINKS for MD[245]Pad.3.

11 years agoStart sentence on a new line (and remove trailing space).
Sascha Wildner [Fri, 11 Apr 2008 20:22:18 +0000 (20:22 +0000)]
Start sentence on a new line (and remove trailing space).

11 years ago* Bump date for recent new features.
Sascha Wildner [Fri, 11 Apr 2008 18:27:44 +0000 (18:27 +0000)]
* Bump date for recent new features.

* Add -l to the synopsis.

* Some little mdoc fixes.

11 years agoImplement a number of major new features to PF.
Matthew Dillon [Fri, 11 Apr 2008 18:21:49 +0000 (18:21 +0000)]
Implement a number of major new features to PF.

* Implement several new options to keep/modulate/synproxy state.
  'pickups', 'no-pickups', and 'hash-only'.  Example:

    pass on $ext_if inet from any to any keep state (pickups)

* Implement a SET directive to set the default keep policy.  Example:

    set keep-policy keep state (pickups)
    pass on $ext_if inet from any to any

* Implement the 'no state' phrase for rules, disabling any previously
  specified default state policy for that rule (ala OpenBSD).

'pickups' and 'hash-only' imply no flag restrictions, no-pickups implies
flags S/SA.  When pickups are enabled the state code will re-establish state
for existing TCP connections.  Because the tcp options passed in the SYNs
are not known when this occurs, sequence space checking will be disabled
for those connections.  The 'hash-only' mode allows pickups but disables
sequence space checking regardless of whether the SYN packets were observed
or not.

The state code no longer attempts to do sequence space checking if it has
no information on TCP options passed in SYN packets.  The SYN from both
ends must be observed for sequence space checking to occur (which is what
happens by default due to flag restrictions).

It should be noted that OpenBSD defaults to 'keep state' with the equivalent
of no-pickups.  The problem with this is that rebooting you router or
otherwise losing state will cause existing TCP connections to be reset,
and I do not think this is an appropriate default for PF.  DragonFly does
not default to using keep state but introduces the global SET directive
to allow it to be enabled by default.

Finally, note that when using pickups or hash-only, if you desire PF to
not drop TCP connections on loss of state you need to have a few more
rules then usual to pickup on packets going the opposite direction.
For example, if you allow outgoing connections then you ALSO have to keep
state on INCOMING packets with 'flags /S' (i.e. 'established') in order
to ensure that active connections can be re-established on loss of state
by packets in either direction.

This isn't too bad since anyone using queueing has to use multiple rule
sets anyway to ensure that state is established on the proper queue.

In anycase, DragonFly now allows you to pick your poison.  One global SET
directive and you can use OpenBSD's policy, or you can make your own.

In-consultation-with: Max Laier <max@love2party.net>

11 years agoUpdate PORTING instructions for linux to support pthreads.
Matthew Dillon [Fri, 11 Apr 2008 17:33:11 +0000 (17:33 +0000)]
Update PORTING instructions for linux to support pthreads.

11 years agoProperly mark a transaction has being completed so the slave side of
Matthew Dillon [Fri, 11 Apr 2008 17:18:21 +0000 (17:18 +0000)]
Properly mark a transaction has being completed so the slave side of
the connection does not loop forever on its data.

11 years agoClean up remains after the Citrus update.
Sascha Wildner [Fri, 11 Apr 2008 11:18:16 +0000 (11:18 +0000)]
Clean up remains after the Citrus update.

11 years agoProperly detach children so we dont have to pthread_join() them. Fixes
Matthew Dillon [Fri, 11 Apr 2008 08:44:07 +0000 (08:44 +0000)]
Properly detach children so we dont have to pthread_join() them.  Fixes
a resource exhaustion issue which could stall cpdup when used with -pN.

11 years agoMore cpdup work.
Matthew Dillon [Fri, 11 Apr 2008 07:31:05 +0000 (07:31 +0000)]
More cpdup work.

* Add -C which is passed down to ssh to turn on compression.
* Fix a race condition in the hardlink handling code that could occur w/ -pN
* Fix a deadlock in the socket read code.  The connection's read mutex
  must be released before the master mutex can be re-acquired.
* Reduce the I/O block size when running parallel threads to try to avoid
  blocking on write().

11 years agoAdd parallel transaction support for remote source or target specifications.
Matthew Dillon [Thu, 10 Apr 2008 22:09:08 +0000 (22:09 +0000)]
Add parallel transaction support for remote source or target specifications.
The implementation is a bit crude because I don't want to take too many
chances on a codebase that wasn't originally designed to be multi-threaded,
so the master mutex is only released when a thread is waiting for input
on a socket.

* Add the -p<threads> option and compile -pthread by default.  This is only
  useful when the source and/or destination is a remote host.  Note that
  parallel transaction mode will not work with older cpdup binaries on the
  remote end.

  This greatly improves cpdup's performance when operating on a remote
  source and/or target.

* Add -l to force stdout and stderr to be line-buffered.

11 years agoSync Citrus iconv support with NetBSD.
Hasso Tepper [Thu, 10 Apr 2008 10:21:13 +0000 (10:21 +0000)]
Sync Citrus iconv support with NetBSD.

Obtained-from: NetBSD

11 years agoBring the list of variables and function docs in time(9) closer to
Sascha Wildner [Wed, 9 Apr 2008 21:41:59 +0000 (21:41 +0000)]
Bring the list of variables and function docs in time(9) closer to

Derived-from: FreeBSD

11 years agoFix ifdefs to make it possible to use time.h in standards compilant code.
Hasso Tepper [Wed, 9 Apr 2008 07:05:54 +0000 (07:05 +0000)]
Fix ifdefs to make it possible to use time.h in standards compilant code.

Obtained-from: FreeBSD

11 years agoAdd double_t and float_t typedefs for both i386 and amd64 as required by C99.
Hasso Tepper [Wed, 9 Apr 2008 06:44:37 +0000 (06:44 +0000)]
Add double_t and float_t typedefs for both i386 and amd64 as required by C99.

Obtained-from: FreeBSD with modifications

11 years agoSync with FreeBSD:
Sascha Wildner [Tue, 8 Apr 2008 13:23:38 +0000 (13:23 +0000)]
Sync with FreeBSD:

* Change semantics of -i (in-place editing) so that it treats each file
  independently from other files (desired in most practical cases). Keep
  the previous semantics (use a single continuous address space covering
  all files to edit in-place) under -I.

* Add -l option (make output line buffered).

* Make the 'y' command (translate) aware of multibyte characters.

* Add case-insensitive matching, using the 'I' flag, a la GNU sed.

* Remove 3rd clause.

* Raise WARNS to 6.

* Miscellaneous fixes and style(9) issues.

11 years agoRemove references to patches that no longer exist.
Sascha Wildner [Tue, 8 Apr 2008 12:12:53 +0000 (12:12 +0000)]
Remove references to patches that no longer exist.

11 years agoUpdate build for OpenSSH 5.0p1.
Peter Avalos [Mon, 7 Apr 2008 01:20:18 +0000 (01:20 +0000)]
Update build for OpenSSH 5.0p1.

11 years agoMFC 1.33/pf.c from NetBSD. Don't apply a window scale to the window
Matthew Dillon [Mon, 7 Apr 2008 00:43:44 +0000 (00:43 +0000)]
MFC 1.33/pf.c from NetBSD.   Don't apply a window scale to the window
size in a SYN packet.

Partial MFC 1.25/pf.c from NetBSD (specifically 1.487 from OpenBSD).
Fix a bug in the setting of sequence windows in the synproxy case.

11 years agoBring the 'probability' keyword into PF from NetBSD. This feature allows
Matthew Dillon [Sun, 6 Apr 2008 21:12:42 +0000 (21:12 +0000)]
Bring the 'probability' keyword into PF from NetBSD.  This feature allows
a rule to have a probability associated with it which governs whether the
rule is run or not for any given packet.

Suggested-by: =?ISO-8859-1?Q?C=E9dric_Berger?= <cedric@berger.to>
Obtained-from: NetBSD-current

11 years agoMention ALTQ_FAIRQ.
Sascha Wildner [Sun, 6 Apr 2008 19:29:47 +0000 (19:29 +0000)]

11 years agoStart sentences on a new line and bump date for fair queueing.
Sascha Wildner [Sun, 6 Apr 2008 19:29:23 +0000 (19:29 +0000)]
Start sentences on a new line and bump date for fair queueing.

11 years agoLK_EXCLUSIVE has no business being in lockinit.
Peter Avalos [Sun, 6 Apr 2008 19:03:18 +0000 (19:03 +0000)]
LK_EXCLUSIVE has no business being in lockinit.

11 years agoAdd fairq to altq. Fairq is a fair queueing algorithm with bandwidth
Matthew Dillon [Sun, 6 Apr 2008 18:58:16 +0000 (18:58 +0000)]
Add fairq to altq.  Fairq is a fair queueing algorithm with bandwidth
prioritization and a bandwidth delimiter (hogs) to allow low bandwidth
buckets to jump the round robin.  This fairq algorithm is currently unweighted
but traffic can still be classified with the global priority model.  For
each queue traffic is normally round robined by taking a packet from each
bucket in turn.

This feature is primarily intended for edge routers and egress points with
bandwidth constrictions.

* Hogs feature allows low bandwidth buckets to burst.  Low bandwidth can
  mean, e.g. an interactive shell or even simply ack traffic, without
  the need to explicitly classify it.  Bandwidth is managed on a per-bucket

* Prioritization feature allows minimum guaranteed bandwidths based on
  service classifications. e.g. VOIP, web, mail, PtP, etc.

* Weighted fairq not implemented (beyond using classification into priority
  queues), but the circular bucket design makes it a fairly easy task if
  someone wants to do it.

* Add ALTQ_MBUF_STATE_HASHED and generate a hash of the connection state
  in the mbuf header for any packet that you have set 'keep state' for
  in pf.  This is done in PF and is needed by fairq to bucketize

* Add the fairq implementation and a new ALTQ_FAIRQ kernel build option.

* Simple example included below.

ports="{ 25, 80 }"
altq on vke0 fairq bandwidth 500Kb queue { normal, bulk }
queue bulk priority 1 bandwidth 100Kb \
        fairq(buckets 64, hogs 25Kb) qlimit 50
queue normal priority 2 bandwidth 400Kb \
        fairq(buckets 64, hogs 25Kb, default) qlimit 50

pass out on vke0 inet proto tcp from any to any \
        keep state queue normal
pass out on vke0 inet proto tcp from any to any port $ports \
        keep state queue bulk

11 years agoMerge from vendor branch OPENSSH:
Peter Avalos [Sun, 6 Apr 2008 17:29:06 +0000 (17:29 +0000)]
Merge from vendor branch OPENSSH:
Import OpenSSH 5.0p1.

11 years agoImport OpenSSH 5.0p1.
Peter Avalos [Sun, 6 Apr 2008 17:29:06 +0000 (17:29 +0000)]
Import OpenSSH 5.0p1.

11 years agoAdd a line about netrate/
Sepherosa Ziehau [Sun, 6 Apr 2008 03:23:49 +0000 (03:23 +0000)]
Add a line about netrate/

Reminded-by: swildner@
11 years agoAnsify a bit.
Sascha Wildner [Sat, 5 Apr 2008 22:10:14 +0000 (22:10 +0000)]
Ansify a bit.

I've left out raising WARNS since there are still warnings left.

Submitted-by: Kevin L. Kane <kevin.kane@gmail.com>
Dragonfly-bug: <https://bugs.dragonflybsd.org/issue77>

11 years agoFix a snafu with the last commit. Not all of the new AHCI detection support
Matthew Dillon [Sat, 5 Apr 2008 20:13:04 +0000 (20:13 +0000)]
Fix a snafu with the last commit.  Not all of the new AHCI detection support
was properly brought in, causing intel AHCI detection to panic with a
NULL pointer indirection.

Reported-by: Cristi Magherusan <cristi.magherusan@net.utcluj.ro>
11 years agoDRM update to git snapshot from 2008-01-04.
Hasso Tepper [Sat, 5 Apr 2008 18:12:30 +0000 (18:12 +0000)]
DRM update to git snapshot from 2008-01-04.

11 years agoRemove trailing space.
Sascha Wildner [Sat, 5 Apr 2008 09:13:24 +0000 (09:13 +0000)]
Remove trailing space.

11 years agoFix typo in comment.
Sascha Wildner [Sat, 5 Apr 2008 09:12:45 +0000 (09:12 +0000)]
Fix typo in comment.

11 years agoSync with FreeBSD (adds -n, -s and -x).
Sascha Wildner [Sat, 5 Apr 2008 08:50:41 +0000 (08:50 +0000)]
Sync with FreeBSD (adds -n, -s and -x).

11 years agoFix typo.
Matthias Schmidt [Sat, 5 Apr 2008 08:07:11 +0000 (08:07 +0000)]
Fix typo.

Noticed-by: swildner@
11 years agoWhen aarpwhohas() is called, interface's serializer has already been held:
Sepherosa Ziehau [Sat, 5 Apr 2008 07:57:22 +0000 (07:57 +0000)]
When aarpwhohas() is called, interface's serializer has already been held:
ether_output() -> aarpresolve() -> aarpwhohas()

11 years agoHold serializer of the correct interface when calling if_output
Sepherosa Ziehau [Sat, 5 Apr 2008 07:40:28 +0000 (07:40 +0000)]
Hold serializer of the correct interface when calling if_output

11 years agotunoutput() is declared as static function and is used in this way too.
Sepherosa Ziehau [Sat, 5 Apr 2008 06:28:35 +0000 (06:28 +0000)]
tunoutput() is declared as static function and is used in this way too.

11 years agosppp_output() is installed in ifnet.if_output and is only called through that
Sepherosa Ziehau [Sat, 5 Apr 2008 05:57:07 +0000 (05:57 +0000)]
sppp_output() is installed in ifnet.if_output and is only called through that
interface, so it has already been serialized.

11 years agoatm_output() must be serialized.
Sepherosa Ziehau [Sat, 5 Apr 2008 05:30:29 +0000 (05:30 +0000)]
atm_output() must be serialized.

11 years agoTreat the argument as a file name only if it contains a '/'.
Sascha Wildner [Fri, 4 Apr 2008 19:25:46 +0000 (19:25 +0000)]
Treat the argument as a file name only if it contains a '/'.

This catches the case where a user would do 'man foo' from a directory
which contains a file named foo.

11 years agoStart sentences on a new line and add some markup.
Sascha Wildner [Fri, 4 Apr 2008 19:09:50 +0000 (19:09 +0000)]
Start sentences on a new line and add some markup.

11 years agoUnbreak UP building
Sepherosa Ziehau [Thu, 3 Apr 2008 16:02:32 +0000 (16:02 +0000)]
Unbreak UP building

11 years agoParallelize ip_flow:
Sepherosa Ziehau [Thu, 3 Apr 2008 13:43:29 +0000 (13:43 +0000)]
Parallelize ip_flow:
- Create per-CPU ipflow hash table.  During initial ipflow installation, route
  entry to the destination is allocated on each CPU and cached in the ipflow,
  so each CPU will only access the route entry owned by itself.
- Timeout processing on per-CPU ipflow hash table is initialized by broadcasting
  IPI to each CPU.  In IPI, a per-CPU netmsg is used to inform CPU local netisr
  to do the real timout processing.
- Add sysctl node to show how many ipflow entries are used on the each CPU.

11 years agoAdd counters for serializer enter/try
Sepherosa Ziehau [Thu, 3 Apr 2008 12:55:15 +0000 (12:55 +0000)]
Add counters for serializer enter/try

Suggested-by: aggelos@
11 years agoAdd support for the Core 2 Duo T7500.
Sascha Wildner [Wed, 2 Apr 2008 21:25:30 +0000 (21:25 +0000)]
Add support for the Core 2 Duo T7500.

Submitted-by: Cristi Magherusan <cristi.magherusan@net.utcluj.ro>
11 years agoFix buffer overflow in config parser.
Joerg Sonnenberger [Wed, 2 Apr 2008 14:46:37 +0000 (14:46 +0000)]
Fix buffer overflow in config parser.

11 years ago- Save statistics
Sepherosa Ziehau [Wed, 2 Apr 2008 14:18:55 +0000 (14:18 +0000)]
- Save statistics
- Factor out common routine to end threads

11 years agoConstify second parameter of timeval{add,sub}()
Sepherosa Ziehau [Wed, 2 Apr 2008 14:16:16 +0000 (14:16 +0000)]
Constify second parameter of timeval{add,sub}()

11 years agoCorrect print format
Sepherosa Ziehau [Wed, 2 Apr 2008 13:27:24 +0000 (13:27 +0000)]
Correct print format

11 years ago- Add two fields in lwkt_serialize to profile serializer contention.
Sepherosa Ziehau [Wed, 2 Apr 2008 13:11:48 +0000 (13:11 +0000)]
- Add two fields in lwkt_serialize to profile serializer contention.
- Expose serializer contention data through em's private sysctl tree.

11 years agoUse sysctl_ctx in softc
Sepherosa Ziehau [Wed, 2 Apr 2008 11:48:30 +0000 (11:48 +0000)]
Use sysctl_ctx in softc

11 years ago* MLINK nrelease(7) -> release(7).
Sascha Wildner [Tue, 1 Apr 2008 21:10:26 +0000 (21:10 +0000)]
* MLINK nrelease(7) -> release(7).

* Merge relevant information from nrelease/README.

* Prerequisite for realquickrel is buildworld/-kernel and not necessarily
  make release (reported by Max Herrgaard <herrgard@gmail.com>).

11 years agoMake ISOROOT overridable.
Sascha Wildner [Tue, 1 Apr 2008 20:55:06 +0000 (20:55 +0000)]
Make ISOROOT overridable.

11 years agoUse M_ZERO instead of bzero().
Nicolas Thery [Tue, 1 Apr 2008 20:20:29 +0000 (20:20 +0000)]
Use M_ZERO instead of bzero().

11 years agoMigrate allocation of proc structures from zones to kmalloc(). This gives us
Nicolas Thery [Tue, 1 Apr 2008 18:06:34 +0000 (18:06 +0000)]
Migrate allocation of proc structures from zones to kmalloc().  This gives us
MP-safety and does not seem to decrease performance (using make buildworld as
benchmark).  Using an objcache seems unnecessary because there isn't much
pre-initialization code we could move to a constructor and there is no
performance gain.

Debatted-With: dillon@, hsu@, corecode@

11 years agoMake the value of PTT_RELAY_SID match the RFC.
Sascha Wildner [Tue, 1 Apr 2008 15:22:44 +0000 (15:22 +0000)]
Make the value of PTT_RELAY_SID match the RFC.

This fixes problems with relayed PPPoE.

Reported-by: Jordan Gordeev <jgordeev@dir.bg>
Taken-from:  FreeBSD

11 years agoHAMMER 36B/many: Misc debugging.
Matthew Dillon [Sun, 30 Mar 2008 21:33:42 +0000 (21:33 +0000)]
HAMMER 36B/many: Misc debugging.

* Add vfs.hammer.contention_count to report B-Tree node contention

* Conditionalize debugging kprintf's for B-Tree node contention
  around vfs.hammer.debug_locks, default disabled.

11 years agoIt's frankly long past time that we turn net.inet.tcp.always_keepalive
Matthew Dillon [Sun, 30 Mar 2008 20:39:01 +0000 (20:39 +0000)]
It's frankly long past time that we turn net.inet.tcp.always_keepalive
on by default.

The default test internal is 2 hours of idle (left unchanged).  I am not
going to make it shorter but I will note that while you might not have wanted
to have the feature enabled 15 years ago (because many people were using
demand-dial), these days you actually almost universally want the feature
enabled for a multitude of reasons:

(1) Because you will often be running over a NAT and can lose the NAT
    entry if the connection stays idle with no traffic at all for too
    long a period of time.

(2) Because you will often be running over stateful filters which can also
    get confused and lose the table entry if they see no traffic for too
    long a period of time.

(3) Because having this turned on guarantees that stuck tcp connections,
    especially those generated through batch operations, will eventually
    get unstuck.  A TCP connection can become stuck if it is waiting on
    data and the remote end has closed the connection, but the RST got lost.
    Without this feature such connections can remain stuck literally

In some cases you might even need a far shorter interval but that is another
issue not addressed by this commit.

11 years agoFix 'testmain' building.
Sascha Wildner [Sun, 30 Mar 2008 18:11:58 +0000 (18:11 +0000)]
Fix 'testmain' building.

11 years agoSync audio data with other output.
Simon Schubert [Sun, 30 Mar 2008 16:45:04 +0000 (16:45 +0000)]
Sync audio data with other output.

11 years agoDecrease the number of reported stray interrupts from 100 to 10. Problems
Hasso Tepper [Sun, 30 Mar 2008 14:40:13 +0000 (14:40 +0000)]
Decrease the number of reported stray interrupts from 100 to 10. Problems
with stray interrupt 7 seem to be common nowadays when many computers don't
have parallel ports at all.

11 years agoClean it up a little bit
Sepherosa Ziehau [Sun, 30 Mar 2008 10:15:46 +0000 (10:15 +0000)]
Clean it up a little bit

11 years agoRemove old time zone files.
Sascha Wildner [Sun, 30 Mar 2008 00:32:33 +0000 (00:32 +0000)]
Remove old time zone files.

11 years ago* Update to Ficl 3.03:
Sascha Wildner [Sat, 29 Mar 2008 23:31:07 +0000 (23:31 +0000)]
* Update to Ficl 3.03:

  - Newly implemented CORE EXT words: CASE, OF, ENDOF, and ENDCASE. Also
    added FALLTHROUGH, which works like ENDOF but jumps to the instruction
    just after the next OF.
  - Bugfix: John-Hopkins locals syntax now accepts | and -- in the comment
    (between the first -- and the }.)
  - Bugfix: Changed vmGetWord0() to make Purify happier. The resulting
    code is no slower, no larger, and slightly more robust.

* Instead of just not defining a bunch of words when TESTMAIN is set,
  provide stubs that at least handle the stack correctly.  This makes it
  much easier to experiment with loader scripts from userland.

Taken-from: FreeBSD

11 years agoHAMMER 36/many: Stabilization pass.
Matthew Dillon [Sat, 29 Mar 2008 20:12:54 +0000 (20:12 +0000)]
HAMMER 36/many: Stabilization pass.

* Assert that no cursor linkages remain when releasing the last ref on
  an inode.

* Rewrite the node lock upgrade and downgrade code and fix a bug where
  a no-error (0) from locking the cursors parent was overriding a
  possible error from locking the cursors current node, which could
  result in B-Tree node corruption or an assertion later on.

11 years agoAdd configuration to generate packets with different [sd]port and/or [sd]addr
Sepherosa Ziehau [Sat, 29 Mar 2008 11:45:46 +0000 (11:45 +0000)]
Add configuration to generate packets with different [sd]port and/or [sd]addr
in round-robin fashion.

11 years agoAdd tunable for polling burst max, which is a significant tuning parameter
Sepherosa Ziehau [Sat, 29 Mar 2008 05:27:07 +0000 (05:27 +0000)]
Add tunable for polling burst max, which is a significant tuning parameter
in addition to polling hz for polling(4) operation

11 years agoAdd two tunables to run netisr and udp_thread without mplock, so experiment
Sepherosa Ziehau [Sat, 29 Mar 2008 04:45:47 +0000 (04:45 +0000)]
Add two tunables to run netisr and udp_thread without mplock, so experiment
could be conducted under controlled environment.
Default values of these two tunables are to run netisr/udp_thread with mplock.

11 years agoifaddr threads does not need MP lock
Sepherosa Ziehau [Sat, 29 Mar 2008 03:38:53 +0000 (03:38 +0000)]
ifaddr threads does not need MP lock

11 years agoAdd MPSAFE version of netmsg_service_loop()
Sepherosa Ziehau [Sat, 29 Mar 2008 03:37:15 +0000 (03:37 +0000)]
Add MPSAFE version of netmsg_service_loop()

11 years agoPull back part of rev1.7
Sepherosa Ziehau [Fri, 28 Mar 2008 11:03:44 +0000 (11:03 +0000)]
Pull back part of rev1.7

11 years agoFix layout.
Simon Schubert [Thu, 27 Mar 2008 19:37:15 +0000 (19:37 +0000)]
Fix layout.

Submitted-by: Andreas Burghardt <a-burghardt@gmx.de>
11 years agoInstall into /usr/sbin
Sepherosa Ziehau [Thu, 27 Mar 2008 11:42:11 +0000 (11:42 +0000)]
Install into /usr/sbin

11 years agoMake sure there is no possibility of a cothread trying to access the
Matthew Dillon [Thu, 27 Mar 2008 04:28:09 +0000 (04:28 +0000)]
Make sure there is no possibility of a cothread trying to access the
per-cpu globaldata space.  cothreads operate like coprocessors and run
outside the cpu abstraction, and thus have no per-cpu abstraction.

11 years agoRemove debug prints
Sepherosa Ziehau [Wed, 26 Mar 2008 15:05:33 +0000 (15:05 +0000)]
Remove debug prints

11 years agoFix bugs concerning cached route entry in UDP inpcb.
Sepherosa Ziehau [Wed, 26 Mar 2008 14:44:59 +0000 (14:44 +0000)]
Fix bugs concerning cached route entry in UDP inpcb.

For an unconnected and unbound UDP socket, first sending calls in_pcbladdr()
to fix the local port, which may change the target CPU of the next sending.
in_pcbladdr() has a side effect to allocate the route entry cached in inpcb.
If the target CPU after in_pcbladdr() is no longer the current CPU, then
the route entry will be accessed/freed on non-owner CPU during later sending.
Similarly, connect/disconnect a UDP socket may change the target CPU too; the
target CPU may no longer the owner of the cached route entry.

So, for the first sending happens on an unconnected and unbound UDP socket,
the target CPU of next sending is compared with the current CPU.  If they
are different, then cached route entry will be freed, so next time a packet
sent on this socket, a new route entry owned by the correct CPU will be
cached.  Same target CPU check is applied to UDP socket connect/disconnect.

Originally UDP PRU_CONNECT always happens on CPU0, which will cause problem if
following conditions are met:
- Dst of the cached route entry is different from the dst to be connected
- Cached route entry is not allocated on CPU0
This could happen if two datagram are sent on an unbounded and unconnected UDP
socket, then later connectting this UDP socket will cause cached route entry
being freed on different CPU.  To solve this problem, PRU_CONNECT is dispatched
according to existing [lf]{addr,port} pairs.

If in_pcbladdr() fails after altering the cached route entry, the cached route
entry is freed to make sure that freeing this cached route entry happens on
its owner CPU.

Reported-by: y0netan1@
Tested-by: y0netan1@
11 years agoAdd kernel module and a simple configure tool to generate packets at full speed
Sepherosa Ziehau [Wed, 26 Mar 2008 13:53:14 +0000 (13:53 +0000)]
Add kernel module and a simple configure tool to generate packets at full speed

Sending host:
  Athlon64 X2 3600+
  em(4) (1000PT), hw.em0.int_throttle_ceil set to 4000
  Result of a 10 seconds test:
  cnt 14475256, err 0, time 9.990372

Receiving host:
  Turion64 X2 TL-58
  msk(4) (Yukon EU), hw.mskc0.intr_rate set to 4000
  Output of 'netstat -w 1 -I msk0':
            input         (msk0)           output
   packets  errs      bytes    packets  errs      bytes colls
         0     0          0          0     0          0     0
         0     0          0          0     0          0     0
    103556     0    6213360          0     0          0     0
   1465259     0   87915540          0     0          0     0
   1461728     0   87703680          0     0          0     0
   1463788     0   87827280          0     0          0     0
   1456630     0   87397800          0     0          0     0
   1459206     0   87552360          0     0          0     0
   1464240     0   87854400          0     0          0     0
   1468240     0   88094400          0     0          0     0
   1464305     0   87858300          0     0          0     0
   1468011     0   88080660          0     0          0     0
   1200293     0   72017580          0     0          0     0
         0     0          0          0     0          0     0

11 years agoHAMMER 35C/many: Stabilization pass.
Matthew Dillon [Wed, 26 Mar 2008 04:32:54 +0000 (04:32 +0000)]
HAMMER 35C/many: Stabilization pass.

* The reblock code was only adjusting the data offset for B-Tree elements
  when moving records containing in-line data.  Also adjust the offset in
  the record itself.

11 years ago* Allow nrelease/Makefile to build the local installer in usr.sbin
Dave Hayes [Tue, 25 Mar 2008 22:55:38 +0000 (22:55 +0000)]
* Allow nrelease/Makefile to build the local installer in usr.sbin
  onto a LiveCD for installation.

* Tweak the installer shell scriptage to use the correct installer.

* Create a share/installer directory for installer data
  (e.g. cmdnames.conf, fred.txt)

* Patch the installer so it does not coredump, and identifies itself
  as the local installer.

* Tweak usr.sbin/installer/Makefiles to allow patches to the
  installer to be automatically included in the build.

Please test the new local installer! Thanks. :)

11 years agoHAMMER 35B/many: Stabilization pass, cleanups.
Matthew Dillon [Tue, 25 Mar 2008 06:43:44 +0000 (06:43 +0000)]
HAMMER 35B/many: Stabilization pass, cleanups.

* Fix a B-Tree node load race which could result in an assertion.  A
  B-Tree node load is backed by a hammer_buffer and can race a buffer
  teardown.  Interlock the two and properly deal with a loading
  B-Tree node whos buffer gets ripped out from under it.

* Fix an ordering issue with the volume->io.loading field, plus some

11 years agoHAMMER utilities: Add -lm for double arithmatic.
Matthew Dillon [Tue, 25 Mar 2008 03:58:21 +0000 (03:58 +0000)]
HAMMER utilities: Add -lm for double arithmatic.

11 years agoHAMMER utilities: automatic sync/sleep
Matthew Dillon [Tue, 25 Mar 2008 03:57:58 +0000 (03:57 +0000)]
HAMMER utilities: automatic sync/sleep

* Add 64 bit versions of the 'now' and 'stamp' commands, called
  'now64' and 'stamp64'.

* The 'now' and 'now64' commands now automatically sync.

* The 'now' command also sleeps until the second hand turns over.

* Add a new option, -x, which may be used to disable the automatic sync &
  sleep.  The stamp and stamp64 commands do not sync or sleep.

Suggested-by: "Thomas E. Spanjaard" <tgen@netphreax.net>
11 years agoHAMMER 35/many: Stabilization pass, cleanups
Matthew Dillon [Mon, 24 Mar 2008 23:50:23 +0000 (23:50 +0000)]
HAMMER 35/many: Stabilization pass, cleanups

* Fix a buffer load race which could result in an assertion or panic
  related to a referenced HAMMER buffer with a NULL bp.  The problem was
  that the loading flag must be used when releasing the buffer as well
  as when acquiring the buffer.  Change the loading flag to a loading

* Do not lose flush requests.  The flush request now stays flagged until
  the buffer is able to be flushed.

* Fix stale blockmap offsets cached in hammer_buffer.  Clear the cached
  offset when freeing a big block from the blockmap.  NOTE: We do not yet
  try to index buffers based on the blockmap offset but we should.

* Remove the old write ordering code in preparation for redoing the algorithm.

* General code cleanups.

11 years agogx(4) and ray(4) are gone
Sascha Wildner [Mon, 24 Mar 2008 23:45:29 +0000 (23:45 +0000)]
gx(4) and ray(4) are gone

11 years agoBring in some fixes from FreeBSD.
Sascha Wildner [Mon, 24 Mar 2008 23:04:19 +0000 (23:04 +0000)]
Bring in some fixes from FreeBSD.

Matthew Dillon [Mon, 24 Mar 2008 14:28:44 +0000 (14:28 +0000)]

11 years agoSync zoneinfo database with tzdata2008b from elsie.
Sascha Wildner [Mon, 24 Mar 2008 12:54:43 +0000 (12:54 +0000)]
Sync zoneinfo database with tzdata2008b from elsie.

asia:           8.14 -> 8.18
backward:       8.4  -> 8.6
northamerica:   8.20 -> 8.23
southamerica:   8.18 -> 8.19
zone.tab:       8.13 -> 8.16

From Arthur David Olson's comments:

* Iraq abandons DST.

* Syria switched (from 2008 forward) to start DST at the start of the first
  Friday in April and end DST at the start of October 1.

* Change Cuba (from 2008 forward) to start DST the third Sunday in March.

* Add America/Argentina/San_Luis information.

* "Saigon" zone renamed "Ho_Chi_Minh".

* "Calcutta" zone renamed to "Kolkata".

11 years agoSynchronize various changes from FreeBSD. This is not exhaustive but gets
Matthew Dillon [Mon, 24 Mar 2008 06:41:56 +0000 (06:41 +0000)]
Synchronize various changes from FreeBSD.  This is not exhaustive but gets
the most important patches.

* Better AHCI detection and reporting.
* More robust AHCI chipinit.
* Fixes for additional chipsets which do not support 64K DMA transfers
* VIA8237S support
* Hitachi detection logic.
* Vendor identification for otherwise unidentified chipsets.
* keep ivars intact on atapi-cd reinit.

11 years agoRemove ipw(4) remains.
Sascha Wildner [Sun, 23 Mar 2008 19:46:49 +0000 (19:46 +0000)]
Remove ipw(4) remains.

11 years agoNuke debug prints.
Sepherosa Ziehau [Sun, 23 Mar 2008 09:48:20 +0000 (09:48 +0000)]
Nuke debug prints.

Noticed-by: swildner@