summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Proxy allocation requests for the PCI ROM BAR from child devices similarjhb2013-04-091-25/+35
| | | | | | | to how the VGA bus driver currently proxies allocation requests for other PCI BARs. MFC after: 1 week
* Pass the segmented address of the counter, based on %fs, i.e. offsetkib2013-04-091-1/+3
| | | | from the pcpu[0] to the counter base, instead of the linear address.
* Convert UMA code to C99 uintXX_t types.glebius2013-04-094-97/+97
|
* Swap us_freecount and us_flags, achieving same structure sizeglebius2013-04-091-2/+2
| | | | | | as before previous commit. Submitted by: alc
* Add static/const keywords to the arrays.ed2013-04-093-8/+17
| | | | | | | | | This theoretically allows a compiler to optimize (parts of) the array away if unused. While there, make the array size implicit and use a _Static_assert() to ensure that the definition matches up with the number of elements in the list.
* Since now we support 256 items per slab, we need more bitsglebius2013-04-091-1/+1
| | | | | | | | | | for us_freecount. This grows uma_slab_head on 32-bit arches, but growth isn't significant. Taking kmem zones as example, only the 32 byte zone is affected, ipers is reduced from 113 to 112. In collaboration with: kib
* Last remaining prototype issue that still hasn't been fixed upstream.des2013-04-092-3/+1
|
* Revert local changes and pull in r3828 from upstream.des2013-04-098-269/+12
|
* Fix KASSERTs: maximum number of items per slab is 256.glebius2013-04-091-3/+3
|
* Fix build for AIM 64bit.kib2013-04-091-0/+2
|
* Fix the assertions for the state of the object under the map entrykib2013-04-091-6/+16
| | | | | | | | | | | with the MAP_ENTRY_VN_WRITECNT flag: - Move the assertion that verifies the state of the v_writecount and vnp.writecount, under the block where the object is locked. - Check that the object type is OBJT_VNODE before asserting. Reported by: avg Reviewed by: alc MFC after: 1 week
* Fix VIMAGE build.glebius2013-04-091-2/+2
|
* Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats.ae2013-04-0915-101/+102
| | | | MFC after: 1 week
* Import a new version of NetBSD's mtree.ed2013-04-098-15/+186
|\ | | | | | | | | | | | | | | This version of mtree implements a new flag (-O) that can be used to restrict the tool to certain pathnames. Also, it fixes a compiler warning generated by -Wmissing-variable-declarations. Acked by: brooks
| * Vendor import of NetBSD's mtree at 2013-04-08.ed2013-04-087-14/+185
| |
* | FireWire: Don't allow a tlabel to reference an xfer after free.will2013-04-081-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sys/dev/firewire/firewire.c: - fw_xfer_unload(): Since we are about to free this xfer, call fw_tl_free() to remove the xfer from its tlabel's list, if it has a tlabel. - In every occasion when a xfer is removed from a tlabel's list, reset xfer->tl to -1 while holding fc->tlabel_lock, so that the xfer isn't mis-identified as belonging to a tlabel. This doesn't fix all the use-after-free problems for M_FWMEM, but is an incremental towards that goal. Reviewed by: kan, sbruno Sponsored by: Spectra Logic
* | Fix this to compile when ATH_DEBUG_ALQ is defined but ATH_DEBUG isn't.adrian2013-04-081-1/+1
| |
* | Add FreeBSD 8.4.pluknet2013-04-081-0/+1
| | | | | | | | MFC after: 3 days
* | The per-page act_count can be made very-easily protected by theattilio2013-04-082-5/+5
| | | | | | | | | | | | | | | | | | per-page lock rather than vm_object lock, without any further overhead. Make the formal switch. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho
* | Switch some "low-hanging fruit" to acquire read lock on vmobjectsattilio2013-04-083-19/+19
| | | | | | | | | | | | | | | | rather than write locks. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho
* | Merge from projects/counters: TCP/IP stats.glebius2013-04-085-289/+550
| | | | | | | | | | | | | | | | | | Convert 'struct ipstat' and 'struct tcpstat' to counter(9). This speeds up IP forwarding at extreme packet rates, and makes accounting more precise. Sponsored by: Nginx, Inc.
* | Merge from projects/counters: counter(9).glebius2013-04-0814-0/+819
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduce counter(9) API, that implements fast and raceless counters, provided (but not limited to) for gathering of statistical data. See http://lists.freebsd.org/pipermail/freebsd-arch/2013-April/014204.html for more details. In collaboration with: kib Reviewed by: luigi Tested by: ae, ray Sponsored by: Nginx, Inc.
* | Forcibly defining _KERNEL is bad idea. Toss some code so that ip_var.hglebius2013-04-081-3/+3
| | | | | | | | isn't included with forced _KERNEL define.
* | Merge from projects/counters:glebius2013-04-088-13/+57
| | | | | | | | | | | | | | Pad struct pcpu so that its size is denominator of PAGE_SIZE. This is done to reduce memory waste in UMA_PCPU_ZONE zones. Sponsored by: Nginx, Inc.
* | Merge from projects/counters: UMA_ZONE_PCPU zones.glebius2013-04-084-38/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These zones have slab size == sizeof(struct pcpu), but request from VM enough pages to fit (uk_slabsize * mp_ncpus). An item allocated from such zone would have a separate twin for each CPU in the system, and these twins are at a distance of sizeof(struct pcpu) from each other. This magic value of distance would allow us to make some optimizations later. To address private item from a CPU simple arithmetics should be used: item = (type *)((char *)base + sizeof(struct pcpu) * curcpu) These arithmetics are available as zpcpu_get() macro in pcpu.h. To introduce non-page size slabs a new field had been added to uma_keg uk_slabsize. This shifted some frequently used fields of uma_keg to the fourth cache line on amd64. To mitigate this pessimization, uma_keg fields were a bit rearranged and least frequently used uk_name and uk_link moved down to the fourth cache line. All other fields, that are dereferenced frequently fit into first three cache lines. Sponsored by: Nginx, Inc.
* | Fix a potential socket leak in the NFS server. If a client closes itsjhb2013-04-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | connection after it was accepted by the userland nfsd process but before it was handled off to svc_vc_create() in the kernel, then svc_vc_create() would see it as a new listen socket and try to listen on it leaving a dangling reference to the socket. Instead, check for disconnected sockets and treat them like a connected socket. The call to pru_getaddr() should fail and cause svc_vc_create() to fail. Note that we need to lock the socket to get a consistent snapshot of so_state since there is a window in soisdisconnected() where both flags are clear. Reviewed by: dfr, rmacklem MFC after: 1 week
* | Switch to a 2-clause license.markj2013-04-081-3/+0
| | | | | | | | | | Approved by: emaste (co-mentor) X-MFC with: r249257
* | Add support for getting and setting BBU properties related to batterymarkj2013-04-089-4/+347
| | | | | | | | | | | | | | | | | | | | | | | | relearning. Specifically, add subcommands to mfiutil(8) which allow the user to set the BBU and autolearn modes when the firmware supports it, and add a subcommand which kicks off a battery relearn. Reviewed by: sbruno, rstone Tested by: sbruno Approved by: rstone (co-mentor) MFC after: 2 weeks Sponsored by: Sandvine Incorporated
* | Fix a memory leak that showed up when we delete LUNs. The memory used forken2013-04-081-4/+8
| | | | | | | | | | | | | | | | | | | | | | the LUN was never freed. ctl.c: Adjust ctl_alloc_lun() to make sure we don't clear the CTL_LUN_MALLOCED flag. Reported by: Sreenivasa Honnur <shonnur@chelsio.com> Sponsored by: Spectra Logic MFC after: 3 days
* | mdoc: sort cross references.joel2013-04-081-3/+3
| |
* | Remove reference to the nonexistent sysctl node net.inet6.mld.stats.ae2013-04-081-6/+2
| | | | | | | | | | | | | | Also add cross reference to the icmp6(4). PR: 177696 MFC after: 1 week
* | drm: Right-shift I2C slave address before passing it to aux channeldumbbell2013-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In r249041, I2C slave addresses were left-shifted at creation time to have the same behavior between i915 and radeon (not committed yet). This change broke the aux channel. The user-visible change was that display port on i915 didn't work anymore. To fix this, we right-shift the address back to restore the original value. Reported by: Olivier Cochard-Labbé <olivier@cochard.me> Tested by: Olivier Cochard-Labbé <olivier@cochard.me> Reviewed by: kib@
* | Mark the act_tbl static/const.ed2013-04-081-1/+1
| | | | | | | | | | | | | | This table is only used within this source file and is only accessed read-only. MFC after: 1 week
* | Prevent the creation of an unused variable.ed2013-04-081-1/+1
| | | | | | | | | | | | | | We're only interested in the enumeration fields; we don't want to create a variable to store them. MFC after: 1 week
* | Fix synopsis for sbuf_len.trociny2013-04-071-1/+1
| | | | | | | | MFC after: 3 days
* | Use pget(9) to reduce code duplication.trociny2013-04-071-10/+4
| | | | | | | | MFC after: 1 week
* | Fill p_flags and p_align fields of the core dump note segement.trociny2013-04-071-2/+2
| | | | | | | | | | Reviewed by: kib MFC after: 2 weeks
* | Use 4-byte padding for core dump notes on both 32 and 64bit archs.trociny2013-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although native word padding (i.e. 8-byte on 64bit arch) looks to be in agreement with standards, other parts of our code and other OSes use 4-byte alignment. This is not expected to change alignment for currently generated core dump notes, as the notes look to consist of structures with sizes multiple of 8 on 64-bit archs. But there are plans to add additional notes, where 4-byte vs 8-byte alignment makes difference. Discussed with: kib Reviewed by: kib MFC after: 2 weeks
* | sh: Add const to nodesavestr().jilles2013-04-071-3/+3
| |
* | Add some missing newlines and static declarations.marius2013-04-071-8/+14
| | | | | | | | MFC after: 3 days
* | mqueue,ksem,shm: Fix race condition with setting UF_EXCLOSE.jilles2013-04-073-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | POSIX mqueue, compatibility ksem and POSIX shm create a file descriptor that has close-on-exec set. However, they do this incorrectly, leaving a window where a thread may fork and exec while the flag has not been set yet. The race is easily reproduced on a multicore system with one thread doing shm_open and close and another thread doing posix_spawnp and waitpid. Set UF_EXCLOSE via falloc()'s flags argument instead. This also simplifies the code. MFC after: 1 week
* | Fix regression issue after r248910.hselasky2013-04-073-4/+4
| | | | | | | | | | PR: arm/177685 Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
* | Remove extra semicolons from CAM_SIM_[UN]LOCK() macros.mav2013-04-071-2/+2
| |
* | The CELL fields can be various integer types depending on the platformkientzle2013-04-071-6/+10
| | | | | | | | | | | | (ARM uses 'int' and 'unsigned'; i386 uses 'long' and 'unsigned long'), so we need explicit casts to long and unsigned long here to ensure that the result matches the printf %ld and %lx specifiers.
* | Fix two broken macros.kientzle2013-04-071-2/+2
| |
* | Micro-optimize the order of struct vm_radix_node's fields. Specifically,alc2013-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | arrange for all of the fields to start at a short offset from the beginning of the structure. Eliminate unnecessary masking of VM_RADIX_FLAGS from the root pointer in vm_radix_getroot(). Sponsored by: EMC / Isilon Storage Division
* | sh: Add a variation on builtins/eval4.0 where the cmdsubst returns 0.jilles2013-04-061-0/+5
| |
* | Add warning about SOCK_CLOEXEC and SOCK_NONBLOCK (r248534).jilles2013-04-061-0/+6
| | | | | | | | Reviewed by: rpaulo
* | Prepare to replace the buf splay with a trie:jeff2013-04-065-68/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't insert BKGRDMARKER bufs into the splay or dirty/clean buf lists. No consumers need to find them there and it complicates the tree. These flags are all FFS specific and could be moved out of the buf cache. - Use pbgetvp() and pbrelvp() to associate the background and journal bufs with the vp. Not only is this much cheaper it makes more sense for these transient bufs. - Fix the assertions in pbget* and pbrel*. It's not safe to check list pointers which were never initialized. Use the BX flags instead. We also check B_PAGING in reassignbuf() so this should cover all cases. Discussed with: kib, mckusick, attilio Sponsored by: EMC / Isilon Storage Division
* | mdoc: new sentence should be on a new line. Also remove EOL whitespace whilejoel2013-04-061-3/+4
| | | | | | | | here.
OpenPOWER on IntegriCloud