Matthew Dillon [Thu, 23 Sep 2010 22:12:20 +0000 (15:12 -0700)]
kernel - Fix compile error w/last commit (unused var)
* Remove unused variable
Reported-by: Rumko
Matthew Dillon [Thu, 23 Sep 2010 19:53:47 +0000 (12:53 -0700)]
kernel - Add kqueue and fix chflags handling for tmpfs
* Implement kqueue ops for tmpfs so things like tail -f work properly.
* Redo all the chflags handling and checks to use the helper functions,
also getting ridding of the horribly broken FREAD/FWRITE tests on
node->tn_flags (which is the chflags flags, not the open flags).
This fixes chflags handling for tmpfs. Previously doing something
like 'make installkernel ... DESTDIR=<sometmpfs_target>' would fail
on re-install due to chflags not working properly.
* Fix a lost node unlock in tmpfs_chflags()
Reported-by: Nuno Antunes <nuno.antunes@gmail.com>
Matthew Dillon [Thu, 23 Sep 2010 17:14:33 +0000 (10:14 -0700)]
vkernel - Add physmem global
* The PF module assumes the 'physmem' global exists. For the moment make
sure it exists (add it to the vkernel targets).
Matthew Dillon [Thu, 23 Sep 2010 17:11:23 +0000 (10:11 -0700)]
network - Fix bug in redispatch after PF translation
* ip_input() checks M_HASH after PF/firewall processing and recalculates
the protocol port if necessary.
ip_input() was improperly restoring ip_len when doing the re-check,
causing TCP packets destined for the local host to be dropped. This
caused NAT translations with local terminations to fail.
Michael Neumann [Sun, 3 Oct 2010 14:27:41 +0000 (16:27 +0200)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly
Michael Neumann [Sun, 3 Oct 2010 11:47:28 +0000 (13:47 +0200)]
lapic pointer was not correctly initialized
MADT enumeration works now on x86_64, tested on HP Compaq 6710b.
Michael Neumann [Sun, 3 Oct 2010 11:45:30 +0000 (13:45 +0200)]
MADT MP probe: Rework cpuid mapping, and cpuid to apicid mapping
Apply commit
223bf214b579c486a04c63795cdf9808b2e87b14 for x86_64.
Michael Neumann [Sun, 3 Oct 2010 10:56:17 +0000 (12:56 +0200)]
Fallback to ACPI MADT CPU enumeration, if BIOS does not provide MP table.
APIC_IO does not work with ACPI MADT CPU enumeration yet.
Apply commit
a26bbcd5fbded1b5c7fe0c79a0bea66716a15e33 for x86_64.
Michael Neumann [Sun, 3 Oct 2010 10:34:13 +0000 (12:34 +0200)]
Add mp_set_cpuids(), which links CPU's logical id to its apic id
Apply commit
a9112655463eccf48a9ba79a31a3d0accb24dad8 for x86_64.
Michael Neumann [Sun, 3 Oct 2010 10:29:32 +0000 (12:29 +0200)]
Implement ACPI MADT parsing
This will be used to enumerate CPUs if BIOS does not provide MP table.
Apply commit
85fd9f87e82e63599bd0293dc0112f8e26f8c3d6 for x86_x64.
Michael Neumann [Sat, 2 Oct 2010 16:03:35 +0000 (18:03 +0200)]
MP table related static function renaming
Apply commit
3aba8f737c990853a6105e77cfb2bcae59b217f8 for x86_x64.
Michael Neumann [Sat, 2 Oct 2010 15:49:35 +0000 (17:49 +0200)]
Get rid of global variable 'boot_cpu_id'
Apply commit
bd8aa7e222aa89ca27a5fe2e660f02ff942abb48 for x86_64.
Michael Neumann [Sat, 2 Oct 2010 15:45:39 +0000 (17:45 +0200)]
Correct mptable_pass[12]() function comment
Apply commit
0ae734b516f9975fd3ebfddd3748a028456668b6 for x86_64.
Michael Neumann [Sat, 2 Oct 2010 15:42:10 +0000 (17:42 +0200)]
mp_probe() -> mptable_probe()
Apply commit
cb00b5c4169432285c3acafc0e568ffba6a63d6e for x86_64.
Michael Neumann [Sat, 2 Oct 2010 15:39:10 +0000 (17:39 +0200)]
Change mptable mapping mechanism during mptable parsing.
Apply commit
981bebd11ba5507ab5887bb66ef52935ab350bed for x86_64.
Michael Neumann [Sat, 2 Oct 2010 14:21:33 +0000 (16:21 +0200)]
mp_probe(): Return physical address of the MP float pointer struct
Apply commit
aeb48299996ead8f1c328436e93b1836326c2bf6 for x86_64.
Michael Neumann [Sat, 2 Oct 2010 14:14:46 +0000 (16:14 +0200)]
Remove unused variable.
Michael Neumann [Sat, 2 Oct 2010 14:13:50 +0000 (16:13 +0200)]
Reorder MP probing
Apply commit
0f85efa20adbc0f9062a269bc2a7653b7b646683 for x86_64.
Michael Neumann [Sat, 2 Oct 2010 14:02:47 +0000 (16:02 +0200)]
Defer mptable_pass1() from mp_probe() to mp_enable()
Apply commit
f9c3b04f0dd9dd75702357d2bc8de782280c41df for x86_64.
Michael Neumann [Sat, 2 Oct 2010 13:55:56 +0000 (15:55 +0200)]
Save EBDA address before mp_probe()
Apply commit
1876681aa52fc75e5ac4945d4e316b2bff8b2aed for x86_64.
Michael Neumann [Sat, 2 Oct 2010 13:49:45 +0000 (15:49 +0200)]
mptable_pass1: Don't set ncpus to 1; it has already been setup.
Apply commit
bcf5ecdc02ba0af44b1d9b635393a27234d67b27 for x86_64.
Michael Neumann [Sat, 2 Oct 2010 13:47:23 +0000 (15:47 +0200)]
Remove mp_capable; mp_enable() uses cpu_apic_address.
Apply commit
50bc991ed5b5f45c656530ebf5fc8b44f24258ed for x86_64.
Michael Neumann [Sat, 2 Oct 2010 13:40:59 +0000 (15:40 +0200)]
Defer LAPIC checking from pmap_bootstrap() to mp_enable()
Similar to commit
8b5fcfe2eabb8f50c8211d71788097cd4bfd98ba
Sascha Wildner [Thu, 23 Sep 2010 09:43:06 +0000 (11:43 +0200)]
installer: Utilize dumpon(8) and swapoff(8) to turn off dump and swap.
Previously, the installer would block further installation attempts
once a swap was mounted. This was very inconvenient, e.g. when trying
to do multiple installs in one session.
It also never issued a 'dumpon off' causing dumping to be enabled
until rebooting. This caused issues upon reboot when a removable disk
(eSATA, for example) was unplugged before the reboot.
Now that we have swapoff(8), fix all these issues by turning off
dumping and swapping once the installation is completed (after
unmounting). Also, do this in a number of other places (where we
previously warned) to make sure it all gets deactivated again should
the user have cancelled a previous installation.
Matthew Dillon [Thu, 23 Sep 2010 03:05:23 +0000 (20:05 -0700)]
kernel - Fix bug in recent AHCI driver adjustment
* The recent adjustment of the driver to help deal with breakage in the
newer AMD chipsets also failed to check for pending commands after
a normal completion. Fix the brainfart.
Matthew Dillon [Thu, 23 Sep 2010 02:14:24 +0000 (19:14 -0700)]
kernel - unlock the syscons_lock spinlock around ttwakeup()
* ttwakeup() can block, we have to unlock syscons_lock() before calling it.
Matthew Dillon [Thu, 23 Sep 2010 01:00:03 +0000 (18:00 -0700)]
kernel - Enable EVFILT_WRITE for /dev/null, /dev/zero, etc
* Make both read and write kqfilters valid instead of just the read filter.
This fixes issues with programs which select on stdout for writing,
e.g. 'ssh -n "blah" > /dev/null'.
Matthew Dillon [Wed, 22 Sep 2010 21:58:53 +0000 (14:58 -0700)]
build - Workaround LINT issues
* Use an intermediate uint32_t variable to store a uint8_t length to avoid
a silly gcc warning-turned-error about a comparison always being true.
Reported-by: swildner
Sascha Wildner [Wed, 22 Sep 2010 19:32:24 +0000 (21:32 +0200)]
installer: Move /usr/pkg commands where they belong.
Sascha Wildner [Wed, 22 Sep 2010 18:16:26 +0000 (20:16 +0200)]
gcc44: Fix mis-usage of ||.
Matthew Dillon [Wed, 22 Sep 2010 16:23:57 +0000 (09:23 -0700)]
kernel - Remove some debugging kprintfs
* gone: Warning: vfsync_bp skipping dirty buffer 0x********
* gone: Warning: delete stale syncache for tp=0x********, sc=*
Pointers *'d out to protect their identities!
Alex Hornung [Wed, 22 Sep 2010 10:55:48 +0000 (11:55 +0100)]
un-tokenize savers
* Un-tokenize all savers again. We can't simply tokenize around vidsw[]
that easily because the saver functions are called from the console
paths, too (cnputc, ...)
* Regarding vidsw we'll eventually have to find a different solution to
lock it up. The current approach can't work.
Reported-by: Sascha Wildner (swildner@)
Sascha Wildner [Tue, 21 Sep 2010 21:19:24 +0000 (23:19 +0200)]
installer: Remove some unused code.
Sascha Wildner [Wed, 22 Sep 2010 09:56:06 +0000 (11:56 +0200)]
Move test/debug/gdb.kernel to share/misc/gdbinit.
The main reason is that crashinfo(8) was previously searching for
this script in /usr/src because it wasn't installed in the system.
This led to two little problems. First, if you didn't have source
in /usr/src, the core.xy.txt file wouldn't have all the information.
Second, if you had source in /usr/src but it was outdated and didn't
have all the commands that crashinfo(8) required, you would get
unwanted errors in core.xy.txt.
Therefore, put the file in share/misc from where it will get
installed and where other initialization files such as indent.pro
also reside. The user can then copy it to ~/.gdbinit as he likes.
Matthew Dillon [Wed, 22 Sep 2010 07:09:31 +0000 (00:09 -0700)]
network - Fix PF mis-handling and other bugs
* Header file changes for last PF commit.
Matthew Dillon [Wed, 22 Sep 2010 07:01:08 +0000 (00:01 -0700)]
network - Fix PF mis-handling and other bugs
* The mbuf subsystem does NOT clear pkthdr.pf.* fields on mbuf allocation.
PF was assuming that pf.flags was being cleared. Instead move the
PF_TAG_GENERATED flag from pf.flags to fw_flags and call it PF_MBUF_TAGGED.
The fw_flags field is cleared by the mbuf subsystem.
Then clear pf.flags whenever we set PF_MBUF_TAGGED or determine that it
has not been set.
This fixes a serious bug where the PF filters start missing packets,
increasing from system boot. This is because more and more packets in
the objcache wind up with non-zero pf.flags which cause PF to pass
the packet unconditionally.
For example NAT packets would wind up in the normal protocol stack which
would of course would get confused and generate a RST.
* Move the 'cur' static pointer in pf_purge_expired_states() up a bit
so pf_free_state() can access it and rename it 'purge_cur'.
Adjust pf_free_state() to iterate purge_cur when it matches the state
being destroyed.
* Protect the pf_purge_thread() with pf_token, it was depending on the MP
lock before which definitely does not do the job.
* Flag the pfil hook as being MPSAFE.
Reported-by: "Jan Lentfer" <Jan.Lentfer@web.de>
Venkatesh Srinivas [Tue, 21 Sep 2010 04:59:48 +0000 (21:59 -0700)]
libc - nmalloc: Continue in a do/while(0) loop exits the loop, making the mtmagazine routines not use the previous magazine.
Also handle null return from _vmem_alloc in burst allocation path.
Found-by: dillon
Michael Neumann [Mon, 20 Sep 2010 22:56:57 +0000 (00:56 +0200)]
boot: Remove duplicate optcd kernel
Peter Avalos [Mon, 20 Sep 2010 22:02:47 +0000 (12:02 -1000)]
Merge branch 'master' of /home/www-data/gitweb/dragonfly
Sascha Wildner [Mon, 20 Sep 2010 21:56:57 +0000 (23:56 +0200)]
Remove an include file (leftover from the iic upgrade).
Peter Avalos [Mon, 20 Sep 2010 21:35:14 +0000 (11:35 -1000)]
Merge branch 'vendor/BZIP'
Peter Avalos [Mon, 20 Sep 2010 21:34:25 +0000 (11:34 -1000)]
Import bzip2-1.0.6 which fixes CVE-2010-0405.
Peter Avalos [Mon, 20 Sep 2010 21:25:15 +0000 (11:25 -1000)]
bzip2: Remove tests from Makefile.
The files were already removed 5 years ago, so the test target would
have never worked.
Peter Avalos [Mon, 20 Sep 2010 21:22:15 +0000 (11:22 -1000)]
Merge branch 'vendor/BZIP'
Peter Avalos [Mon, 20 Sep 2010 21:11:30 +0000 (11:11 -1000)]
Unversion the contrib/bzip2/ directory.
Peter Avalos [Mon, 20 Sep 2010 21:03:42 +0000 (11:03 -1000)]
bzip2: Remove regression tests.
These were removed on master years ago, but never removed from the
vendor branch.
Sascha Wildner [Mon, 20 Sep 2010 20:10:14 +0000 (22:10 +0200)]
altq(4): Oops, actually remove the #ident (forgot in last commit).
Sascha Wildner [Mon, 20 Sep 2010 20:01:57 +0000 (22:01 +0200)]
kernel: Fix some operator precedence bugs.
Sascha Wildner [Mon, 20 Sep 2010 20:00:21 +0000 (22:00 +0200)]
nfs(4): ERROROUT already assigns error.
Sascha Wildner [Mon, 20 Sep 2010 18:38:52 +0000 (20:38 +0200)]
kernel: Remove some #ident.
Matthew Dillon [Mon, 20 Sep 2010 19:54:43 +0000 (12:54 -0700)]
network - Increase MSIZE to 512
* The basic problem with 384 is that kmalloc() may hand back a buffer
which crosses a page boundary, which gums up the DMA engines for
numerous drivers. Many drivers can only handle one segment per
mbuf and even those that can handle more sometimes have fairly low
segment count limits.
Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
Joe Talbott [Fri, 17 Sep 2010 01:30:44 +0000 (21:30 -0400)]
wpi - Fix some race conditions in variable initializers.
Matthew Dillon [Mon, 20 Sep 2010 16:57:16 +0000 (09:57 -0700)]
kernel - Remove mistaken commit of SATA PM spec pdf
Matthew Dillon [Mon, 20 Sep 2010 15:55:55 +0000 (08:55 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Antonio Huete Jimenez [Sun, 19 Sep 2010 11:03:05 +0000 (13:03 +0200)]
truss - Add functions for x86_64 architecture.
Taken-from: FreeBSD
Antonio Huete Jimenez [Sun, 19 Sep 2010 00:44:12 +0000 (02:44 +0200)]
truss - Group some globals into a struct.
Taken-from: FreeBSD
Antonio Huete Jimenez [Tue, 14 Sep 2010 22:42:28 +0000 (00:42 +0200)]
truss - Adapt to the new ELF naming.
Antonio Huete Jimenez [Sun, 5 Sep 2010 18:45:53 +0000 (20:45 +0200)]
elf - Fill sv_name with the appropiate value for each arch.
Michael Neumann [Mon, 20 Sep 2010 13:27:03 +0000 (15:27 +0200)]
rc: Fix startup scripts when command_interpreter is used
Correct the behaviour when using command_interpreter in
rc.d scripts where the proctitle of ps does not include
the full interpreter path, but for example just "perl: ..."
instead of "/usr/pkg/bin/perl -flags ...".
With this patch, the /etc/rc.d/postgrey stop/status script
of pkgsrc package mail/postgrey works. Other packages seem
to not use command_interpreter at all.
Michael Neumann [Mon, 20 Sep 2010 13:19:30 +0000 (15:19 +0200)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Michael Neumann [Mon, 20 Sep 2010 13:11:43 +0000 (15:11 +0200)]
boot: Minor loader prompt fix
When escaping to the loader prompt and typing "load", the
loader was not able to find the "acpi" and other modules
enabled by default. Now it does.
Discussed-with: dillon
Sascha Wildner [Mon, 20 Sep 2010 11:39:57 +0000 (13:39 +0200)]
Revert "gcc41: Remove __DragonFly_cc_version from the spec (no longer needed)."
This reverts commit
d7d1ed63ea30a9779ecddd4fc91be4052849051f.
We do not want to break building older source (2.6 e.g.) with a current gcc41.
Sascha Wildner [Mon, 20 Sep 2010 11:31:30 +0000 (13:31 +0200)]
gcc41: Remove __DragonFly_cc_version from the spec (no longer needed).
Sascha Wildner [Mon, 20 Sep 2010 11:30:27 +0000 (13:30 +0200)]
firewire(4): Fix a gcc44 build error.
Use __DragonFly_version, just like FreeBSD uses __FreeBSD_version.
Reported-by: vsrinivas
Matthias Schmidt [Mon, 20 Sep 2010 08:59:36 +0000 (10:59 +0200)]
dma - Cast correctly to uintmax_t when using %PRIxMAX
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Mon, 20 Sep 2010 08:51:24 +0000 (10:51 +0200)]
dma - Randomize the retry timeouts a bit
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Mon, 20 Sep 2010 08:50:25 +0000 (10:50 +0200)]
dma - Fix a crash when the SMTP server does not support STARTTLS
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Mon, 20 Sep 2010 08:35:13 +0000 (10:35 +0200)]
dma - Honor LDFLAGS if specified in the environment
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Mon, 20 Sep 2010 08:34:12 +0000 (10:34 +0200)]
dma - Check the parsed recipient address for validity
Author: Peter Pentchev <roam@ringlet.net>
Matthew Dillon [Sun, 19 Sep 2010 19:58:19 +0000 (12:58 -0700)]
boot - Automatically cd into /boot/kernel when escaping to loader prompt
* Automatically place ourselves in the default kernel directory when
escaping to the loader prompt to make things more convenient for the
user.
Submitted-by: Michael Neumann <mneumann@ntecs.de>
Matthew Dillon [Sun, 19 Sep 2010 17:24:26 +0000 (10:24 -0700)]
kernel - Report more AHCI revs in the switch
* Add some more AHCI revs to the switch so it doesn't report
'Uknown revision'. This is purely cosmetic.
Reported-by: "Edward O'Callaghan" <eocallaghan@auroraux.org>
Matthew Dillon [Sun, 19 Sep 2010 17:11:51 +0000 (10:11 -0700)]
acpi - Fix for issue1846
* Bring in a fix for the "ec" panic on boot issue from acpica-unix-
20100806.
Submitted-by: "Edward O'Callaghan" <eocallaghan@auroraux.org>
Matthew Dillon [Sun, 19 Sep 2010 16:43:09 +0000 (09:43 -0700)]
kernel - Correct bug in malloc_type ks_memuse/ks_inuse management
* The new kfree() was improperly adjust ks_memuse/ks_inuse for the wrong
cpu, leading to MP races which could cause the memory statistics to go
negative and trigger a panic.
* When calculating loosememuse it is possible to race another cpu and
come up with an incorrect value. The race itself is ok, loosememuse
is not supposed to be 100% deterministic, but even so do not allow
the value to underflow or we will wind up asserting.
Matthew Dillon [Sun, 19 Sep 2010 15:56:06 +0000 (08:56 -0700)]
build - Minor build issues
* Bring test/debug/vnodeinfo.c up-to-date.
* Adjust test/vkernel/Makefile to properly copy the kernel from the new
boot location ($root/boot/kernel/kernel).
Matthew Dillon [Sun, 19 Sep 2010 15:54:37 +0000 (08:54 -0700)]
kernel - cleanup and some KTR work for x86_64
* Make the KTR option compile for x86_64 builds. It's very expensive still
and not recommended due to the way x86_64 handles va_args.
* On the userland side do not attempt vprintf the va_args yet in the
ktrdump code, right now it just crashes.
* Cleanup some kprintfs
Matthew Dillon [Sun, 19 Sep 2010 15:52:04 +0000 (08:52 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Sascha Wildner [Sun, 19 Sep 2010 15:47:50 +0000 (17:47 +0200)]
ips.4: Use the correct section number.
Sascha Wildner [Sun, 19 Sep 2010 15:47:32 +0000 (17:47 +0200)]
udevd.8: Fix .Dd
Sascha Wildner [Sun, 19 Sep 2010 15:47:06 +0000 (17:47 +0200)]
mutex.9: Fix typos in two function names.
Matthew Dillon [Sun, 19 Sep 2010 15:36:16 +0000 (08:36 -0700)]
kernel - Attempt to fix two out-of-order read MP races
* Example of issue during buildworld -j 8 loop tests, cc1 occassionally
fails after upwards of a trillion instructions worth of testing:
Sep 18 07:11:58 test29 kernel: seg-fault accessing address 0
rip=0x584ef7 pid=30229 p_comm=cc1
In this example gdb'ing cc1 and examining the code revealed an impossible
crash case where off(%ebx) was deterministically accessed a few
instructions before, then accessed again and somehow %ebx had become zero.
Unfortunately I could find no smoking gun, but my conjecture is that it
is a MP race which can occur when the thread migrates between cpus and/or
a mis-handled IPI.
* In the LWKT messaging code move the cpu_mfence() call in the sequence,
from rindex->read_args->MFENCE->call to rindex->MFENCE->read_args->call.
* In the LWKT thread acquisition code (for thread migration between cpus),
add a cpu_mfence() call after the td_flags check indicates success,
instead of inside the loop where we are waiting for the flags check to
indicate success.
* In both cases the issue seems to be out-of-order reads and/or speculative
reads. Even though MP writes are well ordered on Intel/AMD systems reads
are not. In the case of the IPIQ FIFO the data related to the arguments
can be ordered ahead of the read of the FIFO rindex and thus wind up being
stale relative to the other CPU writing the entry. Moving the mfence
ensures that the args stored in the FIFO are not accessed until after
the rindex is read.
For the thread aquisition code access to and manipulation of the thread
td_allq might be based on stale out-of-order reads prior to the
determination that the thread completed its move.
This can be a problem because several mechanisms in DragonFly are able
to operate without even having to use locked bus cycle. The IPIQ, thread
migration, and kern/sys_pipe.c being the best examples, so the natural
barrier provided by the locked bus-cycle instruction is not necessarily
present.
Sascha Wildner [Sun, 19 Sep 2010 11:24:11 +0000 (13:24 +0200)]
Fix UP kernel build.
Sascha Wildner [Sun, 19 Sep 2010 09:05:22 +0000 (11:05 +0200)]
installer: Allow for tmpfs (instead of mfs) partition creation.
The installer allowed (though only in UFS "expert mode") to add mfs-backed
partitions. Change all this to tmpfs as well.
Sascha Wildner [Sat, 18 Sep 2010 20:54:46 +0000 (22:54 +0200)]
installer: Remove unused code to run memtest and create a memtest86 floppy.
Sascha Wildner [Sat, 18 Sep 2010 17:05:42 +0000 (19:05 +0200)]
installer: Remove unused code to update /usr/src with cvsup.
Sascha Wildner [Sun, 19 Sep 2010 00:28:42 +0000 (02:28 +0200)]
Fix various bugs due to the mis-usage of && and ||.
Matthew Dillon [Sat, 18 Sep 2010 23:29:03 +0000 (16:29 -0700)]
network - Fix MP races in udp6_input and inet6 in general
* Numerous appends to the so_rcv sockbuf needed to be protected
by the so_rcv token.
Reported-by: Peter Avalos <pavalos@crater.dragonflybsd.org>
Sascha Wildner [Sat, 18 Sep 2010 22:11:13 +0000 (00:11 +0200)]
Switch our LiveCD/DVD to using tmpfs instead of mfs.
Sascha Wildner [Sat, 18 Sep 2010 22:08:54 +0000 (00:08 +0200)]
mount_tmpfs(8): Add a -C option modeled after mount_mfs(8)'s -C option.
It will copy the contents of the underlying mount point directory into
the tmpfs mount.
Matthew Dillon [Sat, 18 Sep 2010 21:57:02 +0000 (14:57 -0700)]
network - Remove debugging kprintfs
* Remove some console spam
Matthew Dillon [Sat, 18 Sep 2010 20:23:41 +0000 (13:23 -0700)]
kernel - Optimize kfree() to greatly reduce IPI traffic
* Instead of IPIing the chunk being freed to the originating cpu we
use atomic ops to directly link the chunk onto the target slab.
We then notify the target cpu via an IPI message only in the case where
we believe the slab has to be entered back onto the target cpu's
ZoneAry.
This reduces the IPI messaging load by a factor of 100x or more.
kfree() sends virtually no IPIs any more.
* Move malloc_type accounting to the cpu issuing the kmalloc or kfree
(kfree used to forward the accounting to the target cpu). The
accounting is done using the per-cpu malloc_type accounting array
so large deltas will likely accumulate, but they should all cancel
out properly in the summation.
* Use the kmemusage array and kup->ku_pagecnt to track whether a
SLAB is active or not, which allows the handler for the asynchronous IPI
to validate that the SLAB still exists before trying to access it.
This is necessary because once the cpu doing the kfree() successfully
links the chunk into z_RChunks, the target slab can get ripped out
from under it by the owning cpu.
* The special cpu-competing linked list is different from the linked list
normally used to find free chunks, so the localized code and the
MP code is segregated.
We pay special attention to list ordering to try to avoid unnecessary
cache mastership changes, though it should be noted that the c_Next
link field in the chunk creates an issue no matter what we do.
A 100% lockless algorithm is used. atomic_cmpset_ptr() is used
to manage the z_RChunks singly-linked list.
* Remove the page localization code for now. For the life of the
typically chunk of memory I don't think this provided much of
an advantage.
Prodded-by: Venkatesh Srinivas
Sascha Wildner [Sat, 18 Sep 2010 18:32:38 +0000 (20:32 +0200)]
kernel: Remove #include <sys/mutex.h> if <sys/mutex2.h> is included too.
Sascha Wildner [Sat, 18 Sep 2010 18:06:33 +0000 (20:06 +0200)]
newfs(8): Remove some leftover defines that are no longer used.
Sascha Wildner [Sat, 18 Sep 2010 10:05:25 +0000 (12:05 +0200)]
Fix some synopses in various manual pages.
Matthew Dillon [Sat, 18 Sep 2010 00:56:27 +0000 (17:56 -0700)]
network - Correct bug in last commit
* Fix a crit_enter() that had to be removed.
Reported-by: YONETANI Tomokazu <qhwt.dfly@les.ath.cx>
Matthew Dillon [Fri, 17 Sep 2010 23:38:37 +0000 (16:38 -0700)]
network - Remove crit_exit/crit_enter wrappers in pf.c
* Note I'm talking about exit/enter wrappers, not enter/exit wrappers.
I believe the enter/exit wrappers can be removed too but for now
we have to remove the exit/enter wrappers which assumed a critical
section would be held on entry.
This is no longer the case. Since so much of the network stack is
now threaded callers into PF are not necessarily holding a critical
section to exit out of.
Reported-by: lentferj, Rumko
Matthew Dillon [Fri, 17 Sep 2010 22:29:22 +0000 (15:29 -0700)]
network - Zero out m_len / m_pkthdr.len in m_get*() and friends
* Newly allocated mbufs now set m_len and (if a packet header)
m_pkthdr.len to 0 instead of leaving them uninitialized,
allowing us to assert that the mbuf does not have an overrun
later when it is freed.
Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
YONETANI Tomokazu [Fri, 17 Sep 2010 12:03:04 +0000 (21:03 +0900)]
ips - missing part from
667d31bb
Without this change, the added strings are never used.
Noticed-by: Sascha Wildner (via DragonFly BSD Digest)
Antonio Huete Jimenez [Fri, 17 Sep 2010 10:23:37 +0000 (12:23 +0200)]
udevd.8 - Fix SYNOPSIS
Matthias Schmidt [Fri, 17 Sep 2010 10:04:36 +0000 (12:04 +0200)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly
Matthias Schmidt [Fri, 17 Sep 2010 09:49:53 +0000 (11:49 +0200)]
dma - Fix the parsing of recipient addresses
Author: Peter Pentchev <roam@ringlet.net>