Franco Fichtner [Wed, 24 Jul 2013 15:54:54 +0000 (17:54 +0200)]
man4: use .Mt for emails (1/2)
Franco Fichtner [Tue, 23 Jul 2013 20:42:42 +0000 (22:42 +0200)]
resolve mandoc(1) warnings in bin/
François Tigeot [Wed, 24 Jul 2013 08:35:57 +0000 (10:35 +0200)]
kernel: Document new taskqueue functions
François Tigeot [Wed, 24 Jul 2013 07:08:14 +0000 (09:08 +0200)]
drm2: add a drm_find_file_by_proc() implementation
* Taken from the existing drm code in sys/dev/drm/
François Tigeot [Wed, 24 Jul 2013 07:06:29 +0000 (09:06 +0200)]
kernel: Update taskqueue subsystem
* Add taskqueue timeout functions
* Add _timeout_task_init()
* Add taskqueue_cancel()
Obtained-from: FreeBSD
Matthew Dillon [Wed, 24 Jul 2013 04:17:53 +0000 (21:17 -0700)]
killall - Add all-but-self tty kill (-T)
* Add a new feature to killall, the -T option, which will kill all
processes on the caller's tty except processes which parent the
killall.
This can be used to terminate processes on the current tty, for example
from a ^C'd build that failed to kill all the sub processes, without
also taking out the shell/xterm/whatever and causing the window to close.
Sascha Wildner [Tue, 23 Jul 2013 19:59:09 +0000 (21:59 +0200)]
libmandoc: Add HAVE_STRPTIME and HAVE_MMAP to the Makefile.
The former fixes an issue that would cause mandoc to warn on our .Dd
lines when using 'mandoc -Tlint ...'.
Submitted-by: Franco Fichtner <franco@lastsummer.de> (some modifications
by me)
François Tigeot [Tue, 23 Jul 2013 17:23:37 +0000 (19:23 +0200)]
drm2: Adapt kernel_map usage
François Tigeot [Tue, 23 Jul 2013 17:23:05 +0000 (19:23 +0200)]
drm2: Handle slightly different little things (2/2)
Some functions/macros have little arguments or other small variations:
* BUS_ALLOC_RESOURCE()
* bus_dma_tag_create()
* vm_pager_allocate()
* vm_map_find()
* vm_pager_get_pages() / vm_pager_get_page()
* vm_pager_has_page
* pmap_zero_page()
François Tigeot [Tue, 23 Jul 2013 17:21:53 +0000 (19:21 +0200)]
drm2: Handle slightly different little things (1/2)
* DragonFly and FreeBSD memory barrier functions are named differently
* Replace TAILQ_FOREACH_SAFE by TAILQ_FOREACH_MUTABLE
* CTLFLAG_RDTUN doesn't exist, use CTLFLAG_RD instead
* kdb_active -> db_active
* Implement and use a replacement for VM_OBJECT_LOCK_ASSERT(MA_OWNED)
* VPO_BUSY => PG_BUSY
* The way to get rlimit values is a little bit different
* Replace MPASS with KASSERT
* Use callout_init_mp() where FreeBSD uses CALLOUT_MPSAFE
(suggested-by swildner)
Parts-by: Johannes Hofmann
François Tigeot [Tue, 23 Jul 2013 17:21:09 +0000 (19:21 +0200)]
drm2: Remove unused FreeBSD functions and macros
* sched_pin() / sched_unpin()
* VM_ALLOC_NOOBJ and VM_ALLOC_WIRED
* callout_drain()
* vm_page_lock() / vm_page_unlock()
* kern_yield()
* CTLFLAG_MPSAFE
François Tigeot [Tue, 23 Jul 2013 17:20:27 +0000 (19:20 +0200)]
drm2: Fix include files
François Tigeot [Tue, 23 Jul 2013 17:18:48 +0000 (19:18 +0200)]
drm2: Handle locking
* Locally define PROC_LOCK and PROC_UNLOCK to nothing
* irq_lock must be a lwkt serializer
* Remove Giant usage
Was it even needed on FreeBSD ?
François Tigeot [Tue, 23 Jul 2013 17:16:03 +0000 (19:16 +0200)]
drm2: Some functions are named differently
* free => kfree
* malloc, realloc, reallocf => kmalloc, krealloc, kreallocf
* printf and snprintf => kprintf and ksnprintf
* getenv => kgetenv
* qsort_r => kqsort_r
* pci_find_cap => pci_find_extcap
* critical_enter => crit_enter
* hashinit_flags => hashinit
François Tigeot [Tue, 23 Jul 2013 17:15:09 +0000 (19:15 +0200)]
drm2: Remove CTR* functions
François Tigeot [Sun, 21 Jul 2013 08:45:12 +0000 (10:45 +0200)]
drm2: Comment out FreeBSD ids
Also remove FreeBSD-specific sys/cdefs.h include lines
Sascha Wildner [Tue, 23 Jul 2013 16:54:20 +0000 (18:54 +0200)]
Remove some no longer used externs in various system headers.
Franco Fichtner [Tue, 23 Jul 2013 12:18:15 +0000 (14:18 +0200)]
dhclient: partial sync from OpenBSD man pages
Franco Fichtner [Mon, 22 Jul 2013 22:12:06 +0000 (00:12 +0200)]
tzfile.5: use .In for including tzfile.h
The file resides in /usr/include anyway.
Franco Fichtner [Mon, 22 Jul 2013 21:53:25 +0000 (23:53 +0200)]
forward.5: use .Ar instead of .Aq for email address
The email is an example and should not be a spurious candidate for
.Mt conversion. The example below uses .Ar for a local address
already.
Franco Fichtner [Mon, 22 Jul 2013 21:49:10 +0000 (23:49 +0200)]
share/examples: use .Mt for emails in man pages
While there, get rid of redundant quotes in .Nd lines.
Sascha Wildner [Tue, 23 Jul 2013 11:04:15 +0000 (13:04 +0200)]
m4(1): Remove two unused manual pages.
Franco Fichtner [Mon, 22 Jul 2013 22:22:09 +0000 (00:22 +0200)]
zopen.3: zap file since zopen() is only used via compress(1)
François Tigeot [Mon, 22 Jul 2013 20:23:54 +0000 (22:23 +0200)]
drm: Import drm2+i915 work from FreeBSD
As of r240917 (2012-09-25): "Reduce delays in several wait loops"
François Tigeot [Mon, 22 Jul 2013 20:11:20 +0000 (22:11 +0200)]
drm: move gpu driver headers to subdirectories
Sascha Wildner [Mon, 22 Jul 2013 20:06:42 +0000 (22:06 +0200)]
dma.8: Adjust corecode's email address.
Franco Fichtner [Mon, 22 Jul 2013 19:09:05 +0000 (21:09 +0200)]
add .Mt to man pages in usr.sbin/
Sascha Wildner [Mon, 22 Jul 2013 19:43:07 +0000 (21:43 +0200)]
kernel/isa: Remove some no longer used externs declarations.
Franco Fichtner [Mon, 22 Jul 2013 17:27:28 +0000 (19:27 +0200)]
add .Mt to man pages in lib/
Franco Fichtner [Mon, 22 Jul 2013 14:15:16 +0000 (16:15 +0200)]
add .Mt to man pages in libexec/
Franco Fichtner [Mon, 22 Jul 2013 14:02:50 +0000 (16:02 +0200)]
add .Mt to man pages in sbin/
François Tigeot [Mon, 22 Jul 2013 16:02:17 +0000 (18:02 +0200)]
Document copyin_nofault and copyout_nofault(9)
François Tigeot [Mon, 22 Jul 2013 15:47:50 +0000 (17:47 +0200)]
Document DRIVER_MODULE_ORDERED(9)
François Tigeot [Mon, 22 Jul 2013 11:46:05 +0000 (13:46 +0200)]
kernel: Remove global PROC_LOCK and PROC_UNLOCK definitions
Locking in this area varies so much between FreeBSD and DragonFly
that it's best to determine what to do with these macros on a
case-by-case basis
Sascha Wildner [Mon, 22 Jul 2013 10:06:33 +0000 (12:06 +0200)]
Remove <sys/bitstring.h> via 'make upgrade'.
Sepherosa Ziehau [Mon, 22 Jul 2013 06:21:08 +0000 (14:21 +0800)]
tools: Add bench tools for accept(2) and connect(2)
The main reasons behind making these tools instead of using netperf TCP_CC
test are:
- Netperf TCP_CC creates new server for each testing client
- Netperf TCP_CC creates new listen socket on different TCP port for each
testing client
- Netperf TCP_CC created listen socket is in blocking mode
- Netperf TCP_CC closes accepted sockets immediately
All of the above listed items make netperf TCP_CC do not reflect real life
TCP server usage.
Tools in accept_connect:
- "connect_client"
Fork certain amount of processes to perform blocking connect(2)/close(2)
for the certain amount of time.
- "accpet_server"
Fork certain amount of processes to perform blocking accept(2) on the same
addr/port bound socket. close(2) on the accepted socket is called
immediately. If -r is specified, each processes will create their own
listen socket on the same port/addr w/ SO_REUSEPORT sockopt.
- "kq_accept_server"
Fork certain amount of processes to perform non-blocking accept(2) on the
same addr/port bound socket w/ help of kqueue(2). close(2) on the accepted
socket is called after the other side closed the connection. If -r is
specified, each processes will create their own listen socket on the same
port/addr w/ SO_REUSEPORT sockopt.
kq_accept_server closely mimics the real life TCP server.
François Tigeot [Mon, 22 Jul 2013 05:25:49 +0000 (07:25 +0200)]
Remove duplicated bitstring.h file
Noticed-by: vsrinivas
Sepherosa Ziehau [Mon, 22 Jul 2013 05:15:50 +0000 (13:15 +0800)]
socket: Use modulo-N for SO_REUSEPORT socket locating
This greatly reduces TCP listen socket completion queue pool token
contention thus saves more cpu time.
When the testing box (i7-2600, broadcom 5719) is doing 335Kconns/s,
TCP listen socket completion queue token contention is reduced from
20K/s to 500/s and the idle time on each hyperthread is increased by
~5%.
Sepherosa Ziehau [Mon, 22 Jul 2013 03:05:12 +0000 (11:05 +0800)]
socket: Avoid possible race between netmsg_so_notify() and sowakeup() (2)
If predict ever blocks, 'tok' will be released, so SSB_MEVENT set
beforehand could have been cleared when we reach here. In case
that happens, we set SSB_MEVENT again, after the notify has been
queued.
Sepherosa Ziehau [Mon, 22 Jul 2013 02:17:59 +0000 (10:17 +0800)]
oce: Don't clear M_PKTHDR when create mbuf chain
François Tigeot [Sun, 21 Jul 2013 19:22:41 +0000 (21:22 +0200)]
kernel: Add PROC_LOCK and PROC_UNLOCK
Inspired-from: FreeBSD
François Tigeot [Sun, 7 Jul 2013 17:24:55 +0000 (19:24 +0200)]
kernel: Implement copyin_nofault and copyout_nofault
Inspired-from: FreeBSD
François Tigeot [Sun, 21 Jul 2013 19:41:28 +0000 (21:41 +0200)]
kernel: add vm_page_unhold_pages()
Johannes Hofmann [Sun, 21 Jul 2013 19:40:31 +0000 (21:40 +0200)]
kernel: Add DRIVER_MODULE_ORDERED macro
François Tigeot [Sat, 20 Jul 2013 16:59:55 +0000 (18:59 +0200)]
kernel: Import bitcount16() from FreeBSD
François Tigeot [Sun, 21 Jul 2013 19:37:03 +0000 (21:37 +0200)]
kernel: Import unrhdr function family from FreeBSD
Sascha Wildner [Sun, 21 Jul 2013 19:38:40 +0000 (21:38 +0200)]
Remove some more unused externs.
Franco Fichtner [Thu, 18 Jul 2013 20:25:28 +0000 (22:25 +0200)]
add .Mt to man pages in bin/ games/ sys/ tools/
Franco Fichtner [Thu, 18 Jul 2013 20:04:49 +0000 (22:04 +0200)]
add .Mt to man pages in usr.bin/
Franco Fichtner [Thu, 18 Jul 2013 18:37:34 +0000 (20:37 +0200)]
start adding .Mt to email addresses in man pages
This covers share/man/man[1579]. It also consolidates multiple lines
into one, removes spurious double quotes in names or emails,
and changes punctuation where appropriate. The target style is:
.An Name Aq Mt name@somewhere.tdl
Sascha Wildner [Sun, 21 Jul 2013 18:29:53 +0000 (20:29 +0200)]
kernel: Remove a no longer used extern declaration.
Sascha Wildner [Sun, 21 Jul 2013 18:27:52 +0000 (20:27 +0200)]
kernel: Remove some HW_WDOG remains.
François Tigeot [Sun, 21 Jul 2013 16:39:02 +0000 (18:39 +0200)]
kernel: Import vm_mmap_to_errno() from FreeBSD
François Tigeot [Sat, 20 Jul 2013 21:06:12 +0000 (23:06 +0200)]
kernel: import pci_find_class() from FreeBSD
François Tigeot [Sat, 20 Jul 2013 07:22:56 +0000 (09:22 +0200)]
kernel: Add kqsort_r()
Obtained-from: FreeBSD
Matthew Dillon [Fri, 19 Jul 2013 22:05:53 +0000 (15:05 -0700)]
Makefile.usr - Move fetch locations
* Move the bootstrap fetch from leaf:~marino to mirror-master
* Move the dports git fetch from ~marino's github to mirror-master
(which currently clones it)
Matthew Dillon [Fri, 19 Jul 2013 22:05:17 +0000 (15:05 -0700)]
uname - Add -P and -PP for dports support
* Add options to generate dports-compatible ABI strings to stdout.
Used by Makefile.usr.
Sascha Wildner [Fri, 19 Jul 2013 18:43:48 +0000 (20:43 +0200)]
kernel: Remove some more unused kmalloc types.
M_MPSSAS
M_MPTUSER
M_NETGRAPH_ITEM
M_NWFSMNT
M_PDU
M_RDRAND
M_SMBDATA
M_SMBFSMNT
Sascha Wildner [Fri, 19 Jul 2013 15:54:27 +0000 (17:54 +0200)]
kernel: Remove some no longer used options.
Sepherosa Ziehau [Fri, 19 Jul 2013 08:40:07 +0000 (16:40 +0800)]
socket: Avoid possible race between netmsg_so_notify() and sowakeup()
The race is concerning SSB_MEVENT setup and testing. Originally:
CPU X CPU Y
get token :
if (predict cond false) { :
: set predict cond true
: if (SSB_MEVENT) {
: get token
: wake up notifies
: rel token
: }
queue notify :
set SSB_MEVENT :
} :
rel token
This commit always set SSB_MEVENT before predict testing, after getting
the socket token, so the race could be avoided.
Reviewed-by: dillon@
Johannes Hofmann [Thu, 18 Jul 2013 21:29:11 +0000 (23:29 +0200)]
kernel/pat: Improve kmem_alloc_attr()
With-input-from: Matthew Dillon
François Tigeot [Thu, 18 Jul 2013 21:28:47 +0000 (23:28 +0200)]
pat: Add pmap_invalidate_cache_pages()
Obtained-from: FreeBSD
François Tigeot [Thu, 18 Jul 2013 21:28:12 +0000 (23:28 +0200)]
pmap: Add pmap_mapbios()
Obtained-from: FreeBSD
François Tigeot [Thu, 18 Jul 2013 21:27:03 +0000 (23:27 +0200)]
pat: Make the API more compatible with FreeBSD
François Tigeot [Thu, 18 Jul 2013 21:26:40 +0000 (23:26 +0200)]
pat: Add BUS_DMA_NOCACHE, VM_MEMATTR definitions
Inspired-from: FreeBSD
François Tigeot [Thu, 18 Jul 2013 21:25:01 +0000 (23:25 +0200)]
kernel: Optimize pmap_invalidate_range()
* No need to use wbinvd here, we only have to invalidate TLB entries
and not regular CPU caches
* There is no need to drop all TLB caches either, only invalidate a few
page mappings on all cpus
* Use pmap->pm_active to only signal the CPUs where the pmap is in use
François Tigeot [Thu, 18 Jul 2013 21:23:36 +0000 (23:23 +0200)]
kernel: Use pmap_invalidate functions
* Matt's commit brutally used invltlb and wbinvd instructions
everywhere
* These are now contained in pmap_invalidate_range(), which will be
optimized later
* As a rule of thumb, functions where cache and tlb handling cause
avoidable performance degradation are tagged with "XXX not optimal"
François Tigeot [Thu, 18 Jul 2013 21:22:32 +0000 (23:22 +0200)]
kernel: Improve pmap_invalidate_cache_range()
* There is no need to do anything on CPUs having the self-snoop feature
* Add some consistency checks
Inspired-from: FreeBSD
François Tigeot [Thu, 18 Jul 2013 21:21:01 +0000 (23:21 +0200)]
pmap: Add change_attr() stubs for non-amd64 architectures
Matthew Dillon [Thu, 18 Jul 2013 21:04:21 +0000 (23:04 +0200)]
PAT work, mapdev_attr, kmem_alloc_attr
Partially based on work by
Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
Johannes Hofmann [Thu, 18 Jul 2013 20:37:22 +0000 (22:37 +0200)]
pmap: add dummy implementation for pmap_invalidate*
Simply call cpu_wbinvd_on_all_cpus() which is not optimal
but seems to make drm2 work.
Sascha Wildner [Thu, 18 Jul 2013 17:14:04 +0000 (19:14 +0200)]
kernel: Remove 3 unused kmalloc types: M_80211_DFS, M_ACPICMBAT, M_ATAPCI.
Sascha Wildner [Thu, 18 Jul 2013 16:56:25 +0000 (18:56 +0200)]
kernel/raid: CAM_NEW_TRAN_CODE is default for over 5 years.
Sepherosa Ziehau [Thu, 18 Jul 2013 14:58:36 +0000 (22:58 +0800)]
i386: Make the system boot again
The CPU_468 etc macros also serve as the indices into i386_cpus[]
make sure that they are interleaved only by 1.
Sepherosa Ziehau [Thu, 18 Jul 2013 14:57:05 +0000 (22:57 +0800)]
i386: Unbreak building if the kern config only contains I686_CPU
Sepherosa Ziehau [Thu, 18 Jul 2013 13:24:16 +0000 (21:24 +0800)]
mbuf: revert part of
b4e5a1079d852748f03f32aae87ecdda27a538d2
Restore wlan_seqno, since ether_vlantag has been used by WME. Fill the
implicit padding on x86_64 and add comment for their possible use.
Reported-by: Johannes Hofmann
François Tigeot [Wed, 17 Jul 2013 21:18:26 +0000 (23:18 +0200)]
kernel: Remove Cyrix CPUs specific handling
* Remove kernel options, constants, detection code and special
initialization routines for Cyrix CPUs
* Part of this code prevents the i386 vkernel from beeing compiled
from a source tree with PAT support
* Recent versions of DragonFly cannot possibly run on machines using
these processors anyway
Sepherosa Ziehau [Thu, 18 Jul 2013 00:52:22 +0000 (08:52 +0800)]
so_pru_send_async: Use M_NOWAIT to allocate address
If the allocation failed, we just fall back to the synchronized pru_send.
Using M_WAITOK defeats the purpose of asynchronized pru_send, which tries
to prevent the current thread from being scheduled.
Sascha Wildner [Wed, 17 Jul 2013 20:42:46 +0000 (22:42 +0200)]
vkernel: Remove #if 0 code in vkernel headers.
Sascha Wildner [Wed, 17 Jul 2013 20:35:42 +0000 (22:35 +0200)]
kernel: Remove unneeded #include.
Sascha Wildner [Wed, 17 Jul 2013 20:35:13 +0000 (22:35 +0200)]
kernel: Remove unused kmalloc types: M_AMRCAM, M_DEVT, M_ZOMBIE.
Sepherosa Ziehau [Wed, 17 Jul 2013 15:51:37 +0000 (23:51 +0800)]
arp: Perform ARP pending output during ARP updating
Since we now use netisrs to update ARP, pending output no longer
needs to be dispatched to netisr.
Sepherosa Ziehau [Wed, 17 Jul 2013 13:47:39 +0000 (21:47 +0800)]
route: Prioritize routing table change messages
Sascha Wildner [Wed, 17 Jul 2013 05:10:48 +0000 (07:10 +0200)]
kernel: Remov unused kmalloc type M_VMPGDATA.
Last usage was removed in
96adc7538c33c47d4e6fce31d06ccf00f5aac3fa over
3 years ago.
Sascha Wildner [Tue, 16 Jul 2013 18:50:23 +0000 (20:50 +0200)]
kernel: Remove some orphaned extern declarations in sys/platform.
Also a no longer used kmalloc type.
Sascha Wildner [Tue, 16 Jul 2013 18:49:27 +0000 (20:49 +0200)]
systat(8): Remove some orphaned extern declarations.
Sascha Wildner [Tue, 16 Jul 2013 17:32:46 +0000 (19:32 +0200)]
<sys/device.h>: Fix a typo in an extern declaration.
Matthew Dillon [Tue, 16 Jul 2013 17:17:34 +0000 (10:17 -0700)]
kernel - Attempt to fix shared/excl namecache deadlock
* Attempt to fix a shared/excl namecache deadlock where the shared lock
may block excessively waiting for other shared users to unlock when
an exclusive request is pending.
* Do a better job reporting the time delayed when blocked for an
excessive period of time.
Sascha Wildner [Tue, 16 Jul 2013 17:07:24 +0000 (19:07 +0200)]
ee(1): Remove two unused files.
Sascha Wildner [Sat, 13 Jul 2013 10:09:41 +0000 (12:09 +0200)]
kernel/oce: Sync oce(4) driver with FreeBSD.
An update by Emulex. Most notably, it adds support for Skyhawk adapters.
The port to DragonFly wasn't tested on a Skyhawk but looks like it should
just work[tm].
Thanks to Mihai Carabas for testing it on a BladeEngine 3 to see that I
didn't break anything which previously worked.
Taken-from: FreeBSD
François Tigeot [Sat, 6 Jul 2013 08:52:48 +0000 (10:52 +0200)]
iir: Prevent namespace collision with INTEL_VENDOR_ID
Use the existing PCI_VENDOR_INTEL #define instead of the local
INTEL_VENDOR_ID and avoid a conflict with the one in specialreg.h
Sascha Wildner [Mon, 15 Jul 2013 17:07:22 +0000 (19:07 +0200)]
Remove some orphaned extern declarations.
Sascha Wildner [Mon, 15 Jul 2013 16:38:00 +0000 (18:38 +0200)]
Update the pciconf(8) database.
July 14, 2013 snapshot from http://pciids.sourceforge.net/
Sascha Wildner [Sun, 14 Jul 2013 18:26:11 +0000 (20:26 +0200)]
bnx.4: Remove trailing whitespace.
Sascha Wildner [Sun, 14 Jul 2013 17:57:34 +0000 (19:57 +0200)]
Remove fpsetsticky(3) remains. It was removed with the recent libm update.
See FreeBSD's r143658 commit message for why it was removed.
This commit removes an orphaned extern declaration in x86_64's <ieeefp.h>,
syncs the fpgetround(3) manual page with FreeBSD and removes fpsetsticky's
MLINK.
Matthew Dillon [Thu, 11 Jul 2013 22:47:49 +0000 (15:47 -0700)]
kernel - Fix excessively deferred wakeups
* Fix the deferred wakeup facility to ensure that queued wakeups
do not get held up by other queued wakeups getting in front of
them.
Reported-by: vsrinivas
Matthew Dillon [Thu, 11 Jul 2013 22:44:41 +0000 (15:44 -0700)]
kernel - Do not try to apply certain hw errata fixes if in a VM guest
* Do not try to apply certain hw errata fixes (721) if in a VM guest.
Submitted-by: vsrinivas
Sepherosa Ziehau [Thu, 11 Jul 2013 09:55:36 +0000 (17:55 +0800)]
rtsock: Add genmask after credit checking
Sascha Wildner [Wed, 10 Jul 2013 21:36:40 +0000 (23:36 +0200)]
libm: Add some parentheses to clarify operator precedence.
This fixes two clang -Wparentheses warnings.
No functional change.
Taken-from: FreeBSD
Sascha Wildner [Wed, 10 Jul 2013 20:05:57 +0000 (22:05 +0200)]
strerror(3): Provide an error message for ENOMEDIUM.
Reported-by: Joris Giovannangeli <joris@giovannangeli.fr>
Taken-from: OpenBSD