Alex Hornung [Mon, 15 Nov 2010 04:03:13 +0000 (04:03 +0000)]
ufs - Adjust the on-disk structure to FreeBSD's
* Adjust the superblock on-disk structure a bit to include a few things
like a volume name as FreeBSD does.
* NOTE: This introduces no functional changes but will allow to easily
extract volume names from volumes.
Obtained-from: FreeBSD
Alex Hornung [Mon, 15 Nov 2010 04:02:25 +0000 (04:02 +0000)]
kern_udev - Also add the device type to the dict
* By default also add the device type (D_DISK, ...) to the initial
device dictionary.
Alex Hornung [Mon, 15 Nov 2010 04:00:24 +0000 (04:00 +0000)]
udevd - Change filters to AND instead of OR processing
* Now all conditions in filters for monitor and enumerate have to be met
instead of only one.
* This seems to be the way linux does it and it is
pretty much the sensible way of doing it.
Alex Hornung [Mon, 15 Nov 2010 03:59:01 +0000 (03:59 +0000)]
proplib - Don't link unconditionally to libphtread
* There is no need to link unconditionally to libpthread, since it can
also work in single-thread applications using the libc stubs. That is
after all why we fixed some of them a few months ago.
Alex Hornung [Mon, 15 Nov 2010 03:58:06 +0000 (03:58 +0000)]
devattr - Add a few more convenience macros
* Add two more macros that take char* instead of const char* for setting
monitor filters, as we do for enumerate filters.
Alex Hornung [Fri, 12 Nov 2010 20:49:09 +0000 (20:49 +0000)]
dm/disk - cleanup, add '.' between name and slices
* Clean up some dm debugging introduced earlier.
* Add a DSO_DEVICEMAPPER option that will cause the disk subsystem to
introduce a '.' between the base name and the slices (i.e. foo.s0
instead of foos0).
Alex Hornung [Fri, 12 Nov 2010 08:41:51 +0000 (08:41 +0000)]
dsched - adjust to work nicely with dm disks
* Substitute the forward slashes ('/') for '-' so that we don't have
strangely named sysctl entries with slashes in them. This is also
necessary for the loader, since it doesn't support slashes in the
name.
Alex Hornung [Thu, 11 Nov 2010 22:01:50 +0000 (22:01 +0000)]
dm/nestbuf - Bind into devstat, clean up
* Bind dm into devstat via nestbufs.
* Clean up several dm changes.
Alex Hornung [Thu, 11 Nov 2010 17:35:15 +0000 (17:35 +0000)]
disk_setdiskinfo - correct assertion
* We want to assert that only either the number of blocks or the size in
* bytes is specified, not either the size in bytes or the blocksize.
Alex Hornung [Thu, 11 Nov 2010 16:24:04 +0000 (16:24 +0000)]
dm - bind logical devices into the disk subsystem
* Bind logical dm devices into the disk subsystem so that they are more
flexible. This way they'll appear as regular disks, they'll be able to
have a disk scheduler and disklabels can be created on top of them.
Alex Hornung [Thu, 11 Nov 2010 16:23:03 +0000 (16:23 +0000)]
disk_create_named - Adapt a bit to work with dm
* Don't add a 'unit' to the name if it's a named disk creation.
Alex Hornung [Thu, 11 Nov 2010 16:21:10 +0000 (16:21 +0000)]
Temporarily bump the mbuf cluster size
* This solves issues with wpi. Once there is a different solution this
can be reverted.
Suggested-by: Matthew Dillon (dillon@)
Sascha Wildner [Mon, 15 Nov 2010 06:54:53 +0000 (07:54 +0100)]
cam(4): Remove dead code. secs_per_cylinder can't be 0 here.
Sascha Wildner [Mon, 15 Nov 2010 06:53:21 +0000 (07:53 +0100)]
kernel: Remove some redundant initialization.
Matthew Dillon [Sun, 14 Nov 2010 16:02:48 +0000 (08:02 -0800)]
kernel - Add sysctl to bypass wifi chipset hardware crypto
* Add sysctl net.wlan.force_swcrypto, default disabled. If set to 1
prior to attaching wlan to the underlying wireless interface this
will force software crypto to be used and bypass the hardware
crypto implemented by the wireless chipset.
* Currently we know there is at least one serious issue with the
Atheros 9280 when used with WEP2 (shows up as RSN in list scan) + WPS,
and possibly other combinations. The wrong transmit key winds up
being used for broadcast packets, including ARP.
* This sysctl works around the problem. If your wpa_supplicant is able
to connect to a network but you are unable to dhclient / use the
network you might be hitting this problem and setting the sysctl to
1 may fix it.
Note that the sysctl must be set prior to attaching the wlan to the
underlying wireless driver, so it is typically best to do it at boot
time or near the top of whatever script you use.
Inspired-by: 2-days of connectivity issues at NYCBSDCON.
Matthew Dillon [Sun, 14 Nov 2010 15:14:33 +0000 (07:14 -0800)]
kernel - Misc atheros updates
* Misc atheros updates, but doesn't seem to fix an issue that seems
to be related to WPA2 + WPS for the 928x chipset
Taken-from: FreeBSD
Matthew Dillon [Sun, 14 Nov 2010 15:03:41 +0000 (07:03 -0800)]
kernel - add kern.sysbeep_enable feature
* Add a sysctl kern.sysbeep_enable (default on). Setting this to 0
will disable the system beep / bell.
* Useful when messing with a laptop in a conference, those beeps can
get really annoying.
Sascha Wildner [Sun, 14 Nov 2010 10:36:25 +0000 (11:36 +0100)]
dc(4): Add IDs for the Abocom FE2500.
Tested-by: Max Herrgard <herrgard@gmail.com>
Stathis Kamperis [Sat, 13 Nov 2010 16:40:48 +0000 (18:40 +0200)]
HAMMER - Check if supplied conf file exists
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1911>
Sascha Wildner [Sat, 13 Nov 2010 16:07:22 +0000 (17:07 +0100)]
Remove useless .PATH targets from kernel module Makefiles.
All these came in from FreeBSD which keeps their module Makefiles in
sys/modules (that is, separate from the source). We don't, so they are
not needed.
Sascha Wildner [Sat, 13 Nov 2010 15:48:36 +0000 (16:48 +0100)]
Make ubt(4) compilable into the kernel and add it to LINT.
Sascha Wildner [Sat, 13 Nov 2010 14:38:17 +0000 (15:38 +0100)]
ifconfig(8): Fix a bug and do some cleanup.
* Use the correct interface name (ifname instead of name) in a message.
* Remove an unused variable.
* Mark usage() as noreturn.
* Remove DragonFly CVS IDs.
Sascha Wildner [Sat, 13 Nov 2010 12:59:18 +0000 (13:59 +0100)]
hammer.8: Add some words about HAMMER version 5 and about upgrading to it.
Submitted-by: Ilya Dryomov <idryomov@gmail.com>
Sascha Wildner [Sat, 13 Nov 2010 06:10:22 +0000 (07:10 +0100)]
kernel: Silence some warnings that crept up with the APIC_IO changes.
Stathis Kamperis [Fri, 12 Nov 2010 13:52:07 +0000 (15:52 +0200)]
HAMMER - Implement volume-list command
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1863>
Matthew Dillon [Thu, 11 Nov 2010 18:15:46 +0000 (10:15 -0800)]
kernel - Make sure invalidated pages are unmapped in rare situation.
* vfs_vmio_release() was ignoring pages busied by other MP users while
releasing VM pages associated with the buffer cache. This could
potentially lead to invalida pages remaining memory mapped.
* Ensure that the released pages found to be in this state are still
unmapped.
Matthew Dillon [Thu, 11 Nov 2010 18:12:59 +0000 (10:12 -0800)]
kernel - Close possible hole in hammer inval code
* Do not use FINDBLK_TEST, instead have findblk() return a locked buffer
cache buffer and deal with it from there. While the original code
should have been ok (it would getblk() the buffer cache in either case),
it depended on certain MP race characteristics that might not hold so
don't take any chances.
* This does not fix any known issues but removes some uncertainty.
Sascha Wildner [Thu, 11 Nov 2010 02:43:40 +0000 (03:43 +0100)]
iir(4): Sync with FreeBSD.
* Remove an unused function.
* Fix a wrong check (io was checked for NULL twice, instead of io and irq).
Matthew Dillon [Wed, 10 Nov 2010 20:21:58 +0000 (12:21 -0800)]
diskless nfs - Add a remount feature for /conf.
* Add a feature where you can now remount the dirs in /conf so that
you can e.g. have a /conf/10.1.2.3 that gets remounted off the local
hdd of that machine before rc.d/initdiskless actually does it's thing
and enables you to have private ssh keys that other diskless clients
cannot access, but still enables you to exploit /conf to it's fullest.
Submitted-by: Rumko
Matthew Dillon [Wed, 10 Nov 2010 20:12:45 +0000 (12:12 -0800)]
HAMMER utility - Handle pruning when only snapshot meta-data present
* If only snapshot meta-data is present and no snapshot softlinks are found
hammer prune (and hammer cleanup) previous exited with an error. This case
can occur when creating manual snapshot softlinks and/or trying to prune
a slave PFS.
* In fact this is incorrect. If meta-data is present we can prune based
on that.
Venkatesh Srinivas [Wed, 10 Nov 2010 20:10:25 +0000 (12:10 -0800)]
kernel - kmem_slab_alloc: Record vm_pages from page alloc for page mapping
This eliminates all of the vm map lookups for slab-sized and smaller
allocations and the first 32-or-so for larger ones.
Sascha Wildner [Wed, 10 Nov 2010 11:49:56 +0000 (12:49 +0100)]
Regenerate the pciconf(8) database
...from the following files:
Hart: Jan 22, 2008 (version 671)
Boemler: Nov 1, 2010
Mares: Oct 20, 2010
Michael Neumann [Mon, 8 Nov 2010 22:45:31 +0000 (23:45 +0100)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Michael Neumann [Mon, 8 Nov 2010 22:41:36 +0000 (23:41 +0100)]
Remove remaining APIC_IO usages in bus/pci
Sascha Wildner [Mon, 8 Nov 2010 22:23:25 +0000 (23:23 +0100)]
installer: Ignore the exit status of two grep commands.
These commands may just find nothing which is okay in these cases. So don't
interpret their exit status 1 as failure.
Reported-by: lentferj
Matthew Dillon [Mon, 8 Nov 2010 21:12:23 +0000 (13:12 -0800)]
boot - Remove improper setting of default_kernel
* Setting default_kernel in loader.conf prevents dloader.menu from
conditionally setting it according to what it finds in /boot. Remove
the set.
* To be symmetrical add a selection (u) for kernel.UP in addition to the
selection (m) for kernel.SMP, in case someone selects SMP and then wants
to go back to UP before booting.
Matthew Dillon [Mon, 8 Nov 2010 21:10:32 +0000 (13:10 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 8 Nov 2010 20:00:29 +0000 (12:00 -0800)]
HAMMER - Fix broken assertion
* An assertion related to validating the flush group was not quite
correct and causing fsstress panics with nohistory mounts.
* Fixed the assertion to allow a directory's flush group to be different
from an underlying directory entry. Directory records can be flushed
independent of the directory inode itself, particularly under stressful
conditions where the aggregate flush winds up being too large for the
buffer cache to handle and has to be split up.
Reported-by: Sascha Wildner <saw@online.de>
Sascha Wildner [Mon, 8 Nov 2010 19:16:54 +0000 (20:16 +0100)]
smp.4: Adjust for the APIC_IO option removal.
Sascha Wildner [Mon, 8 Nov 2010 18:18:18 +0000 (19:18 +0100)]
GENERIC_SMP/X86_64_GENERIC_SMP: Properly sync for the APIC_IO removal.
* X86_64_GENERIC_SMP was forgotten, too (hey, we do have grep :).
* Bring back the comments in GENERIC_SMP.
* Remove some CVS IDs and trailing whitespace in other configs.
Matthew Dillon [Mon, 8 Nov 2010 18:04:42 +0000 (10:04 -0800)]
test commit (2)
Matthew Dillon [Mon, 8 Nov 2010 18:03:02 +0000 (10:03 -0800)]
test commit
Alex Hornung [Mon, 8 Nov 2010 17:15:19 +0000 (17:15 +0000)]
wpi - (experimental) fixes
Alex Hornung [Mon, 8 Nov 2010 07:22:20 +0000 (07:22 +0000)]
acpi.4 - correct cpu_idle_hlt foo
* According to code commnets in the machdep.c files, cpu_idle_hlt=2 is
using ACPI sleep states. Setting it to 1 just uses the hlt
instruction.
Alex Hornung [Mon, 8 Nov 2010 07:10:49 +0000 (07:10 +0000)]
GENERIC_SMP - adapt to lack of APIC_IO
Michael Neumann [Sun, 7 Nov 2010 21:43:54 +0000 (22:43 +0100)]
Merge branch 'apic_io'
Conflicts:
sys/platform/pc64/conf/options
Michael Neumann [Sun, 7 Nov 2010 21:08:45 +0000 (22:08 +0100)]
Remove APIC_IO option
Michael Neumann [Sun, 7 Nov 2010 21:05:39 +0000 (22:05 +0100)]
Remove APIC_IO option
Michael Neumann [Sun, 7 Nov 2010 20:59:58 +0000 (21:59 +0100)]
Remove APIC_IO from vkernel
Michael Neumann [Sun, 7 Nov 2010 20:32:27 +0000 (21:32 +0100)]
x86_64 - Get completely rid of APIC_IO
For SMP kernels compile time APIC_IO option has been superseeded
by loader tunable hw.apic_io_enable which defaults to APIC I/O
enabled.
Michael Neumann [Sun, 7 Nov 2010 18:04:25 +0000 (19:04 +0100)]
Merge branch 'apic_io'
Matthew Dillon [Sun, 7 Nov 2010 18:03:03 +0000 (10:03 -0800)]
HAMMER - Add hammer dedup directive and support
* Adjust the utility to exit with an appropriate error if an
attempt is made to dedup a filesystem which has not been upgraded
to version 5.
Michael Neumann [Wed, 6 Oct 2010 18:00:44 +0000 (20:00 +0200)]
i386 - Get completely rid of APIC_IO
For SMP kernels compile time APIC_IO option has been superseeded
by loader tunable hw.apic_io_enable which defaults to APIC I/O
enabled.
Matthew Dillon [Sun, 7 Nov 2010 17:46:15 +0000 (09:46 -0800)]
HAMMER - Add hammer dedup directive and support
* Minor adjustments to fix compile errors on 64-bit systems
(printf %lld -> %jd and use intmax_t casts).
Matthew Dillon [Sun, 7 Nov 2010 17:43:08 +0000 (09:43 -0800)]
HAMMER - Add hammer dedup filesystem version dump
* Require a version 5 filesystem for dedup operation. Upgrading can be done
in-place. All this does is make the layer2 bytes_free field a signed
value instead of unsigned, allowing it to go negative.
This allows dedup to use the field to account for multiple references to
the same block of data, causing the field to (likely) go negative.
Matthew Dillon [Sun, 7 Nov 2010 17:29:39 +0000 (09:29 -0800)]
HAMMER - Add hammer dedup directive and support
* Implements all the logic required to dedup a HAMMER filesystem.
* There is one remaining issue and that is the reblocker's propensity to
undo de-dup's hard work in certain cases.
* Code bounty for hammer_dedup
Submitted-by: Ilya Dryomov <idryomov@gmail.com>
Matthew Dillon [Sun, 7 Nov 2010 17:20:11 +0000 (09:20 -0800)]
libutil - Add humanize_unsigned()
* Add a humanize_unsigned() function as a companion to humanize_number()
which does a much better job on large unsigned 64-bit quantities.
Submitted-by: Ilya Dryomov <idryomov@gmail.com>
Matthew Dillon [Sun, 7 Nov 2010 17:14:02 +0000 (09:14 -0800)]
nrelease - Add target to help w/ debugging
* Add a nopkgs target which disables the package step, for debugging
purposes only.
Sascha Wildner [Sun, 7 Nov 2010 14:20:18 +0000 (15:20 +0100)]
talkd(8): Reduce diffs with FreeBSD and raise WARNS to 6.
Sascha Wildner [Sun, 7 Nov 2010 09:37:47 +0000 (10:37 +0100)]
watchdogd(8): Remove local warning options and fix static linking.
Sascha Wildner [Sun, 7 Nov 2010 09:37:13 +0000 (10:37 +0100)]
dialog(1): Remove local warning options and raise WARNS to 3.
Sascha Wildner [Sun, 7 Nov 2010 08:47:13 +0000 (09:47 +0100)]
dialog(3): Remove __linux__ conditionals.
They are no longer needed, now that the select function that gets passed
to scandir(3) takes a const parameter.
While I'm here, remove local warning options from the Makefile and raise
WARNS to 2.
Matthew Dillon [Sat, 6 Nov 2010 17:29:46 +0000 (10:29 -0700)]
kernel - Fix spinlock held on switch
* flushbufqueues() was holding bufqspin through a buffer cache callback,
causing a kernel panic if the callback winds up blocking. This only
effected UFS not HAMMER).
* Release the spinlock a little earlier so it isn't held around the callback.
* Make a minor semantics change to bio_track_wait() to deal with potential
compiler optimizations messing up the cmpxchg loop.
Reported-by: "goetz@net-amp.com" <goetz@net-amp.com>
Matthew Dillon [Sat, 6 Nov 2010 15:41:02 +0000 (08:41 -0700)]
umount - Remove sync() call from utility
* Do not call sync() unconditionally when issuing the /sbin/umount command.
Let the kernel take care of any syncing.
* This may allow umount -f to operate better in situations where a mount
might be stuck (such as a NFS mount), and also removes delays associated
with scanning large numbers of vnodes on x86_64.
Sascha Wildner [Sat, 6 Nov 2010 05:52:17 +0000 (06:52 +0100)]
<sys/cdefs.h>: Add some definitions for IEEE 1003.1-2008.
Our default remains 200112 for now.
Sascha Wildner [Sat, 6 Nov 2010 01:37:38 +0000 (02:37 +0100)]
installer: Add support for creating encrypted partitions.
With the exception of /boot for the HAMMER install and / for the UFS
install, allow the configuration of encryption of partitions via
checkboxes in the partition creation stage.
Sascha Wildner [Fri, 5 Nov 2010 08:49:39 +0000 (09:49 +0100)]
libexec: Move the definition of WARNS to libexec/Makefile.inc.
This generally sets WARNS to 6 in libexec/ unless specified otherwise
in the individual Makefiles. Just like we do it in bin/, games/, sbin/,
usr.bin/ and usr.sbin/ already.
Also fix some warnings that crept up and clean up some Makefiles.
Sascha Wildner [Fri, 5 Nov 2010 01:05:31 +0000 (02:05 +0100)]
<sys/param.h>: Bump __DragonFly_version.
This is just so we have something to patch against in case the
alphasort(3)/scandir(3) prototype changes require patches in
pkgsrc.
Sascha Wildner [Fri, 5 Nov 2010 00:28:22 +0000 (01:28 +0100)]
alphasort(3)/scandir(3): Sync prototypes with POSIX.1-2008.
These functions have been added to the latest issue (7) of the
OpenGroup specifications. Since our default still is POSIX.1-2001,
make them visible if either _POSIX_C_SOURCE >= 200809 is defined
or if _POSIX_SOURCE is not defined (which was what we had
previously). The latter condition is left in for backwards
compatibility and can be removed once we switch to 200809.
Also fix some consumers of scandir(3) which we have in base.
This fixes the build of devel/libcompizconfig.
I've checked this change with 22 out of 114 packages that use
scandir(), and aside from some warnings, there were no issues.
Reported-by: alexh
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1896>
Based-on: FreeBSD
Sascha Wildner [Wed, 3 Nov 2010 20:31:52 +0000 (21:31 +0100)]
mkinitrd(8): Add two options for overriding the tmpdir and the bootdir.
This can be useful if you're installing to a mounted partition (e.g., from
the installer).
While here, clean up a bit and add a license.
Sascha Wildner [Wed, 3 Nov 2010 20:30:03 +0000 (21:30 +0100)]
encrypted_root.sh: Fix a typo.
Joe Talbott [Wed, 3 Nov 2010 18:29:47 +0000 (14:29 -0400)]
network - Add initializer for ifnet.if_groups.
Prevents a NULL pointer dereference when pfsync is compiled into the
kernel.
Reported-By: mat on Efnet#dragonflybsd
Tested-By: mat on Efnet#dragonflybsd
Sascha Wildner [Wed, 3 Nov 2010 06:17:45 +0000 (07:17 +0100)]
Sort SEE ALSO sections in various manual pages.
Sascha Wildner [Tue, 2 Nov 2010 21:22:34 +0000 (22:22 +0100)]
kernel: Remove a number of unnecessary use_*.h inclusions.
Alex Hornung [Sun, 31 Oct 2010 16:00:19 +0000 (16:00 +0000)]
linuxulator - remove leftover debug kprintf
Alex Hornung [Sun, 31 Oct 2010 15:59:30 +0000 (15:59 +0000)]
linuxulator - sync & fix futex
* Sync some parts (timeout) with FreeBSD-current (Obtained-from:
FreeBSD)
* Bring in a commented-out lwkt_yield that should be necessary for
proper operation.
Matthew Dillon [Tue, 2 Nov 2010 20:58:15 +0000 (13:58 -0700)]
libstand - Fix CD9660 name matching code
* The code inherited from FBsd did not properly deal with matching
path elements after a '.'. For example "kernel.FUBAR_XYZ" would match
"kernel.FUBAR" on the CD.
* Fixed.
Matthew Dillon [Tue, 2 Nov 2010 20:36:46 +0000 (13:36 -0700)]
kernel - Reenable acpi sleep states
* Reenable acpi sleep state handling by default, by setting
machdep.cpu_idle_hlt to 2 by default.
Matthew Dillon [Tue, 2 Nov 2010 19:55:17 +0000 (12:55 -0700)]
kernel - Attempt to fix lost rpc issue with NFS timeout/retry
* An edge case in the timeout/retry code failed to pick up on
async RPCs which are replied to while the timeout code has the
rpc locked for retry.
Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
Matthew Dillon [Tue, 2 Nov 2010 17:12:14 +0000 (10:12 -0700)]
network - Fix missing tailq initializer for if_creategroup() API
* The ifg_head list was missing its initializer, causing calls to
if_creategroup() (e.g. by pf/pfsync) to panic the box.
Matthew Dillon [Tue, 2 Nov 2010 05:08:35 +0000 (22:08 -0700)]
network - Fix netstat output missing entries
* netstat was missing entries due to the kernel pcb listing sysctl
code doing a bogus generation count test which did not take into
account pcb's which move between cpus due to e.g. a bind() operation.
Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
Alex Hornung [Mon, 1 Nov 2010 20:38:14 +0000 (20:38 +0000)]
devfs - fix some issues with rules
* devfs_rule_alloc was still assuming that the rule_type and rule_cmd are not
bit fields, but they now are.
* return error in a number of places when a null pointer or nil-length string
is passed in.
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1885
Reported-by: 'fanch'
Venkatesh Srinivas [Mon, 1 Nov 2010 16:59:16 +0000 (09:59 -0700)]
Merge branch 'master' of /repository/git/dragonfly
Venkatesh Srinivas [Mon, 1 Nov 2010 16:57:21 +0000 (09:57 -0700)]
procfs: Decode mount point path in /proc/<pid>/map.
This will make /proc/<pid>/map output more readable on HAMMER mounts.
Matthew Dillon [Mon, 1 Nov 2010 16:54:54 +0000 (09:54 -0700)]
docs - Update swapcache(8) manual page
* Add a section on the use of swapcache with a normal hard drive.
Sascha Wildner [Mon, 1 Nov 2010 16:32:13 +0000 (17:32 +0100)]
Sync zoneinfo database with tzdata2010o from elsie.nci.nih.gov
australasia: 8.19 -> 8.20
* Fiji ends DST in 2011 on March 6 and not on March 27.
Matthew Dillon [Mon, 1 Nov 2010 16:29:31 +0000 (09:29 -0700)]
kernel - Fix access chceck in tmpfs that prevented chroot's into it
* Fix broken code which caused access() calls into tmpfs to assume
write permission was being requested when it was not.
Submitted-by: Rumko <rumcic@gmail.com>
Matthew Dillon [Mon, 1 Nov 2010 02:43:14 +0000 (19:43 -0700)]
kernel - Add support for the CPU_AMD64X2_INTR_SPAM option to x86_64
* Copies the ACPU_AMD64X2_INTR_SPAM option from i386 so it works with
x86_64 too.
This options is available but probably not needed as BIOSes tend to
configure the interrupt routing for multi-cpu cores better than they
did when they first came out.
Matthew Dillon [Mon, 1 Nov 2010 02:38:46 +0000 (19:38 -0700)]
kernel - Do not back out critical section for exchange_scr() call
* The critical section may be protecting a spinlock and cannot be safely
backed out when calling exchange_scr().
* Fixes a panic.
Reported-by: rob
Matthew Dillon [Mon, 1 Nov 2010 02:36:11 +0000 (19:36 -0700)]
kernel - Implement CHECKTIMEOUT() abstraction
* Implement a CHECKTIMEOUT() abstraction which allows us to remove retry
counts from low level device driver loops and replace them with a
timeout polling routine.
* Use in the keyboard code so we no longer make assumptions on how long
it takes to inb/outb the keyboard controller. Some BIOSes do not have
a keyboard controller at all and emulate the ports via SMI, which is
much much slower than accessing a real port.
Matthew Dillon [Mon, 1 Nov 2010 02:34:27 +0000 (19:34 -0700)]
kernel - Add kprintf0() (#ifdef'd out)
* Add some helper code for low level early boot debugging which defaults
to being #ifdef'd out.
Matthew Dillon [Mon, 1 Nov 2010 02:32:59 +0000 (19:32 -0700)]
kernel - Minor rerrangement to help w/ low level debugging
* Rearrange one of the conditionals in kvcprintf() so the routine can be
called in very early boot before globaldata is set up.
Matthew Dillon [Sun, 31 Oct 2010 15:52:00 +0000 (08:52 -0700)]
kernel - Fix serious issue w/ smp_invltlb(), plus other issues (3)
* splz() and doreti on both i386 and x86_64 were leaving interrupts
disabled through calls to e.g. sched_ithd() and IPI function callbacks.
As before this can lead to a deadlock if these functions call
smp_invltlb() or some other cpu calls smp_invltlb() while these
functions are spinning on a full IPIQ.
* sti in appropriate places to fix the problem.
Sascha Wildner [Sun, 31 Oct 2010 10:38:23 +0000 (11:38 +0100)]
psm(4): Ansify a function definition.
Sascha Wildner [Sun, 31 Oct 2010 10:16:26 +0000 (11:16 +0100)]
kernel: Remove most definitions of CDEV_MAJOR.
These are no longer needed since we have devfs.
A few are left in because they are added to the order in SYSINIT()s.
This needs further investigation.
Thomas Nikolajsen [Sat, 30 Oct 2010 07:09:52 +0000 (09:09 +0200)]
loader(8): adjustment & man update
* add/enhance info on if*/else*/endif
* add info on default_kernel variable
* include more variables in kenv_vars, including autoboot_delay,
to make setting them in loader.conf work
* remove a few unused variables
Matthew Dillon [Sat, 30 Oct 2010 05:46:29 +0000 (22:46 -0700)]
kernel - Fix longstanding VM long-duration stall issues (2)
* Refactor the pageout daemon's hysteresis, in particular the
free page queue had no real hysteressis and could cause excessive
pagedaemon wakeups.
Use a calculation that maintains a free page queue about half the
size of the minimum cache queue, giving us pretty good pipelining
when a system is under constant memory pressure.
* Add a sysctl for monitoring ppwakeups (wakeups of processes waiting
for memory).
Matthew Dillon [Sat, 30 Oct 2010 03:58:00 +0000 (20:58 -0700)]
kernel - Fix longstanding VM long-duration stall issues
* The pageout daemon was using the wrong wakeup metrics and essentially
would not start cleaning out pages until after processes began to
enter vmwait/vmrate or otherwise begin to stall due to low free memory.
* Fix the metric and also double-check every 5 seconds when the pagedaemon
statistics wakeup occurs.
* vm.v_free_min + vm.v_cache_min may now be used to tune when the
pagedaemon is woken up.
Matthew Dillon [Fri, 29 Oct 2010 23:55:20 +0000 (16:55 -0700)]
kernel - Get rid of kprintf0()
* This was old x86-64 debugging stuff that is no longer needed.
* Also remove some i386 leakage of the function.
Reported-by: Antonio Huete Jimenez <tuxillo@crater.dragonflybsd.org>
Matthew Dillon [Fri, 29 Oct 2010 19:00:35 +0000 (12:00 -0700)]
kernel - Make the x86-64 double-fault exception operational
* Finish implementing the double-fault exception. Only cpu0 implemented
the proper interrupt stack configuration before. Now all cpus implement
the proper interrupt stack.
* For x86-64 use the idle thread stack for the double-fault exception
stack for now (probably not the best idea but better than nothing).
* For both i386 and x86-64, when a double fault occurs, report whether
it is a generic double fault or whether it is due to a kernel stack
guard.