Alex Hornung [Sun, 14 Mar 2010 08:57:36 +0000 (08:57 +0000)]
vfs_synth - rewrite
* Rewrite the whole vfs_synth mess to be compatible with devfs. Now we
create a synthetic mountpoint and mount devfs on it. We then just
nlookup() whatever device we need on that mountpoint.
* This also fixes vinum rootmount. To use vinum as a root,
vfs.root.mountfrom in /boot/loader.conf has to be set to
"<fs>:vinum/vinumroot" where <fs> can be ufs or hammer.
Reported-by: Rumko, tuxillo
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1565
Alex Hornung [Sun, 14 Mar 2010 08:27:32 +0000 (08:27 +0000)]
nlookup - introduce nlookup_init_root
* nlookup_init_root is similar to nlookup_init_raw, but does not assume
rootnch is set already, but rather has one more parameter which
specifies the root nch.
Sascha Wildner [Sun, 14 Mar 2010 12:11:40 +0000 (13:11 +0100)]
hammer.8: Fix list.
Sascha Wildner [Sun, 14 Mar 2010 11:55:11 +0000 (12:55 +0100)]
Adjust some more to the recent groff 1.20.1 import.
* Dx is now a built in macro, so remove our local definition. But the
version supplied with groff still doesn't work correctly due to a
missing register declaration in doc-common. Fix that locally for now
(patch sent upstream).
* Sync various definitions (standards, operating systems) with doc-common
and doc-syms, i.e. remove our local definitions where they are part of
groff now.
Matthew Dillon [Sun, 14 Mar 2010 05:16:38 +0000 (21:16 -0800)]
HAMMER VFS - Hack cursor iterator when unlocked cursor moved to parent
* It is possible to reverse-index a cursor while it is unlocked due to
a node deletion moving cursors on that node to the parent, and a
subsequent insertion then inserting new elements between the cursor's
current position and its expected iteration range.
* Detect the case with a new flag (hack!) HAMMER_CURSOR_ITERATE_CHECK
and just iterate past the elements outside the iteration range in
this case.
Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
Sascha Wildner [Sun, 14 Mar 2010 01:32:47 +0000 (02:32 +0100)]
mdoc: Add NetBSD 6.0 (used in wbsio.4).
Sascha Wildner [Sun, 14 Mar 2010 01:31:13 +0000 (02:31 +0100)]
Actually hook powernow.4 into the build.
Alex Hornung [Sat, 13 Mar 2010 15:39:37 +0000 (15:39 +0000)]
linprocfs - Introduce /proc/mounts
* Introudce the /proc/mounts entry to satisfy some installers, and df.
* NOTE: if you intend to chroot into the linux base, you'll have to
change your /compat/linux/etc/mtab symlink to point to /proc/mounts
instead. Also note that the paths are not relative to the linux
chroot.
Reported-by: Sascha Wildner
Sascha Wildner [Sat, 13 Mar 2010 12:58:36 +0000 (13:58 +0100)]
Fix LINT build.
Alex Hornung [Fri, 12 Mar 2010 23:08:40 +0000 (23:08 +0000)]
linux emulation - Major update
* Major update to all components of the linux emulation layer
(linuxulator) and linprocfs.
* Many old system calls have been overhauled and new ones added.
* Tested with java 1.6.18, apache tomcat 6, opera, Acrobat Reader, ...
* NOTE: Flash doesn't work yet, and I haven't been able to figure out
why. I'll continue my work on the linuxulator part time now, and
hopefully eventually fix the issue(s).
Some parts of this have been taken from FreeBSD and NetBSD.
Overall the new stuff isn't as well organized as it should be; most of
the new defines are in linux.h as I didn't bother splitting it up into
independent headers.
Once we plan on porting the linuxulator to amd64, this has to be taken
care of, so especially machine independent bits are broken out of the
machine dependent sys/emulation/linux/i386.
Alex Hornung [Fri, 12 Mar 2010 23:07:27 +0000 (23:07 +0000)]
procfs - Use newly introduced textnch
* Use the newly introduced p_textnch instead of p_textvp to find the
path to the .text file for each proc entry in /proc.
Alex Hornung [Fri, 12 Mar 2010 22:59:30 +0000 (22:59 +0000)]
linux emu - peripheral changes
* These are peripheral changes to prepare for the import of the updated
linuxulator:
* hooks (eventhandler) for process creation and process exit.
* splitting up of sys_kevent into sys_kevent + kern_kevent, including
generic copyiin and copyout functions.
Obtained-from: FreeBSD
* adding a p_textnch to store the namecache handle for the .text file.
* minor changes to sysv_sem and sysv_shm to support linux-specific
magic.
* bring in casuword (compare and set userland word)
Obtained-from: FreeBSD
* add a hook for userret from syscall2
Inspired-by: NetBSD
Matthew Dillon [Fri, 12 Mar 2010 23:07:58 +0000 (15:07 -0800)]
kernel - AHCI - enable AHCI device initiated power management
* Add hw.ahci sysctls to allow the power management state to be set and
monitored.
* Issue device features command when aggressive power management is
enabled to turn on device-initiated power management, and turn it off
when power management is set to none.
* Currently does not try do power management for devices behind a
PM.
Submitted-by: Johannes Hofmann <johannes.hofmann@gmx.de>
Matthew Dillon [Fri, 12 Mar 2010 22:43:44 +0000 (14:43 -0800)]
fstat - Fix path construction for "wd".
* Fix path construction for "wd", the wrong mount pointer was being used.
Reported-by: Alex Hornung <ahornung@gmail.com>
Matthew Dillon [Wed, 10 Mar 2010 23:56:09 +0000 (15:56 -0800)]
kernel - fix procfs vm_map scan.
* procfs was holding a vm_map lock during a uiomove, which can result
in a recursive lock panic on the vm_map.
* since we must now unlock the map during the uiomove use a trick with
vm_map->hint to detect if the current entry has been ripped out from
under us and issue a lookup to reacquire our position in the scan.
Reported-by: "Alex Hornung" <ahornung@gmail.com>
Sascha Wildner [Tue, 9 Mar 2010 08:28:58 +0000 (09:28 +0100)]
Sync zoneinfo database with tzdata2010e from elsie.
asia: 8.54 -> 8.55
Fixes a bug with the rules for Bangladesh introduced in 8.54.
Samuel J. Greear [Mon, 8 Mar 2010 18:27:23 +0000 (11:27 -0700)]
kernel - Restore ability to thaw checkpoints
* Catch up with changes to imgact_elf.c
Sascha Wildner [Mon, 8 Mar 2010 18:40:55 +0000 (19:40 +0100)]
Sync zoneinfo database with tzdata2010d from elsie.
asia: 8.51 -> 8.54
australasia: 8.15 -> 8.16
southamerica: 8.41 -> 8.43
* Adjust start and end of Bangladesh DST.
* Fiji ends DST about a month early.
* Samoa DST postponed to 2010.
* Chile exceptionally extends DST to April 3 this year due to the earthquake.
Constantine A. Murenin [Mon, 8 Mar 2010 12:34:05 +0000 (07:34 -0500)]
wbsio(4): don't reuse a child that has already been attached
Constantine A. Murenin [Mon, 8 Mar 2010 10:26:58 +0000 (05:26 -0500)]
wbsio(4): convert to Newbus and DragonFly -- welcome wbsio(4)!
* New wbsio(4) driver for Winbond Super I/O attachment of lm(4) on any port.
Constantine A. Murenin [Sun, 21 Feb 2010 09:36:20 +0000 (04:36 -0500)]
wbsio(4): raw wbsio.c#rev1.1 and wbsio.4#rev1.1 from NetBSD
Sascha Wildner [Mon, 8 Mar 2010 10:07:46 +0000 (11:07 +0100)]
Remove <sys/msfbuf.h> per 'make upgrade'.
Sascha Wildner [Sun, 7 Mar 2010 08:04:09 +0000 (09:04 +0100)]
Remove WARNS?=6 from two Makefiles where it is not needed.
WARNS is 6 by default in bin/, games/, sbin/, usr.bin/ and usr.sbin/
(per Makefile.inc) and only needs to be specified explicitly there
for utilities which need WARNS < 6.
YONETANI Tomokazu [Sun, 7 Mar 2010 04:24:45 +0000 (13:24 +0900)]
mptable - raise WARNS to 6
YONETANI Tomokazu [Sun, 7 Mar 2010 03:47:49 +0000 (12:47 +0900)]
mptable - factor out the MP_SIG lookup code
YONETANI Tomokazu [Sun, 7 Mar 2010 04:46:08 +0000 (13:46 +0900)]
mptable - prepare to raise WARNS
- do not declare extern optreset, which is not used.
- constify lookup tables
- fix printf format strings
YONETANI Tomokazu [Sun, 7 Mar 2010 03:08:24 +0000 (12:08 +0900)]
mptable - use fixed-size integers in the structures; fixes x86_64
Sascha Wildner [Sat, 6 Mar 2010 14:24:03 +0000 (15:24 +0100)]
mq_receive.2: Add missing space.
Sascha Wildner [Sat, 6 Mar 2010 09:03:44 +0000 (10:03 +0100)]
taskqueue.9: Do some mdoc cleanup & add missing MLINKS.
Samuel J. Greear [Fri, 5 Mar 2010 18:07:43 +0000 (11:07 -0700)]
kernel - Remove msf buffer code
* MSF Buffers are no longer consumed by any kernel subsystem,
remove them and free up 32MB of KVA
Michael Neumann [Fri, 5 Mar 2010 23:20:12 +0000 (00:20 +0100)]
pci_alloc_msix: Fail if no MSI-X vectors available
Otherwise bootverbose could lead to a kernel crash.
This commit also lets the igb driver correctly fall-back
to non MSI-X code. MSI-X is currently not supported by
DragonFly.
Michael Neumann [Fri, 5 Mar 2010 22:30:03 +0000 (23:30 +0100)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Michael Neumann [Fri, 5 Mar 2010 22:26:48 +0000 (23:26 +0100)]
Unbreak buildkernel / mxge(4)
Partially revert commit
0a702a628e2af43ec0cb538349278b4d98993572.
Ulrich Spörlein [Sat, 6 Feb 2010 10:19:26 +0000 (11:19 +0100)]
fortune(6): fix more typos, whitespace, remove dupes
Fixes are courtesy of FreeBSD.
Michael Neumann [Fri, 5 Mar 2010 18:09:41 +0000 (19:09 +0100)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly
Michael Neumann [Fri, 5 Mar 2010 18:07:53 +0000 (19:07 +0100)]
e1000 - Make igb driver compile on DragonFly
The driver itself does not work. The devices successfully
attach, but when trying to set an IP address it hangs.
More work needs to go into this driver.
Matthew Dillon [Fri, 5 Mar 2010 00:06:53 +0000 (16:06 -0800)]
HAMMER VFS - Ensure sufficient free memory is available before large allocation
* The HAMMER rebalancing code can be a heavy user of kernel memory when
collecting B-Tree nodes to rebalance.
Call the new vm_wait_nominal() function before allocating said memory
in an attempt to avoid VM/VFS deadlocks when memory is low.
Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
Matthew Dillon [Fri, 5 Mar 2010 00:05:38 +0000 (16:05 -0800)]
kernel - vm - add vm_wait_nominal()
* Add vm_wait_nominal(), a function which activates the pageout daemon
if necessary and waits for sufficient memory to become free for
a kernel heavy user.
Sascha Wildner [Thu, 4 Mar 2010 17:25:32 +0000 (18:25 +0100)]
compilers.conf.5: Clarify some more.
Sascha Wildner [Thu, 4 Mar 2010 07:47:10 +0000 (08:47 +0100)]
Add device sg to LINT.
Sascha Wildner [Thu, 4 Mar 2010 06:00:42 +0000 (07:00 +0100)]
Fix typos in manual pages and user visible messages.
Sascha Wildner [Thu, 4 Mar 2010 05:01:02 +0000 (06:01 +0100)]
Sort the SEE ALSO sections in some manual pages.
Matthew Dillon [Thu, 4 Mar 2010 01:53:37 +0000 (17:53 -0800)]
kernel - pmap (i386) - Reduce kmem use for foreign pmap mapping
* We've been having problems running out of KVA on i386 systems due to
numerous reasons. KVA use by the kernel is just too tight.
* Reserve space for foreign pmap page table mappings on a cpu-by-cpu basis
instead of for SMP_MAXCPU. This reduces KVM use from 68MB to (ncpu*4MB).
Use the APT entry for cpu0 and use kmem_alloc_nofault() for the APs.
This frees up 52MB of KVA which doesn't sound like a lot but actually
is.
* Add an alignment argument to kmem_alloc_nofault() and vm_map_find().
* vm_map_findspace() already had an alignment argument, but adjust the
value passed to be at least PAGE_SIZE (this has no operational effect
but is more correct).
Matthew Dillon [Wed, 3 Mar 2010 07:15:27 +0000 (23:15 -0800)]
VN - Remove use of IO_DIRECT, Improve lock performance for reads
* Remove the use of IO_DIRECT. This just doesn't work very well,
particularly when the device backing the VN has a different logical
block size than the device using VN.
This will result in heavier use of the buffer cache and more
(temporarily) duplicated data, but also has much better performance.
* Use LK_SHARED for VOP_READ()s instead of LK_EXCLUSIVE, which allows
concurrent reads to be issued.
Reported-by: Vincent Stemen <vince.dragonfly@hightek.org>
Matthew Dillon [Wed, 3 Mar 2010 06:50:10 +0000 (22:50 -0800)]
HAMMER VFS - Do a better job with IO_DIRECT
* IO_DIRECT is rather nasty, only actually honor it if the write() operation
fits the buffer.
Reported-by: Vincent Stemen <vince.dragonfly@hightek.org>
Matthew Dillon [Wed, 3 Mar 2010 01:29:14 +0000 (17:29 -0800)]
HAMMER VFS - Fix assertion in hammer_btree_mirror_propagate()
* hammer_btree_mirror_propagate() asserts it is on an internal node but
recovery operations can now place us on a leaf, so just loop if we
are on a leaf and remove the assertion.
Matthew Dillon [Tue, 2 Mar 2010 23:58:07 +0000 (15:58 -0800)]
cpdup - Add -VV to ignore mtime
* The cpdup -V option verifies the contents of the files even if the
mtime is the same, but also (currently) recopies the file without
bothering to verify the contents if the mtime is different, even if
the contents is the same.
* Add an extension, -VV, which verifies the contents of the file and
ignores mtime entirely. A copy is only made if the ownerchip,
flags, modes, or content differs.
Matthew Dillon [Tue, 2 Mar 2010 22:36:40 +0000 (14:36 -0800)]
HAMMER VFS - Correct seriuos bug in hammer rebalancing code
* Correct a serious bug in the hammer rebalancing code which can cause
incremental mirrors to lose track of records, resulting in missing records
on the slave (missing files, missing directory entries, or files
which improperly contain data holes).
The rebalancing code needs to update the mirror_tid chain when moving
elements from one node to another. It updated the parent node but failed
to update the internal element linkage pointing to the child.
This can cause incremental mirroring operations to fail to copy some B-Tree
records.
* Correct a possible issue between the rebalancing code and B-Tree
iterations during mirror-write operations.
When the rebalancer moves an element from one child node to another and
a cursor exists which is pointing at the parent internal node, the
cursor will now be mispositioned because elements which were to the
right of the cursor are now to the left of the cursor.
Adjust hammer_cursor_moved_element() to properly move the cursor and
print a debug message to the console so the code path can be tested.
* These bugs are serious but also very rare. There is a good chance that
your slaves are just fine, but we recommend validating their contents
anyway.
* PROCEDURE FOR FIXING BROKEN SLAVES: With a little help from the sysop
these problems are self-correcting with the new kernel code in place.
First make sure both the master and slave are running a kernel with
the mirroring fix.
Second, verify the slave matches the master (taking into account
changes being made to live files). Probably the easiest way to do
this is as follows (make sure you push into the softlink, not cpdup
the softlink itself):
cpdup -v -V /pfs/master/. /pfs/slave/.
This should get you a list of missing files and directories. For
each missing file or directory do a chmod, chown, or chflags on the
master, then change it back. This will propagate the updated inode
to the slave So for example:
chflags nodump file
chflags dump file
If file data is corrupt on the mirroring slave you need to recopy the
file on the master, which can be done with dd conv=notrunc:
dd if=file of=file bs=32k conv=notrunc
These actions will cause the master to re-mirror the related files and
data to the slave.
Reported-by: Stathis Kamperis <beket@crater.dragonflybsd.org>
Matthew Dillon [Tue, 2 Mar 2010 22:34:40 +0000 (14:34 -0800)]
HAMMER Utility - Enhance the mirroring and show code
* mirror-read will now run the histogram just like mirror-stream does.
* improve versbose output when doing a mirror-read or mirror-stream.
* hammer show now validates the mirror_tid in the B-Tree and produces
a 'B' indication with the 'M' flag if it finds a bad mirror_tid
chaining.
Sascha Wildner [Tue, 2 Mar 2010 15:42:36 +0000 (16:42 +0100)]
libc/stdtime: Sync localtime.c with tzcode2010c from elsie.
More core dump avoidance work.
Sascha Wildner [Tue, 2 Mar 2010 15:41:18 +0000 (16:41 +0100)]
Sync zoneinfo database with tzdata2010c from elsie.
southamerica: 8.40 -> 8.41
Paraguay changes DST schedule, starting in April now.
Sascha Wildner [Tue, 2 Mar 2010 15:09:28 +0000 (16:09 +0100)]
Regenerate the pciconf(8) database
...from the following files:
Hart: Jan 22, 2008 (version 671)
Boemler: Mar 1, 2010
Mares: Mar 1, 2010
Sascha Wildner [Tue, 2 Mar 2010 11:16:02 +0000 (12:16 +0100)]
libc/locale: Use _getprogname().
Sascha Wildner [Tue, 2 Mar 2010 11:07:47 +0000 (12:07 +0100)]
libc/citrus: Forward declare some structs to fix some warnings.
Alex Hornung [Tue, 2 Mar 2010 07:45:20 +0000 (07:45 +0000)]
talk - unbreak for unix98 ptys
* Unbreak talk, which relied on seeing old-style ptys. When I introduced
the unix98 ptys.
* This assumption would not work anymore, since the
last slash is not the slash after /dev, but rather the one after
/dev/pts. Later opening 0 instead of pts/0 would give an error.
Reported-by: Peter Avalos, Matt Dillon
Matthew Dillon [Tue, 2 Mar 2010 00:12:26 +0000 (16:12 -0800)]
kernel - cleanup some unnecessary casts
* Adjust disk_msg_core() and friends to not make unnecessasry casts
when playing with LWKT messages.
* In disk_msg_send_sync() call lwkt_waitmsg() instead of lwkt_waitport(),
which cleans up the code flow a bit.
Matthew Dillon [Tue, 2 Mar 2010 00:09:41 +0000 (16:09 -0800)]
kernel - Move grow_stack code in fault path to improve fault performance
* grow_stack() calls were being performed unconditionally during a
page fault. Shift the code over to vm_fault() and only run it if
the vm_map_lookup() call fails.
* Also take this opportunity to remove trapwrite() (added by Matt).
Submitted-by: Venkatesh Srinivas <me@endeavour.zapto.org>
Matthew Dillon [Tue, 2 Mar 2010 00:07:25 +0000 (16:07 -0800)]
kernel - VN - add missing disk_destroy() in module unload path
* The module unload was leaving the disk list corrupted. Add a missing
disk_destroy() call.
* Fixes certain bulk-build issues (apparently the bulk build tries to
unload and reload the VN driver at some point for reasons unknown).
Matthew Dillon [Mon, 1 Mar 2010 01:02:40 +0000 (17:02 -0800)]
tmpfs - Add support for setting the root uid/gid/mode for the tmpfs mount.
* Link uid/gid/mode setup from mount_tmpfs into the tmpfs VFS.
Submitted-by: Naoya Sugioka <naoya.sugioka@gmail.com>
Peter Avalos [Sun, 28 Feb 2010 04:04:54 +0000 (04:04 +0000)]
Merge branch 'master' of /repository/git/dragonfly
Sascha Wildner [Sun, 28 Feb 2010 02:51:03 +0000 (03:51 +0100)]
rc.conf.5: Remove bogus mdconfig(8) reference.
Peter Avalos [Sun, 28 Feb 2010 00:31:33 +0000 (00:31 +0000)]
Merge branch 'vendor/OPENSSL'
Peter Avalos [Sun, 28 Feb 2010 00:07:00 +0000 (00:07 +0000)]
Import OpenSSL-0.9.8m.
This new OpenSSL version is a security and bugfix release which
implements RFC5746 to address renegotiation vulnerabilities mentioned in
CVE-2009-3555. For a complete list of changes, please see the CHANGES
file.
Sascha Wildner [Sat, 27 Feb 2010 08:49:03 +0000 (09:49 +0100)]
ng_eiface.4: Comment out some xrefs to ng_vlan(4) which we don't have.
Sascha Wildner [Fri, 26 Feb 2010 12:22:45 +0000 (13:22 +0100)]
tmpfs(5): Remove old initialization (overrode prior init of vop_bmap).
Samuel J. Greear [Thu, 25 Feb 2010 16:11:16 +0000 (09:11 -0700)]
kernel - Remove msf_buf dependency from VFS Journals
* UIO writes (VOP_WRITE case) are now handled by a copyin() directly to the
journal buffer.
* VOP_PUTPAGES case is now handled with XIO directly instead of with msf_buf's
as an abstraction over XIO.
Samuel J. Greear [Thu, 25 Feb 2010 16:06:53 +0000 (09:06 -0700)]
kernel - Initialize xio->xio_bytes properly in xio_init_pages()
Constantine A. Murenin [Thu, 25 Feb 2010 05:54:19 +0000 (00:54 -0500)]
aps(4): use DRIVERSLEEP instead of tsleep
Sascha Wildner [Wed, 24 Feb 2010 20:45:09 +0000 (21:45 +0100)]
netsmb: Fix a warning and put smb_usr.c under -Werror, too.
Sascha Wildner [Wed, 24 Feb 2010 15:41:53 +0000 (16:41 +0100)]
Add unifdef(1) to the bootstrap-tools.
This is needed for generation of libexpat's bsdxml.h.
Reported-by: rpaulo
Constantine A. Murenin [Wed, 24 Feb 2010 05:06:49 +0000 (00:06 -0500)]
device_add_child.9: spelling and grammar
Matthew Dillon [Tue, 23 Feb 2010 22:23:05 +0000 (14:23 -0800)]
libraries - Add missing LIBBSDXML line.
Suggested-by: rpaulo
Jan Lentfer [Tue, 23 Feb 2010 19:15:27 +0000 (20:15 +0100)]
top: Fix man page
Explanation for column "C" on multi-CPU
machines was missing.
Matthew Dillon [Tue, 23 Feb 2010 18:41:20 +0000 (10:41 -0800)]
libexpat - Fix buildworld
* Fix library symbol. DragonFly's /bin and /sbin are statically linked,
we don't have or need a /lib.
Matthew Dillon [Tue, 23 Feb 2010 17:45:29 +0000 (09:45 -0800)]
libexpat - Bring in libexpat from contrib, name it libbsdxml
* Will be used in rpaulo's wifi port update.
Taken-from: FreeBSD
Matthew Dillon [Tue, 23 Feb 2010 17:41:46 +0000 (09:41 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 23 Feb 2010 17:39:50 +0000 (09:39 -0800)]
contrib/expat - Apply two vendor fixes for CVE-2009-3720.
Taken-from: FreeBSD
Matthew Dillon [Tue, 23 Feb 2010 17:38:19 +0000 (09:38 -0800)]
contrib/expat - Add README.DRAGONFLY
Matthew Dillon [Tue, 23 Feb 2010 17:36:26 +0000 (09:36 -0800)]
Merge branch 'vendor/EXPAT'
Matthew Dillon [Tue, 23 Feb 2010 17:36:09 +0000 (09:36 -0800)]
Import expat-2.0.1
Sascha Wildner [Tue, 23 Feb 2010 17:33:45 +0000 (18:33 +0100)]
compilers.conf.5: Add IMPLEMENTATION NOTES for some more details.
Sascha Wildner [Tue, 23 Feb 2010 16:13:31 +0000 (17:13 +0100)]
tmpfs.5: Clean up SEE ALSO a bit.
Sascha Wildner [Tue, 23 Feb 2010 15:09:06 +0000 (16:09 +0100)]
Adjust the compiler wrapper script to use pkgsrc's clang for CCVER=clang.
* Move the definitions for the SVN version to 'clangsvn'.
* Expand the compilers.conf(5) manual page a bit and give more (better)
examples.
Thanks to Jim Chapman <cchapman8@cogeco.ca> for help with testing.
Michael Neumann [Mon, 22 Feb 2010 22:33:36 +0000 (23:33 +0100)]
e1000 - Complete port of if_em
Michael Neumann [Mon, 22 Feb 2010 22:03:59 +0000 (23:03 +0100)]
net - Add some #defines from FreeBSD
Matthew Dillon [Mon, 22 Feb 2010 17:51:08 +0000 (09:51 -0800)]
kernel - Fix some rare pmap races in i386 and x86_64 (followup)
* Fix build issue with vkernels
Reported-by: corecode
Matthew Dillon [Mon, 22 Feb 2010 16:23:04 +0000 (08:23 -0800)]
swapcache - documentation update (data caching, read/write concurrency)
* Update the manual page to expand on issues when caching bulk data,
including read/write concurrency issues with SSDs.
Michael Neumann [Mon, 22 Feb 2010 14:54:51 +0000 (15:54 +0100)]
e1000 - Adapt OS-dependent part
Michael Neumann [Mon, 22 Feb 2010 14:44:03 +0000 (15:44 +0100)]
e1000 - Literally import e1000 driver from FreeBSD
The e1000 driver consists of the em and igb drivers.
Making it compile under DragonFly will follow.
Samuel J. Greear [Mon, 22 Feb 2010 09:00:47 +0000 (02:00 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 22 Feb 2010 15:40:05 +0000 (07:40 -0800)]
kernel - Refactor vnode_free_list, vnode reuse algorithm
* Rip out most of he VAGEx stuff. It might come back in another form
later.
* Split the vnode_free_list into three parts, separated by two markers
(vnode_free_mid1 and vnode_free_mid2).
* Insert vnodes on the free list based on the following. New vnodes
are allocated from the base of the list.
At the HEAD - If the vnode is VRECLAIMED (i.e. dead)
end of first section - If the vnode has no cached VM or SWAP data
end of second section - If the vnode has cached SWAP data and no cached VM
at the TAIL - If the vnode has cached VM data
* Implement a rover to slowly scan vnodes in the list when allocating
and shift them to the appropriate section. This fixes a degenerate
condition in the placement of the markers.
* A Vnode is removed and usually immediately reinserted whenever it
is accesesd by userland but not held open, giving us a LRU-like
algorithm within each section of the list but non-LRU-like transits
between sections of the list.
Transits between sections are determined more by how the VM system
recycles related VM cache pages. Cached SWAP data only occurs if
the swapcache is turned on.
* Future: Might use VAGE to implement a second go-around in the queue
or a burst re-placement in the queue when the data set is found to
be too big to fit.
Matthew Dillon [Mon, 22 Feb 2010 07:44:27 +0000 (23:44 -0800)]
kernel - swapcache - Fix snocache and cache flags propagation, fix PG_NOTMETA
* The namecache was not always propagating the snocache and cache
chflags flags. Now it is. However, the flags no longer propagate
across mount points.
* The vm_page PG_NOMETA flag was being improperly applied to regular
files. It only applies to VCHR vnodes.
* blogbench tests show significant improvement but swapcache is still
missing some data or meta-data somewhere.
Matthew Dillon [Mon, 22 Feb 2010 07:42:12 +0000 (23:42 -0800)]
chflags, swapcache manual page updates - cache flag does not cross mounts
* The cache and noscache flags do not cross mount points any more.
Matthew Dillon [Mon, 22 Feb 2010 07:40:43 +0000 (23:40 -0800)]
kernel - NFS - Add the 'cache' flag to enable swapcache on a NFS mount
* The current round of swapcache work doesn't propagate the cache flag
across mount points so NFS needs a cache mount flag.
Samuel J. Greear [Mon, 22 Feb 2010 07:23:12 +0000 (00:23 -0700)]
Test commit
Matthew Dillon [Mon, 22 Feb 2010 02:49:01 +0000 (18:49 -0800)]
kernel - Remove some debug kprintf()s
* Remove "warning, locked buf ..., race corrected" debugging kprintf.
Matthew Dillon [Mon, 22 Feb 2010 02:47:34 +0000 (18:47 -0800)]
kernel - Fix some rare pmap races in i386 and x86_64 (followup)
* pmap_interlock_wait() is SMP-only. Fix UP build.
* pmap_setlwpvm for i386 was missing a call to pmap_interlock_wait()
Matthew Dillon [Mon, 22 Feb 2010 02:33:43 +0000 (18:33 -0800)]
kernel - SWAP CACHE part 22/many - Fix counter overflow introduced in part 21
* vm_swapcache_inactive_heuristic can overflow, making it extremely negative
and causing swapcache writing to cease for a long period of time.
* Two-in-one fix. Check if it is too negative and reset it. This also
automatically adjusts the heuristic if the sysop manually changes
the hysteresis to a smaller value.
Matthew Dillon [Mon, 22 Feb 2010 02:23:13 +0000 (18:23 -0800)]
kernel - Fix some rare pmap races in i386 and x86_64.
* Adjust pmap_inval_init() to enter a critical section and add
a new pmap_inval_done() function which flushes and exits it.
It was possible for an interrupt or other preemptive action to
come along during a pmap operation and issue its own pmap operation,
potentially leading to races which corrupt the pmap.
This case was tested an could actually occur, though the damage (if any)
is unknown. x86_64 machines have had a long standing and difficult to
reproduce bug where a program would sometimes seg-fault for no reason.
It is unknown whether this fixes the bug or not.
* Interlock the pmap structure when invalidating pages using a bit
in the pm_active field.
Check for the interlock in swtch.s when switching into threads
and print a nice warning if it occurs.
It was possible for one cpu to initiate a pmap modifying operation
while another switches into a thread using the pmap the first cpu
was in the middle of modifying. The case is extremely rare but can
occur if the cpu doing the modifying operation receives a SMI
interrupt, stalling it long enough for the other cpu to switch
into the thread and resume running in userspace.
* pmap_protect() assumed no races when clearing PG_RW and PG_M due
to the pmap_inval operations it runs. This should in fact be
true with the above fixes. However, the rest of the pmap code
uses atomic operations so adjust pmap_protect() to also use atomic
operations.
Sascha Wildner [Mon, 22 Feb 2010 01:16:55 +0000 (02:16 +0100)]
setkey(8): Add missing token to fix a yacc warning.