Franco Fichtner [Tue, 8 Oct 2013 20:14:58 +0000 (22:14 +0200)]
a couple more Mt macros for author emails
Franco Fichtner [Tue, 8 Oct 2013 19:30:40 +0000 (21:30 +0200)]
libc: proper FreeBSD version and some Mt macros for mails
Franco Fichtner [Tue, 8 Oct 2013 19:19:24 +0000 (21:19 +0200)]
world: remove spurious Pp macros
Franco Fichtner [Tue, 8 Oct 2013 19:17:47 +0000 (21:17 +0200)]
mdocml: sync std strings with groff
Franco Fichtner [Tue, 8 Oct 2013 19:16:47 +0000 (21:16 +0200)]
groff: add recent FreeBSD releases
(reduces `manlint' noise)
Antonio Huete Jimenez [Tue, 8 Oct 2013 09:09:48 +0000 (02:09 -0700)]
hammer - Fix exit path for newly added ioctl
* Release cursor/inode on exit.
* Take in account the case where hammer_get_inode() returns a NULL ip.
Franco Fichtner [Mon, 7 Oct 2013 21:29:16 +0000 (23:29 +0200)]
mdocml: sync a few upstream commits
Most of our local changes have found its way to upstream.
Let's return the favour and bring in fixes that we have
requested. Hunk count for mandiff output reduced from
3321 to 3311 (not much, but it's a start).
# make mandiff | grep "^@@" | wc -l
Franco Fichtner [Mon, 7 Oct 2013 20:16:43 +0000 (22:16 +0200)]
bsd.man.mk: add temporary ``mandiff'' target
Show differences in ASCII output between groff(1) and mandoc(1). This
will help generate uptream bug reports. Also useful for spotting local
configuration quirks of both programs.
François Tigeot [Mon, 7 Oct 2013 20:04:24 +0000 (22:04 +0200)]
idr: Remove duplicated code
* idr_get_new() and idr_get_new_above() mostly do the same thing
* Have idr_get_new() call idr_get_new_above() and only keep a single
implementation
John Marino [Mon, 7 Oct 2013 16:40:05 +0000 (18:40 +0200)]
Update pkg bootstraps
The naming scheme for pkg bootstraps is inadequate. Even if it were to
include the release, library updates could necessitate the generation
of a new bootstrap more than once per release. Therefore, I've added
a serial in the name. The name is now:
bootstrap_pkg_${SERIAL}_x86-${32,64}.tar.xz
Bootstrap 01 has been created and put on mirror master. The original
bootstraps stopped working after the locales update.
Antonio Huete Jimenez [Sun, 6 Oct 2013 12:09:28 +0000 (05:09 -0700)]
libhammer - Make use of the HAMMERIOC_PFS_ITERATE ioctl.
* With this change 'info' directive no longer issues 65535 ioctl
calls to retrieve the information of all PFSes.
Antonio Huete Jimenez [Sun, 6 Oct 2013 12:01:41 +0000 (05:01 -0700)]
hammer - Add HAMMER_PFS_ITERATE ioctl
* It allows iterating through all created PFSes and
retrieving the information from them.
Antonio Huete Jimenez [Mon, 7 Oct 2013 13:12:09 +0000 (15:12 +0200)]
Fix i386 world build.
* Patch will be sent upstream to mdocml.
Sepherosa Ziehau [Mon, 7 Oct 2013 13:20:37 +0000 (21:20 +0800)]
tools/netperf: Use pipe to pass result back instead of tmp file
François Tigeot [Sat, 5 Oct 2013 19:59:04 +0000 (21:59 +0200)]
drm: Remove the drm_gem_names subsystem
And use the original idr code from Linux 3.8 instead
François Tigeot [Mon, 7 Oct 2013 05:33:21 +0000 (07:33 +0200)]
idr: Simplify idr_grow()
Make sure to only allocate powers of two descriptor numbers
and not weird values such as 1027
Matthew Dillon [Mon, 7 Oct 2013 05:06:01 +0000 (22:06 -0700)]
kernel - Add shared active virtual memory, i386
* Add shared active virtual memory.
Shared active real memory represents the amount of memory shared across
two or more pmap instances. The memory is counted just once.
Shared active virtual memory multiplies that value out by the number
of pmap instances the memory is being shared across, giving the sysop
some idea of the amount of ram being saved by e.g. shared libraries or
shared mmap()s, etc.
* Collect statistics on 32-bit systems too.
Matthew Dillon [Mon, 7 Oct 2013 04:37:25 +0000 (21:37 -0700)]
kernel - Allow NULL softc in ulptclose()
* Try to fix an unplug / null-pointer-indirection
Matthew Dillon [Mon, 7 Oct 2013 01:50:36 +0000 (18:50 -0700)]
kernel - Rewrite do_vmtotal and change the way VM statistics are collected
* The vmtotal sysctl was iterating through all VM objects. This is a
problem on machines with huge amounts of memory which might have millions
of VM objects.
* Collect running VM statistics in the swap pager and vm_page modules,
on a per-cpu basis. Add a struct vmtotal structure to globaldata.
Active real memory use is how many VM pages are mapped to processes.
Total real memory use is how many VM pages are allocated whether they
are mapped to processes or not.
Shared real memory use represents VM pages mapped to more than one process.
Total virtual memory use uses total real memory plus allocated swap space.
Remaining fields are left 0 and not currently supported.
* Represents a more realistic view of memmory and VM. In particular,
totalling up the file sizes for all mmap()'d files is no longer a
collected statistic because the system really has no way of knowing
how little or how much of the file is 'active', or even ever accessed.
* The vmtotal sysctl (e.g. used by systat -vm 1) now just iterates
cpus to aggregate gd_vmtotal for VM statistics. This is basically
O(1) for VM statistics. It still iterates processes (which we will
want to fix too, eventually), but the main scaling issue was with VM
objects and that has been fixed.
Matthew Dillon [Sun, 6 Oct 2013 23:40:59 +0000 (16:40 -0700)]
kernel - Report zalloc statistics more accurately
* The sysctl proc now subtracts out zalloc objects cached in per-cpu lists.
A substantial number of objects can be cached on per-cpu lists (up to 1/16
the zone's maximum in aggregate).
* Thus vmstat -z now reports more accurate numbers.
Matthew Dillon [Sun, 6 Oct 2013 23:34:53 +0000 (16:34 -0700)]
kernel - pc64 - Fix pv_free() race and add assertions
* Continued work trying to fix the bad *ptep ... panics. Previous commits
did not do the job. It is still unknown whether this one completely fixes
the panic.
* The pmap pv_entry API was allowing pv_entry's to be retained with 0 refs
and then doing a separate check for pv_pmap == NULL to determine if the
pv_entry could be freed or not. This resulted in a SMP race where multiple
threads could pv_free() the same pv_entry.
* Change the code to supply an addition ref for pv_pmap != NULL and use the
1->0 transition to deterministically conditionalize the pv_free().
* Change the shortcuts in pv_hold_try() and pv_drop() to use the new
assumptions.
* Add some additional assertions and a generation count to try to check bugs.
Matthew Dillon [Sun, 6 Oct 2013 23:32:22 +0000 (16:32 -0700)]
kernel - pc64 - Print errata fixup only for cpu 0
* Print errata fixup only for cpu 0
François Tigeot [Sun, 6 Oct 2013 21:27:07 +0000 (23:27 +0200)]
idr: Fix idr_find
* A NULL return value is perfectly valid
Franco Fichtner [Sun, 6 Oct 2013 21:05:34 +0000 (23:05 +0200)]
mdocml: sync library definitions
François Tigeot [Sun, 6 Oct 2013 18:44:47 +0000 (20:44 +0200)]
idr: idr_pre_get() takes two arguments
Don't diverge from the well-known Linux API
Franco Fichtner [Sun, 6 Oct 2013 17:07:27 +0000 (19:07 +0200)]
man: fix literal file suffix parsing regression
Some man pages have dots in their names, apparently. Fixes
the following invoke:
# man ./man.conf.5
This, however, doesn't fix parsing of e.g. "./man..conf.4.5".
Instead the suffix list should be searched for a real match
while also preserving their matching order. In the meantime,
please don't do this (ever).
Noticed-by: Thomas Klausner via NetBSD
Franco Fichtner [Sun, 6 Oct 2013 14:31:32 +0000 (16:31 +0200)]
mdocml: teach libmandoc(3) about ``libmandoc''
Franco Fichtner [Sun, 6 Oct 2013 13:45:22 +0000 (15:45 +0200)]
mdocml: refresh config.h and README.DRAGONFLY
Franco Fichtner [Sun, 6 Oct 2013 13:42:02 +0000 (15:42 +0200)]
Merge branch 'vendor/MDOCML'
Conflicts:
contrib/mdocml/mandoc.3
contrib/mdocml/mdoc_macro.c
François Tigeot [Sun, 6 Oct 2013 13:20:23 +0000 (15:20 +0200)]
idr: Grow descriptor table as needed in idr_get_new_above()
François Tigeot [Sun, 6 Oct 2013 13:04:57 +0000 (15:04 +0200)]
idr: Protect data structures with a lwkt_token
Using spinlocks is not a good idea when you have to allocate memory
Franco Fichtner [Sat, 5 Oct 2013 16:45:33 +0000 (18:45 +0200)]
man(1): fixup literal file suffix parsing
Look for last slash and assume next dot is the suffix start. Fixes
display of compressed pages as configured via man.conf(5), e.g.
# man ./man.1.gz
Franco Fichtner [Sat, 5 Oct 2013 16:01:07 +0000 (18:01 +0200)]
man(1): tweak literal file interpretation
The previous behaviour would not catch the following invoke:
# man usr.bin/man/man.1
Now, as a generalised rule, the literal interpretation is triggered by
any '/' character in the requested page(s).
Franco Fichtner [Sat, 5 Oct 2013 01:27:24 +0000 (03:27 +0200)]
man(1): fix build and adapt for DragonFly
swildner suggested to get rid of the cat* magic, so let's try this out
for mandoc(1). Still not hooked up to the build, but ready for testing.
Don't forget to manually install etc/man.conf to your system.
Franco Fichtner [Sat, 5 Oct 2013 01:04:20 +0000 (03:04 +0200)]
man(1): import man(1) replacement
Vanilla sources; not yet hooked up to the build.
Taken-from: NetBSD
François Tigeot [Sun, 6 Oct 2013 09:11:42 +0000 (11:11 +0200)]
idr: Mark non-public functions as static
Remove idr_alloc()'s prototype, there was no function body
François Tigeot [Sun, 6 Oct 2013 07:55:10 +0000 (09:55 +0200)]
idr: Remove non-standard function idr_init1()
It never was part of the Linux idr API.
Franco Fichtner [Sun, 6 Oct 2013 07:47:07 +0000 (09:47 +0200)]
Import mdocml-1.12.2
John Marino [Sat, 5 Oct 2013 17:41:17 +0000 (19:41 +0200)]
gdb(1), kgdb(1): Makefile framework updates for version 7.6.1
The updates for gdb(1) were straight-forwards and mainly consisted of
header updates although the gnu internal library is new, as well as
a new function for libiberty. The main work was getting kgdb(1) to
work with libgdb. As is typically, a lot of internal changes occurred
withing gdb that rendered kgdb broken (and unbuildable). After much
angst, kgdb works with gdb 7.6.1.
John Marino [Sat, 5 Oct 2013 17:29:29 +0000 (19:29 +0200)]
gdb: Add modifications required for version 7.6.1
THe majority of these modifications (the 4 "dfly" files and osabi.c)
are needed just to get the stock gdb to build. The modification to
inferior.c was reintroduced so kgdb can handle the 0 PID swapper
process, but the modication is much less than with version 7.4.1.
The change to the ptid_t structure (ptid.h) was necessary because
kgdb uses the thread address as the thread id, so the type has to
cover the entire address space.
The DragonFly README files were also updated.
John Marino [Sat, 5 Oct 2013 22:52:30 +0000 (00:52 +0200)]
Merge branch 'vendor/GDB'
John Marino [Thu, 3 Oct 2013 19:18:26 +0000 (21:18 +0200)]
gdb: Revert FAKE_PROCESS id code to prepare for gdb 7.6.1
This set of local modifications to support the swapper as an inferior
for kgdb is being reverted to ease the merge of the new gdb 7.6.1 code.
However, it appears that gdb 7.6.1 has implemented the concept of a
"fake" process ID independently, so it may not be necessary to add
these modifications back later.
John Marino [Sat, 5 Oct 2013 17:18:38 +0000 (19:18 +0200)]
Upgrade GDB from 7.4.1 to 7.6.1 on the vendor branch
Franco Fichtner [Thu, 3 Oct 2013 19:09:00 +0000 (21:09 +0200)]
mdocml: mandoc(1) now imitates groff(1)'s header and footer
While there, commit the autogenerated config.h as well as
version and OS name string to make maintenance of the
libmandoc(3) and mandoc(1) Makefile easier when the next
upstream version hits the repo.
Franco Fichtner [Sat, 5 Oct 2013 20:43:04 +0000 (22:43 +0200)]
test: first commit
François Tigeot [Sat, 5 Oct 2013 14:25:20 +0000 (16:25 +0200)]
drm: Use Linux idr functions in drm_crtc code
Reducing differences with Linux 3.8
François Tigeot [Sat, 5 Oct 2013 14:14:10 +0000 (16:14 +0200)]
drm: Add a linux/idr.h compatibility file
François Tigeot [Sat, 5 Oct 2013 14:08:03 +0000 (16:08 +0200)]
idr: Increase default size to 256 elements
The old value of 32 was way too small for the drm subsystem.
Matthew Dillon [Sat, 5 Oct 2013 00:59:42 +0000 (17:59 -0700)]
kernel - Add if_iwn to the default build
* Add the IWN wifi driver to the default build
Matthew Dillon [Sat, 5 Oct 2013 00:53:51 +0000 (17:53 -0700)]
kernel - Fix minor ipv6 mbuf memory leak
* Fix a minor ipv6 mbuf memory leak.
Reported-by: logan bug 2593
François Tigeot [Fri, 4 Oct 2013 17:35:35 +0000 (19:35 +0200)]
drm: Manage reference counts with Linux kref functions
Reduce differences with Linux 3.8
François Tigeot [Fri, 4 Oct 2013 16:44:37 +0000 (18:44 +0200)]
drm: Import linux/kref.h from the FreeBSD OFED stack
Sascha Wildner [Fri, 4 Oct 2013 06:44:06 +0000 (08:44 +0200)]
date(1): Fix the default format.
The correct format string for national representation of date(1)'s default
output is "date_fmt" (see /usr/src/share/timedef/*), which is not returned
by any standard nl_langinfo() constant. Previously, we defined our own
_DATE_FMT constant and handled it as an extension of nl_langinfo().
The locale upgrade removed nl_langinfo()'s _DATE_FMT handling and at the
same time brought in a change that causes "date_fmt" to be returned when
using "%+" as strftime()'s format.
That means, a nl_langinfo() call in date(1) is no longer needed, even
wrong (there is no constant returning the representation date(1) needs),
since strftime() can handle it all by itself directly and we can just use
"%+", like FreeBSD does, too.
Sascha Wildner [Tue, 1 Oct 2013 03:30:08 +0000 (05:30 +0200)]
libc: Raise WARNS to 2.
Franco Fichtner [Sat, 14 Sep 2013 09:53:15 +0000 (11:53 +0200)]
tic.1: mdoc(7) conversion
John Marino [Thu, 3 Oct 2013 18:20:20 +0000 (20:20 +0200)]
gdb: revert local modification to handle wchar_t
This local modification has been a real pain to maintain as each version
of gdb modifies charset.c to the point it doesn't merge cleanly. Now
that the base iconv has been updated, the original gdb code should work
fine. The config header has also been updated to reflect the new iconv
capabilities.
François Tigeot [Thu, 3 Oct 2013 18:22:43 +0000 (20:22 +0200)]
drm: Manage drm_local_map structures with linux list functions
Keep things as close to Linux 3.5 as possible
Matthew Dillon [Wed, 2 Oct 2013 17:42:48 +0000 (10:42 -0700)]
kernel - Fix a SMP race in the 64-bit pmap code (2)
* Last commit had an extra vm_page_spin_unlock() call, removing.
* Fix an improper spin_unlock() which was supposed to be a
spin_unlock_shared(). This appears to be an old bug.
Reported-by: profmakx, ftigeot
Matthew Dillon [Wed, 2 Oct 2013 04:43:34 +0000 (21:43 -0700)]
hammer2 - Move write thread from hmp to pmp
* Move the write thread from struct hammer2_mount to struct hammer2_pfsmount.
Logical buffers for files are associated with the PFS, not the HMP. A PFS
can be backed by multiple HMPs.
Matthew Dillon [Tue, 1 Oct 2013 23:53:38 +0000 (16:53 -0700)]
kernel - Fix a SMP race in the 64-bit pmap code
* Some of the pmap code was assuming that pv_entry's would remain stable
under circumstance where they might not actually remain stable.
Specifically, when the vm_page spinlock is held while issuing a
pv_hold_try() call on the pv, the pv is not necessarily stable
and its pmap and pindex must be double-checked after a successful
lock is acquired. This case occurs in two places in the code.
* Do this check in all cases (when the pmap spinlock OR the vm_page spin
lock is used to access a pv_entry), just to be sure that we have covered
all the bases.
* This SMP race is virtually impossible to reproduce on 8-thread boxes
but appears to be easy to reproduce on monster (48-way opteron).
* As of this commit it is not 100% clear if the patch fixes the assertion
seen, but it probably fixes some things.
panic: bad *ptep
000000078592b425 sva
00007ffffffff000 pte_pv NULL
Reported-by: ftigeot
Matthew Dillon [Tue, 1 Oct 2013 05:48:20 +0000 (22:48 -0700)]
hammer2 - cleanup, write path work
* Code synchronous and asynchronous b*write() in the write path based on
request flags, instead of just using bdwrite().
* Document a bunch of stuff.
* Remove dead code.
Joris Giovannangeli [Tue, 1 Oct 2013 22:49:06 +0000 (00:49 +0200)]
stdlib/libc : don't bring back DragonFly cvs ids
Joris Giovannangeli [Tue, 1 Oct 2013 22:31:50 +0000 (00:31 +0200)]
libc/stdlib : revert to dragonfly implementation
* Revert to
2d5c7e410ffcb72d10994a0d1d324b7265e29647. The dragonfly
version shares code for the various functions of the strtol familly,
using macros.
* add locale aware version for the functions the strtol familly. Only
isspace calls are concerned.
François Tigeot [Tue, 1 Oct 2013 19:35:15 +0000 (21:35 +0200)]
kernel: don't allow proplib to redefine bool
François Tigeot [Tue, 1 Oct 2013 19:01:20 +0000 (21:01 +0200)]
stdbool.h: Move to sys/sys
It's bad style for the kernel to use the same headers as userland
programs.
Requested-by: dillon
François Tigeot [Tue, 1 Oct 2013 13:33:18 +0000 (15:33 +0200)]
drm/i915: Make intel_gtt_get() return type the same as on Linux 3.5
Matthew Dillon [Tue, 1 Oct 2013 00:40:40 +0000 (17:40 -0700)]
hammer2 - Revamp snapshot code
* Change the snapshot code to not use chain_duplicate(). Instead
get the thing working by flushing the original sub-tree, creating
a new directory under the super-root, and then simply copying the
blockset.
The previous code called chain_duplicate() to create the snapshot
but the coding still required a flush. Doing it without a flush
is possible for a read-only snapshot but very difficult otherwise.
* This will simplify coding down the line.
Matthew Dillon [Mon, 30 Sep 2013 22:31:14 +0000 (15:31 -0700)]
hammer2 - Revamp hammer2_cluster structure part 1
* Adjust the hammer2_cluster structure to track multiple chains (and thus
multiple mount points). Use cases still just pull out one chain.
* Remove schain from hammer2_mount, leaving just sroot. The cached chain
structure isn't useful because it doesn't track delete-duplicate
operations. Use sroot for basing functions.
* Mark pfs-mount chains with the PFSROOT flag and propagate through
duplications to detect when a snapshot should inherit the PFS
cluster id or not.
John Marino [Mon, 30 Sep 2013 21:59:27 +0000 (23:59 +0200)]
Set ICONV_CONST to "const" for various GNU software
The prototype of iconv changed to match FreeBSD and NetBSD with the
recent locales update.
John Marino [Mon, 30 Sep 2013 21:14:14 +0000 (23:14 +0200)]
libarchive: Disable iconv the statically-built version
The iconv in base uses dlopen(3) which only works on dynamically-built
binaries. Use the new SHARED_CFLAGS variable to set ICONV conditionally
for dynamic libraries only. This fixes the "Service Unavailable"
message that pkg started emitting after the locales/iconv update.
John Marino [Mon, 30 Sep 2013 20:48:45 +0000 (22:48 +0200)]
bsd.lib.mk: Recognize {SHARED,STATIC}_{C,CXX}FLAGS variables
Four new variables are recognized by bsd.lib.mk:
STATIC_CFLAGS
STATIC_CXXFLAGS
SHARED_CFLAGS
SHARED_CXXFLAGS
This allows for the possibility to compile the objects with unique flags
depending if the library is shared or not, and/or c versus c++.
John Marino [Mon, 30 Sep 2013 19:58:56 +0000 (21:58 +0200)]
date(1): Choose a better format constant
After the locales patch, date(1) would return something like "09/30/13"
depending on your locale. This is a different format that omits the
time component that was there before. Changing the D_FMT constant for
D_T_FMT will return something like "Mon Sep 30 21:55:26 2013" which is
much closer to how it was before the locales patch was committed.
Sascha Wildner [Mon, 30 Sep 2013 04:22:18 +0000 (06:22 +0200)]
libc: Ansify again, de-register again.
* Remove all the K&R crap that was carelessly copied over our ansified
source in the so called locale "sync" (
0d5acd7467c4e95).
* Also remove a lot of old unused gunk in stdtime/ again that had already
been removed. We really don't want it back.
* De-register again (while here, do that in resolv/ too).
John Marino [Sun, 29 Sep 2013 23:29:20 +0000 (01:29 +0200)]
libm: Update erf, add imprecise versions of missing c++11 functions
Provide updates to erf and erff functions.
Also add weak versions of the missing c++11 long double functions by
using taking arguments of type double. Use of these versions will
result in a linker warning to discourage program that really need
extra precision from using them.
Note that since the c/c++ specs only guarantee that long double has
precision equal to double, code that relies on these functions having
greater precision is unportable at best and broken at worst.
Taken-from: FreeBSD
John Marino [Sun, 29 Sep 2013 19:18:52 +0000 (21:18 +0200)]
Activate Native Language Support (NLS) for error messages
Error messages have been in English regardless of the locale selected by
the user. NLS support has always been possible, but it's never been
activated. A simple CFLAG (-DNLS) does that now. At the same time, NLS
support was added for network messages.
John Marino [Sun, 29 Sep 2013 17:33:57 +0000 (19:33 +0200)]
nvi: Upgrade from version 1.79 to 2.1.1 (multibyte support)
The DragonFly NVI ("new" vi and ex) has been at version 1.79 which,
according to the FreeBSD repository, was imported nearly 18 years
ago in October 1996.
A 2011 Summer of Code project of FreeBSD added multibyte encoding
support with iconv. With the recent update to the base iconv
support, DragonFly users can enjoy multibyte support. Language
catalogs are still based on English, French, German, Dutch,
Spanish, Chinese, Russian, Polish, and Swedish. FreeBSD brought
this NVI update into their HEAD in August 2013. Local
modifications to nvi 1.79 were incorporated directly on top of
this sync.
Repository: <https://github.com/lichray/nvi2>
Antonio Huete Jimenez [Sun, 29 Sep 2013 15:25:26 +0000 (08:25 -0700)]
dirfs - Lower debug level to 0
Antonio Huete Jimenez [Sun, 29 Sep 2013 15:14:25 +0000 (08:14 -0700)]
dirfs - Fix a panic on shutdown.
* Do not attempt to release root inode if there was no call
to VFS_ROOT()
John Marino [Sat, 21 Sep 2013 10:45:03 +0000 (12:45 +0200)]
locales, libconv: Sync with FreeBSD (extensive reach)
What started out as a relatively simply upgrade to libiconv finally
resulted in a simultaneous overhaul to locales, strings, and stdio.
All of these are interdependent and there is no way to upgrade them
individually or in steps.
These cases are similar to what happened with libm where significant
syncing came from NetBSD previously, rendering contributions from
FreeBSD difficult. Libiconv and locales (both ancient) are now in
sync with FreeBSD HEAD.
As several headers were signficantly updated and the mtree was updated
to accommodate the new include/xlocale directory, this commit will
require a full world build. It also may cause some dports to no longer
build due to prototype differences, but the dports will be adjusted.
The regexp library was not being used. It was removed from FreeBSD four
years ago. Since it required collate updates, I took the opportunity to
remove it completely by adding re_comp functionality to 4.3 compat
library like FreeBSD did.
__DragonFly_version has been bumped to 500300.
Sascha Wildner [Sun, 29 Sep 2013 11:14:03 +0000 (13:14 +0200)]
keylogin(1): Fix a warning and raise WARNS to 6.
François Tigeot [Sun, 29 Sep 2013 09:36:28 +0000 (11:36 +0200)]
agp/intel: Add ValleyView and Haswell devices
François Tigeot [Sun, 29 Sep 2013 08:43:49 +0000 (10:43 +0200)]
agp/intel: Fix pci_get_subdevice() / pci_get_device() confusion
The IDs are the sames with Intel chipsets but it's best to check
for the right thing anyway.
Spotted-by: swildner
François Tigeot [Sun, 29 Sep 2013 07:23:39 +0000 (09:23 +0200)]
agp/intel: Minor cleanups
* Do not limit the device probe check to "display" devices
* Stop storing the vendor ID in the match list, all the devices we care
about are Intel ones.
Matthew Dillon [Sun, 29 Sep 2013 06:30:11 +0000 (23:30 -0700)]
hammer2 - Redo refactor code, fix races, add assertions
* Redo the refactor code which is used to detect when a chain
has been delete-duplicated so the caller can translate a stale
chain pointer into an up-to-date chain pointer.
The new code uses a simple chain flag, HAMMER2_CHAIN_DUPLICATED,
to flag that the original chain is now stale. The old code was
unnecessarily complex.
* Close several holes in the hardlink code where stale chains
were improperly being used as starting points for modifications,
resulting in filesystem corruption.
* Assert the a delete-duplicate is not performed on a stale chain.
Antonio Huete Jimenez [Sat, 28 Sep 2013 16:25:42 +0000 (09:25 -0700)]
vkernel - Update usage options.
* This was overlooked in the previous commit.
John Marino [Sat, 28 Sep 2013 09:02:49 +0000 (11:02 +0200)]
Makefile.inc1: Fix build when MAKEOBJDIRPREFIX is provided
While testing a patch that removed symbols from libc, Joris found his
build would break on leaf with MAKEOBJDIRPREFIX set in the command-line.
While this is a misuse of the feature per bsd.obj.mk comments, the issue
was reproduced on my machine. The object files from btools, ctools, and
world were getting placed in common directories, so world binaries were
being built with bootstrap and crosstools objects.
I do not know if this has always been the case, or if this started
happening when bmake replaced legacy make. In any case, changing the
way DESTDIRBASE is defined solved the build issues on the local machine.
Antonio Huete Jimenez [Sat, 28 Sep 2013 09:06:44 +0000 (02:06 -0700)]
vkernel - Add -d option to disable vmm.
In some cases we might need to be able to disable vmm per-vkernel.
Add a command-line option to allow that.
Antonio Huete Jimenez [Fri, 27 Sep 2013 12:16:37 +0000 (05:16 -0700)]
vkernel - Remove unused getopt option.
Antonio Huete Jimenez [Fri, 27 Sep 2013 11:58:28 +0000 (04:58 -0700)]
vkernel64 - Report VMM status at startup.
Matthew Dillon [Sat, 28 Sep 2013 05:57:54 +0000 (22:57 -0700)]
hammer2 - Rewrite internal chain algorithms - stabilization
* Add temporary guards on a few structures for debugging purposes.
* Verify that blocktables are ordered.
* live_zero is multi-homed, move it out of the chain_core structure and
into the chain structure. Also move the COUNTEDBREFS flag
* Unlock the spinlock prior to issuing the atomic fetchadd to decrement
hammer2_core->sharecnt. Clean up any hanging chain_layer's when freeing
a core structure.
* Initialize live_zero to 0 when base is NULL (i.e. if the chain structure
is in the INITIAL stage).
* Refactor hammer2_chain_find(), hammer2_base_find(), and add
hammer2_combined_find(). Fix numerous bugs in the key_next
calculation and ensure that the combined find returns exhaustion
if the element it finds is outside the requested range.
* Close a delete-duplicate race in hammer2_chain_getparent() and
in hammer2_chain_lookup(). A delete-duplicate could weasle its
way in during the parent lock transition.
Matthew Dillon [Fri, 27 Sep 2013 14:50:53 +0000 (07:50 -0700)]
hammer2 - Rewrite internal chain algorithms
* These are big changes designed to make it easier for the flusher to
order media writes and as a requirement for upcoming 'copies' and other
work. H2 will be somewhat unstable for a short while.
* Replace the single-layer RBTREE per topological level with a stack of
RBTREEs per topological level. This allows conflicts to be stacked
vertically roughly by flush synchronization group instead of trying
to arrange everything in a single 2D RBTREE. Conflicts arise because
the in-memory tree can represent multiple synchronization points with
live and deleted-flagged chains.
The RBTREE compare function is actually simplified by this change, but
the code must contend with a list of RBTREEs (built as conflicts arise)
instead of just one.
* The block table for any given topological layer is now ordered, and this
will now be reflected and required on-media as well. That is, it is
sorted. It is still effectively set-associative in that the dynamic
radix tree model is still being used, but elements must now be sorted.
This improves I/O but more importantly it will allow H2 to use cursors
to track multiple mounts used in 'copies' and later on in clustering.
Running multiple media topologies concurrently was impossible when the
block sets were unordered.
This makes implementing a merged search (blocktable and in-memory chains)
easier.
* Remove chain->index tracking. We used to track the block table index
that each in-memory chain intended to use which worked 'ok' when the
block table (such as in an inode or an indirect block) was unordered,
but requires excessive (and unnecessary) coding when the block table
is ordered.
Instead of tracking indices we track the total number of 'live' (not
deleted) elements that will end up in the block table in hammer2_chain_core
and use that to determine when indirect blocks need to be created or not.
Block table entries are now only assigned by the flusher itself when it
determines that an entry must be added or deleted.
* The flusher now operates more deterministically by scanning the stacked
RBTREEs backwards (earliest to most recent). The stacks are not specifically
broken down by flush group (instead stacking only occurs if there is a
key range conflict), so the flusher still checks the modify_tid and
delete_tid for each chain it scans, but there should no longer be any
chance of media updates being misordered.
Because block table indices are now assigned by the flusher, each RBTREE
stack is scanned three times instead of twice. One for the recursion down
and two for the finalization on the way back up which updates the block
table. The block table scan was broken into two passes to handle deletions
in the first pass and insertions/updates in the second pass which allows
the block table to be updated on the fly without having to assign specific
array indices to chains.
* Replace the first_parent/next_parent linkages used to deal with multi-homed
chains (chains with multiple parents which can arise due to renames,
moves into or out of indirect blocks ,etc). Use a queue instead.
Remove the additional ref count used in the old linkage model. We must
still ensure that the final 'live' chain does not get removed when its
refs drops to 0.
Sepherosa Ziehau [Fri, 27 Sep 2013 03:57:14 +0000 (11:57 +0800)]
test: Test commit from new box xanadu2
Sepherosa Ziehau [Fri, 27 Sep 2013 03:19:10 +0000 (11:19 +0800)]
test: Test commit from new box xanadu1
Matthew Dillon [Thu, 26 Sep 2013 17:16:04 +0000 (10:16 -0700)]
kernel - Fix ifnet scan race in ipv6
* Fix situations where an ifnet scan can catch an interface as it is still
being initialized, before ifp->if_afdata[AF_INET6] is assigned.
* Add a global ifnet_token to protect if_index and the ifnet list.
WARNING, there are still SMP races in the ifnet scans, they have
not yet been instrumented with the new token.
* Also reorder the TAILQ_INSERT of a new if into the ifnet list to occur
after all the domain initialization has been done rather than before.
Sascha Wildner [Thu, 26 Sep 2013 09:21:48 +0000 (11:21 +0200)]
Fix i386 buildworld.
REALLY_X86_64 needs to be defined in order to be checked later in the
Makefile.
Sepherosa Ziehau [Thu, 26 Sep 2013 08:51:42 +0000 (16:51 +0800)]
mxge: Remove more useless code under IFNET_BUF_RING
Sepherosa Ziehau [Thu, 26 Sep 2013 01:27:07 +0000 (09:27 +0800)]
mxge: When MSI interrupt handler is triggered, 'valid' probably is set
François Tigeot [Tue, 24 Sep 2013 07:25:06 +0000 (09:25 +0200)]
drm: Use an include directory hierarchy similar to the Linux one
Sepherosa Ziehau [Wed, 25 Sep 2013 09:06:32 +0000 (17:06 +0800)]
mxge: Add macro for RX small buf length
Sepherosa Ziehau [Wed, 25 Sep 2013 08:36:53 +0000 (16:36 +0800)]
mxge: Mark TX queue no longer over-active earlier