aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_sfbuf.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove SFBUF_OPTIONAL_DIRECT_MAP and such hacks, replacing them across theNathan Whitehorn2018-01-191-12/+4
| | | | | | | | | | | | | | | | | | | kernel by PHYS_TO_DMAP() as previously present on amd64, arm64, riscv, and powerpc64. This introduces a new MI macro (PMAP_HAS_DMAP) that can be evaluated at runtime to determine if the architecture has a direct map; if it does not (or does) unconditionally and PMAP_HAS_DMAP is either 0 or 1, the compiler can remove the conditional logic. As part of this, implement PHYS_TO_DMAP() on sparc64 and mips64, which had similar things but spelled differently. 32-bit MIPS has a partial direct-map that maps poorly to this concept and is unchanged. Reviewed by: kib Suggestions from: marius, alc, kib Runtime tested on: amd64, powerpc64, powerpc, mips64 Notes: svn path=/head/; revision=328168
* subr_sfbus.c need sys/proc.h for struct thread definition.Emmanuel Vadot2017-02-071-0/+1
| | | | | | | | | This fixes kernel build for armv6. Discussed with: kib Notes: svn path=/head/; revision=313394
* Move KASSERT into locked region.Gleb Smirnoff2014-08-111-2/+1
| | | | | | | Submitted by: kib Notes: svn path=/head/; revision=269813
* Use M_WAITOK in sf_buf_init().Gleb Smirnoff2014-08-111-2/+1
| | | | | | | | Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=269808
* Provide sf_buf_ref() to optimize refcounting of already allocatedGleb Smirnoff2014-08-111-0/+16
| | | | | | | | | | sendfile(2) buffers. Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=269807
* Merge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.cGleb Smirnoff2014-08-051-0/+226
The MD allocators were very common, however there were some minor differencies. These differencies were all consolidated in the MI allocator, under ifdefs. The defines from machine/vmparam.h turn on features required for a particular machine. For details look in the comment in sys/sf_buf.h. As result no MD code left in sys/*/*/vm_machdep.c. Some arches still have machine/sf_buf.h, which is usually quite small. Tested by: glebius (i386), tuexen (arm32), kevlo (arm32) Reviewed by: kib Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=269577