aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* A bunch of netmap fixes:Luigi Rizzo2012-02-2718-710/+812
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USERSPACE: 1. add support for devices with different number of rx and tx queues; 2. add better support for zero-copy operation, adding an extra field to the netmap ring to indicate how many buffers we have already processed but not yet released (with help from Eddie Kohler); 3. The two changes above unfortunately require an API change, so while at it add a version field and some spares to the ioctl() argument to help detect mismatches. 4. update the manual page for the two changes above; 5. update sample applications in tools/tools/netmap KERNEL: 1. simplify the internal structures moving the global wait queues to the 'struct netmap_adapter'; 2. simplify the functions that map kring<->nic ring indexes 3. normalize device-specific code, helps mainteinance; 4. start exploring the impact of micro-optimizations (prefetch etc.) in the ixgbe driver. Use 'legacy' descriptors on the tx ring and prefetch slots gives about 20% speedup at 900 MHz. Another 7-10% would come from removing the explict calls to bus_dmamap* in the core (they are effectively NOPs in this case, but it takes expensive load of the per-buffer dma maps to figure out that they are all NULL. Rx performance not investigated. I am postponing the MFC so i can import a few more improvements before merging. Notes: svn path=/head/; revision=232238
* Typo.John Baldwin2012-02-271-1/+1
| | | | Notes: svn path=/head/; revision=232237
* Backout r230934 which didn't work with unix sockets andSergey Kandaurov2012-02-271-34/+8
| | | | | | | | | several filesystem layers mounted at the specified path. Pointy hat to: pluknet Notes: svn path=/head/; revision=232233
* - Panic up front if a kernel does not include 'device atpic' and anJohn Baldwin2012-02-271-1/+10
| | | | | | | | | | | APIC is not found. - Don't panic if lapic_enable_cmc() is called and the APIC is not enabled. This can happen due to booting a kernel with APIC disabled on a CPU that supports CMCI. - Wrap a long line. Notes: svn path=/head/; revision=232232
* MFamd64: Don't whine about interrupts being disabled for an NMI.John Baldwin2012-02-271-4/+5
| | | | Notes: svn path=/head/; revision=232231
* Remove completely duplicate '#ifdef XEN' section.John Baldwin2012-02-271-30/+0
| | | | Notes: svn path=/head/; revision=232230
* Resort the IDT_DTRACE_RET constant after it was changed to be less thanJohn Baldwin2012-02-272-2/+2
| | | | | | | IDT_SYSCALL. Notes: svn path=/head/; revision=232228
* Correct function prototype for read_rflags().John Baldwin2012-02-271-1/+1
| | | | Notes: svn path=/head/; revision=232227
* Update incorrect comment.John Baldwin2012-02-271-1/+1
| | | | Notes: svn path=/head/; revision=232226
* Update PCI-IDs with devices found on Intel SDPSean Bruno2012-02-271-2/+6
| | | | | | | | | | | Return BUS_PROBE_DEFAULT so that non-default drivers may be loaded Reviewed by: jharris@ Obtained from: Yahoo! Inc. and Intel MFC after: 3 days Notes: svn path=/head/; revision=232225
* Remove unused variable count.Kevin Lo2012-02-271-2/+1
| | | | | | | This variable is initialized but not used. Notes: svn path=/head/; revision=232219
* Clear the a device's description string anytime it's driver changes.John Baldwin2012-02-271-3/+2
| | | | | | | | | | | | | Descriptions are specific to drivers and we don't change drivers on attached devices. This fixes a few places where we were not clearing the description when detaching a driver (e.g. with device_attach() failed). While here, fix a few other nits: - Remove spurious call to remove a device's driver from devclass_driver_deleted(). device_detach() removes it already. - Fix a typo. Notes: svn path=/head/; revision=232218
* Follow changes made in revision 232144, pass absolute timeout to kernel,David Xu2012-02-274-71/+84
| | | | | | | this eliminates a clock_gettime() syscall. Notes: svn path=/head/; revision=232209
* Rework CPU load balancing in SCHED_ULE:Alexander Motin2012-02-271-148/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In sched_pickcpu() be more careful taking previous CPU on SMT systems. Do it only if all other logical CPUs of that physical one are idle to avoid extra resource sharing. - In sched_pickcpu() change general logic of CPU selection. First look for idle CPU, sharing last level cache with previously used one, skipping SMT CPU groups. If none found, search all CPUs for the least loaded one, where the thread with its priority can run now. If none found, search just for the least loaded CPU. - Make cpu_search() compare lowest/highest CPU load when comparing CPU groups with equal load. That allows to differentiate 1+1 and 2+0 loads. - Make cpu_search() to prefer specified (previous) CPU or group if load is equal. This improves cache affinity for more complicated topologies. - Randomize CPU selection if above factors are equal. Previous code tend to prefer CPUs with lower IDs, causing unneeded collisions. - Rework periodic balancer in sched_balance_group(). With cpu_search() more intelligent now, make balansing process flat, removing recursion over the topology tree. That fixes double swap problem and makes load distribution more even and predictable. All together this gives 10-15% performance improvement in many tests on CPUs with SMT, such as Core i7, for number of threads is less then number of logical CPUs. In some tests it also gives positive effect to systems without SMT. Reviewed by: jeff Tested by: flo, hackers@ MFC after: 1 month Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=232207
* Fix logic errorKevin Lo2012-02-271-1/+1
| | | | Notes: svn path=/head/; revision=232204
* Remove duplicate assignment of SF_IMR_RXDQ2_DMADONE bitKevin Lo2012-02-271-1/+1
| | | | Notes: svn path=/head/; revision=232203
* Drop setuid status while doing file operations to prevent potentialXin LI2012-02-271-12/+21
| | | | | | | | | | | information leak. This changeset is intended to be a minimal one to make backports easier. Reviewed by: kevlo, remko MFC after: 1 week Notes: svn path=/head/; revision=232202
* xargs: Remove an unclear comment that only tried to repeat what the code didJilles Tjoelker2012-02-261-4/+0
| | | | | | | Reported by: bde Notes: svn path=/head/; revision=232201
* Fix segfault if distfetch and distextract binaries are run standaloneNathan Whitehorn2012-02-262-2/+16
| | | | | | | | | | | without the DISTRIBUTIONS environment variable set. PR: bin/165492 Submitted by: Fernando Apesteguia MFC after: 4 days Notes: svn path=/head/; revision=232200
* Fix apparent logic reversal in setting the 'auto_mode' flag.Alexander Kabaev2012-02-261-2/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=232199
* Also call the low-level driver if ->c_iflag & (IXON|IXOFF|IXANY) changes.Poul-Henning Kamp2012-02-261-0/+2
| | | | | | | | | Uftdi(4) examines (c_iflag & (IXON|IXOFF)) to control hw XON-XOFF support. This is obviously no good, if changes to those bits are not communicated down the stack. Notes: svn path=/head/; revision=232197
* Fix typo.Alan Cox2012-02-261-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=232192
* xargs: Fix comma splice in error message.Jilles Tjoelker2012-02-261-2/+2
| | | | | | | Reported by: bde Notes: svn path=/head/; revision=232187
* Analogous to r232059, add a parameter for the ZFS file system:Martin Matuska2012-02-265-15/+44
| | | | | | | | | | | | | | | | | | | allow.mount.zfs: allow mounting the zfs filesystem inside a jail This way the permssions for mounting all current VFCF_JAIL filesystems inside a jail are controlled wia allow.mount.* jail parameters. Update sysctl descriptions. Update jail(8) and zfs(8) manpages. TODO: document the connection of allow.mount.* and VFCF_JAIL for kernel developers MFC after: 10 days Notes: svn path=/head/; revision=232186
* Remove duplicate assignment of CTS_SPI_VALID_SYNC_RATE bitKevin Lo2012-02-261-1/+0
| | | | Notes: svn path=/head/; revision=232185
* Check fchmod()/fchown() in fifo_misc test.Jilles Tjoelker2012-02-261-0/+93
| | | | Notes: svn path=/head/; revision=232184
* Fix fchmod() and fchown() on fifos.Jilles Tjoelker2012-02-261-2/+41
| | | | | | | | | | | The new fifo implementation in r232055 broke fchmod() and fchown() on fifos. Postfix needs this. Submitted by: gianni Reported by: dougb Notes: svn path=/head/; revision=232183
* When displaying security credential information show also process umask.Mikolaj Golub2012-02-261-3/+29
| | | | | | | | | Submitted by: Dmitry Banschikov <me ubique spb ru> Discussed with: rwatson MFC after: 2 weeks Notes: svn path=/head/; revision=232182
* Add sysctl to retrieve or set umask of another process.Mikolaj Golub2012-02-262-0/+49
| | | | | | | | | | Submitted by: Dmitry Banschikov <me ubique spb ru> Discussed with: kib, rwatson Reviewed by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=232181
* Document SO_PROTOCOL socket option.Konstantin Belousov2012-02-261-2/+13
| | | | | | | | | Discussed with: bz Reviewed by: glebius MFC after: 2 weeks Notes: svn path=/head/; revision=232180
* Add SO_PROTOCOL/SO_PROTOTYPE socket SOL_SOCKET-level option to get theKonstantin Belousov2012-02-262-0/+6
| | | | | | | | | | | | | | | socket protocol number. This is useful since the socket type can be implemented by different protocols in the same protocol family, e.g. SOCK_STREAM may be provided by both TCP and SCTP. Submitted by: Jukka A. Ukkonen <jau iki fi> PR: kern/162352 Discussed with: bz Reviewed by: glebius MFC after: 2 weeks Notes: svn path=/head/; revision=232179
* Remove apparently redundand checks for socket so_proto being non-NULLKonstantin Belousov2012-02-261-9/+5
| | | | | | | | | | | | from sosetopt() and sogetopt(). No exposed sockets may have so_proto invalid. Discussed with: bz, rwatson Reviewed by: glebius MFC after: 2 weeks Notes: svn path=/head/; revision=232178
* Add backlight control to ATI-graphics PowerBooks and iBooks.Justin Hibbits2012-02-265-0/+219
| | | | | | | | Approved by: nwhitehorn (mentor) MFC after: 1 week Notes: svn path=/head/; revision=232177
* Fix the scc(4) module build. Without the file it's missing a required symbol.Justin Hibbits2012-02-261-1/+1
| | | | | | | | Approved by: nwhitehorn (mentor) MFC after: 3 days Notes: svn path=/head/; revision=232176
* Add in some debugging code to check whether the current rate table hasAdrian Chadd2012-02-262-0/+26
| | | | | | | | | | | | | | | | | | | | | been bait-and-switched from the rate control code. This will avoid the panic that I saw and will avoid sending invalid rates (eg 11a/11g OFDM rates when in 11b, on 11b-only NICs (AR5211)) where the rate table is not "big". It also will point out situations where this occurs for the 11n NICs which will have sufficiently large rate tables that "invalid rix" doesn't occur. I'll try to follow this up with a commit that adds a current operating mode check. The "rix" is only relevant to the current operating mode and rate table. PR: kern/165475 Notes: svn path=/head/; revision=232170
* Simplify vm_mmap()'s control flow.Alan Cox2012-02-251-16/+19
| | | | | | | | | | | Add a comment describing what vm_mmap_to_errno() does. Reviewed by: kib MFC after: 3 weeks X-MFC after: r232071 Notes: svn path=/head/; revision=232166
* Attempt to further fix some of the concurrency/reset issues that occur.Adrian Chadd2012-02-252-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ath_reset() is being called in softclock context, which may have the thing sleep on a lock. To avoid this, since we really _shouldn't_ be sleeping on any locks, break out the no-loss reset path into a tasklet and call that from: + ath_calibrate() + ath_watchdog() This has the added advantage that it'll end up also doing the frame RX cleanup from within the taskqueue context, rather than the softclock context. * Shuffle around the taskqueue_block() call to be before we grab the lock and disable interrupts. The trouble here is that taskqueue_block() doesn't block currently queued (but not yet running) tasks so calling it doesn't guarantee no further tasks (that weren't running on _A_ CPU at the time of this call) will complete. Calling taskqueue_drain() on these tasks won't work because if any _other_ thread calls taskqueue_enqueue() for whatever reason, everything gets very angry and stops working. This slightly changes the race condition enough to let ath_rx_tasklet() run before we try disabling it, and thus quietens the warnings a bit. The (more) true solution will be doing something like the following: * having a taskqueue_blocked mask in ath_softc; * having an interrupt_blocked mask in ath_softc; * only calling taskqueue_drain() on each individual task _after_ the lock has been acquired - that way no further tasklet scheduling is going to occur. * Then once the tasks have been blocked _and_ the interrupt has been disabled, call taskqueue_drain() on each, ensuring that anything that _was_ scheduled or running is removed. The trouble is if something calls taskqueue_enqueue() on a task after taskqueue_blocked() has been called but BEFORE taskqueue_drain() has been called, ta_pending will be set to 1 and taskqueue_drain() will sit there stuck in msleep() until you hard-kill the machine. PR: kern/165382 PR: kern/165220 Notes: svn path=/head/; revision=232163
* Simplify vmspace_fork()'s control flow by copying immutable data beforeAlan Cox2012-02-251-14/+10
| | | | | | | | | | | the vm map locks are acquired. Also, eliminate redundant initialization of the new vm map's timestamp. Reviewed by: kib MFC after: 3 weeks Notes: svn path=/head/; revision=232160
* Whitespace cleanup:Glen Barber2012-02-251-151/+220
| | | | | | | | | | | | | o Wrap sentences on to new lines o Rewrap lines where possible while trying to keep the diff to a minimum Found with: textproc/igor MFC after: 1 week X-MFC-With: r232157 Notes: svn path=/head/; revision=232159
* Whitespace cleanup:Glen Barber2012-02-259-49/+79
| | | | | | | | | | | | o Wrap sentences on to new lines o Cleanup trailing whitespace Found with: textproc/igor MFC after: 1 week X-MFC-With: r232157 Notes: svn path=/head/; revision=232158
* Fix various typos in manual pages.Glen Barber2012-02-2523-47/+47
| | | | | | | | | Submitted by: amdmi3 PR: 165431 MFC after: 1 week Notes: svn path=/head/; revision=232157
* o Reduce chances for integer overflow.Maxim Konovalov2012-02-251-2/+2
| | | | | | | | | | o More verbose sysctl description added. MFC after: 2 weeks Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=232156
* Bump __FreeBSD_version due to libarchive update.Martin Matuska2012-02-251-1/+1
| | | | Notes: svn path=/head/; revision=232154
* Update libarchive to 3.0.3Martin Matuska2012-02-25470-13523/+125568
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of new features: - New readers: RAR, LHA/LZH, CAB reader, 7-Zip - New writers: ISO9660, XAR - Improvements to many formats, especially including ISO9660 and Zip - Stackable write filters to write, e.g., tar.gz.uu in a single pass - Exploit seekable input; new "seekable" Zip reader can exploit the Zip Central Directory when it's available; the old "streamable" Zip reader is still fully supported for cases where seeking is not possible. Full release notes available at: https://github.com/libarchive/libarchive/wiki/ReleaseNotes Notes: svn path=/head/; revision=232153
| * Update vendor libarchive dist to new "release" branch (post 3.0.3)Martin Matuska2012-02-08509-14939/+133197
| | | | | | | | | | | | | | | | | | | | Git branch: release Git commit: 9af87742342aa4f37a22ec12c4cc1c82e00ffa2f Obtained from: https://github.com/libarchive/libarchive.git Notes: svn path=/vendor/libarchive/dist/; revision=231200
* | When detaching an unix domain socket, uipc_detach() checksMikolaj Golub2012-02-253-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unp->unp_vnode pointer to detect if there is a vnode associated with (binded to) this socket and does necessary cleanup if there is. The issue is that after forced unmount this check may be too late as the unp_vnode is reclaimed and the reference is stale. To fix this provide a helper function that is called on a socket vnode reclamation to do necessary cleanup. Pointed by: kib Reviewed by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=232152
* | If an interrupt is received with no vap attached, just fail LINK events.Adrian Chadd2012-02-251-0/+5
| | | | | | | | | | | | | | | | This fixes a NULL pointer dereference which occurs if the vap list is empty but someone brings up the wi0 interface. Notes: svn path=/head/; revision=232147
* | When using uidstart in /etc/adduser.conf, get the nextDaniel Eischen2012-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | available user id and show it in the "Uid [xxx]" prompt. PR: 163863 Submitted by: Moritz Wilhelmy (mw at wzff dot de) MFC after: 2 weeks Notes: svn path=/head/; revision=232146
* | Use correct Config registers for RTL8139 family. Unlike RTL8168 andPyun YongHyeon2012-02-253-40/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RTL810x family , RTL8139 has different register map for Config registers. While here, follow the lead of re(4) in WOL configuration. - Disable WOL_UCAST and WOL_MCAST capabilities by default. - Config5 register write does not need to unlock EEPROM access on RTL8139 family but unlocking EEPROM access does not affect its operation and make it consistent with re(4). Reported by: Matt Renzelmann mjr <> cs dot wisc dot edu Notes: svn path=/head/; revision=232145
* | In revision 231989, we pass a 16-bit clock ID into kernel, howeverDavid Xu2012-02-256-137/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | according to POSIX document, the clock ID may be dynamically allocated, it unlikely will be in 64K forever. To make it future compatible, we pack all timeout information into a new structure called _umtx_time, and use fourth argument as a size indication, a zero means it is old code using timespec as timeout value, but the new structure also includes flags and a clock ID, so the size argument is different than before, and it is non-zero. With this change, it is possible that a thread can sleep on any supported clock, though current kernel code does not have such a POSIX clock driver system. Notes: svn path=/head/; revision=232144