freebsd-dev/sys/kern
Konstantin Belousov 2ebc882927 Detect and optimize reads from the hole on UFS.
- Create getblkx(9) variant of getblk(9) which can return error.
- Add GB_NOSPARSE flag for getblk()/getblkx() which requests that BMAP
  was performed before the buffer is created, and EJUSTRETURN returned
  in case the requested block does not exist.
- Make ffs_read() use GB_NOSPARSE to avoid instantiating buffer (and
  allocating the pages for it), copying from zero_region instead.

The end result is less page allocations and buffer recycling when a
hole is read, which is important for some benchmarks.

Requested and reviewed by:	jeff
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D14917
2018-05-13 09:47:28 +00:00
..
bus_if.m
capabilities.conf allow posix_fallocate in capability mode 2017-10-12 15:45:53 +00:00
clock_if.m
cpufreq_if.m
device_if.m Teach makeobjops.awk to accept PROLOG and EPILOG blocks before 2017-12-31 09:23:19 +00:00
genassym.sh
imgact_aout.c i386 4/4G split. 2018-04-13 20:30:49 +00:00
imgact_binmisc.c Use C99 designated initializers for struct execsw 2018-03-13 13:09:10 +00:00
imgact_elf32.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
imgact_elf64.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
imgact_elf.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
imgact_gzip.c Use C99 designated initializers for struct execsw 2018-03-13 13:09:10 +00:00
imgact_shell.c Use C99 designated initializers for struct execsw 2018-03-13 13:09:10 +00:00
inflate.c SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
init_main.c Remove Giant from init creation and vfs_mountroot. 2018-03-21 14:46:54 +00:00
init_sysent.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_acct.c spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
kern_alq.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_clock.c make SW_WATCHDOG dynamic 2018-01-03 00:56:30 +00:00
kern_clocksource.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_condvar.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_conf.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_cons.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
kern_context.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_cpu.c Boost thread priority while changing CPU frequency 2018-05-07 15:24:03 +00:00
kern_cpuset.c Implement several enhancements to NUMA policies. 2018-03-29 02:54:50 +00:00
kern_ctf.c Revert r327828, r327949, r327953, r328016-r328026, r328041: 2018-01-21 15:42:36 +00:00
kern_descrip.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
kern_dtrace.c systrace: track it like sdt probes 2018-04-27 15:16:34 +00:00
kern_dump.c Print the dump progress indicator after calling dump_start(). 2018-05-01 17:32:43 +00:00
kern_environment.c Use explicit_bzero() when cleaning values out of the kernel environment. 2018-04-10 22:57:56 +00:00
kern_et.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_event.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
kern_exec.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
kern_exit.c Add PROC_PDEATHSIG_SET to procctl interface. 2018-04-18 21:31:13 +00:00
kern_fail.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_ffclock.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_fork.c Reduce contention on the proctree lock during heavy package build. 2018-02-20 02:18:30 +00:00
kern_hhook.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_idle.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_intr.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_jail.c Make it easier for filesystems to count themselves as jail-enabled, 2018-05-04 20:54:27 +00:00
kern_khelp.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_kthread.c Implement several enhancements to NUMA policies. 2018-03-29 02:54:50 +00:00
kern_ktr.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_ktrace.c Reduce overhead of ktrace checks in the common case. 2018-05-09 00:00:47 +00:00
kern_linker.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_lock.c lockmgr: Add missed neutering during panic 2018-04-24 18:41:14 +00:00
kern_lockf.c lockf: change the owner hash from pid to vnode-based 2018-04-24 06:10:36 +00:00
kern_lockstat.c lockstat: track lockstat just like sdt probes 2018-04-24 01:04:10 +00:00
kern_loginclass.c call racct_proc_ucred_changed() under the proc lock 2018-04-20 13:08:04 +00:00
kern_malloc.c Add simple preempt safe epoch API 2018-05-10 17:55:24 +00:00
kern_mbuf.c Add an mbuf allocator for netdump. 2018-05-06 00:19:48 +00:00
kern_mib.c clk: Put the sysctls under hw.clock instead of clock 2018-04-27 00:12:00 +00:00
kern_module.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_mtxpool.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_mutex.c Drop KTR_CONTENTION. 2018-03-20 15:51:05 +00:00
kern_ntptime.c Fix several leaks of kernel stack data through paddings. 2018-03-27 18:05:51 +00:00
kern_osd.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_physio.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_pmc.c hwpmc(9): Make pmclog buffer pcpu and update constants 2018-05-12 01:26:34 +00:00
kern_poll.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_priv.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_proc.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_procctl.c Rename PROC_PDEATHSIG_SET -> PROC_PDEATHSIG_CTL and PROC_PDEATHSIG_GET 2018-04-20 15:19:27 +00:00
kern_prot.c call racct_proc_ucred_changed() under the proc lock 2018-04-20 13:08:04 +00:00
kern_racct.c call racct_proc_ucred_changed() under the proc lock 2018-04-20 13:08:04 +00:00
kern_rangelock.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_rctl.c call racct_proc_ucred_changed() under the proc lock 2018-04-20 13:08:04 +00:00
kern_resource.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_rmlock.c rmlock: partially depessimize lock/unlock fastpath 2018-05-11 06:59:54 +00:00
kern_rwlock.c locks: extend speculative spin waiting for readers to drain 2018-04-11 01:43:29 +00:00
kern_sdt.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_sema.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_sendfile.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
kern_sharedpage.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_shutdown.c Refactor some of the MI kernel dump code in preparation for netdump. 2018-05-06 00:22:38 +00:00
kern_sig.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
kern_switch.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_sx.c locks: extend speculative spin waiting for readers to drain 2018-04-11 01:43:29 +00:00
kern_synch.c Add simple preempt safe epoch API 2018-05-10 17:55:24 +00:00
kern_syscalls.c Avoid calls to syscall_thread_enter/exit for statically defined syscalls 2018-05-07 22:29:32 +00:00
kern_sysctl.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_tc.c tc: bcopy -> memcpy 2018-05-04 22:48:10 +00:00
kern_thr.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_thread.c Add PROC_PDEATHSIG_SET to procctl interface. 2018-04-18 21:31:13 +00:00
kern_time.c nanosleep(2): Fix bogus incrementing of rmtp by tc_tick_sbt on [EINTR]. 2018-02-14 18:43:50 +00:00
kern_timeout.c Remove some, but not all, assumptions that the BSP is CPU 0 and that CPUs 2017-11-25 23:41:05 +00:00
kern_tslog.c Code for recording timestamps of events, especially function entries/exits. 2017-12-31 09:21:01 +00:00
kern_umtx.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_uuid.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_xxx.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
ksched.c spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
link_elf_obj.c Implement support for ifuncs in the kernel linker. 2018-05-03 21:37:46 +00:00
link_elf.c Avoid calls to bzero() before ireloc. 2018-05-09 14:39:24 +00:00
linker_if.m
Make.tags.inc
Makefile Don't use an .OBJDIR for 'make sysent'. 2018-01-29 19:14:15 +00:00
makesyscalls.sh Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
md4c.c SPDX: some uses of the RSA-MD license. 2017-12-13 16:30:39 +00:00
md5c.c
msi_if.m
p1003_1b.c spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
pic_if.m
posix4_mib.c spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
sched_4bsd.c Inlined sched_userret. 2018-05-07 23:36:16 +00:00
sched_ule.c Inlined sched_userret. 2018-05-07 23:36:16 +00:00
serdev_if.m
stack_protector.c
subr_acl_nfs4.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_acl_posix1e.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_autoconf.c Instrument "boot holds" for the benefit of the TSLOG framework. These 2017-12-31 09:23:52 +00:00
subr_blist.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
subr_bufring.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_bus_dma.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_bus.c Add device_quiet_children() and device_has_quiet_children() 2018-05-07 21:09:08 +00:00
subr_busdma_bufalloc.c Implement NUMA support in uma(9) and malloc(9). Allocations from specific 2018-01-12 23:25:05 +00:00
subr_capability.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
subr_clock.c Replace the existing print_ct() private debugging function with a set of 2018-02-12 16:25:56 +00:00
subr_compressor.c Fix the test for SET_FOREACH termination. 2018-02-15 17:35:40 +00:00
subr_counter.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_devmap.c
subr_devstat.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_disk.c SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
subr_dummy_vdso_tc.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
subr_epoch.c hwpmc/epoch - don't reference domain if NUMA is not set 2018-05-12 20:00:29 +00:00
subr_eventhandler.c Fix initialization of eventhandler mutex. 2018-03-19 22:43:27 +00:00
subr_fattime.c Use const pointers for input data not modified by clock utility functions. 2018-02-06 22:17:01 +00:00
subr_firmware.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_gtaskqueue.c Add taskqgroup_config_gtask_deinit to support teardown after 2018-05-09 18:51:35 +00:00
subr_hash.c Unsign some values related to allocation. 2018-01-22 02:08:10 +00:00
subr_hints.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_intr.c
subr_kdb.c KDB: restart only CPUs stopped by KDB 2018-01-18 07:38:54 +00:00
subr_kobj.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_lock.c locks: tweak backoff a little bit 2018-04-08 16:34:10 +00:00
subr_log.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
subr_mchain.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
subr_module.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_msgbuf.c Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
subr_param.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
subr_pcpu.c Make v_wire_count a per-cpu counter(9) counter. This eliminates a 2018-02-12 22:53:00 +00:00
subr_pctrie.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_pidctrl.c Add a generic Proportional Integral Derivative (PID) controller algorithm and 2018-02-23 22:51:51 +00:00
subr_power.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_prf.c Use the TSLOG framework to record entry/exit timestamps for DELAY and 2017-12-31 09:24:41 +00:00
subr_prof.c Stop using fuswintr() and suswintr() in the profiler. 2018-04-17 16:36:53 +00:00
subr_rman.c
subr_rtc.c Fix bad indentation. Whitespace only, no functional changes. 2018-02-13 17:38:08 +00:00
subr_sbuf.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_scanf.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
subr_sfbuf.c Remove SFBUF_OPTIONAL_DIRECT_MAP and such hacks, replacing them across the 2018-01-19 17:46:31 +00:00
subr_sglist.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
subr_sleepqueue.c Use LIST_FOREACH_SAFE in sleepq_chains_remove_matching(). 2018-03-25 20:12:14 +00:00
subr_smp.c Use resume_cpus() instead of restart_cpus() to resume from ACPI suspension. 2017-12-21 09:17:48 +00:00
subr_stack.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_syscall.c systrace: track it like sdt probes 2018-04-27 15:16:34 +00:00
subr_taskqueue.c Revert r327828, r327949, r327953, r328016-r328026, r328041: 2018-01-21 15:42:36 +00:00
subr_terminal.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_trap.c Add simple preempt safe epoch API 2018-05-10 17:55:24 +00:00
subr_turnstile.c Add simple preempt safe epoch API 2018-05-10 17:55:24 +00:00
subr_uio.c MIPS: Implement fue*word* and casueword* in assembly. 2018-03-12 22:10:06 +00:00
subr_unit.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_vmem.c Fix three miscalculations in amount of boot pages: 2018-02-07 18:32:51 +00:00
subr_witness.c Separate list manipulation locking from state change in multicast 2018-05-02 19:36:29 +00:00
sys_capability.c Change trap_enotcap to bool and annotate with __read_frequently 2018-05-07 23:10:12 +00:00
sys_generic.c Fix the build after r333457 2018-05-10 13:19:42 +00:00
sys_getrandom.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sys_pipe.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sys_procdesc.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
sys_process.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sys_socket.c Ensure that the vnet is set when calling pru_sockaddr() and 2018-01-11 20:26:17 +00:00
syscalls.c Regenerate sysent files after r331279. 2018-03-21 01:17:01 +00:00
syscalls.master Added SAL annotatations to system calls. 2018-04-05 20:31:45 +00:00
systrace_args.c Regenerate sysent files after r331279. 2018-03-21 01:17:01 +00:00
sysv_ipc.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sysv_msg.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sysv_sem.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sysv_shm.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
tty_compat.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
tty_info.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
tty_inq.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
tty_outq.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
tty_pts.c Move uio enums to sys/_uio.h. 2018-03-27 15:20:03 +00:00
tty_tty.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
tty_ttydisc.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
tty.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
uipc_accf.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
uipc_debug.c Revert r332894 at the request of the submitter. 2018-04-24 19:55:12 +00:00
uipc_domain.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
uipc_mbuf2.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
uipc_mbuf.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
uipc_mbufhash.c
uipc_mqueue.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
uipc_sem.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
uipc_shm.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
uipc_sockbuf.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
uipc_socket.c Revert r332894 at the request of the submitter. 2018-04-24 19:55:12 +00:00
uipc_syscalls.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
uipc_usrreq.c Forgot to sort here in r328238. 2018-01-22 02:26:10 +00:00
vfs_acl.c Reduce duplication in __acl_*_(file|link). 2018-02-15 21:24:43 +00:00
vfs_aio.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
vfs_bio.c Detect and optimize reads from the hole on UFS. 2018-05-13 09:47:28 +00:00
vfs_cache.c Plug a name cache lock leak. 2017-12-01 22:51:02 +00:00
vfs_cluster.c Detect and optimize reads from the hole on UFS. 2018-05-13 09:47:28 +00:00
vfs_default.c Include error number in the "fsync: giving up on dirty" message 2018-02-23 21:57:10 +00:00
vfs_export.c Reverse the check to allocate the buffer if cached pointer is NULL. 2017-12-23 17:55:19 +00:00
vfs_extattr.c Reduce duplication in extattr_*_(file|link) syscalls. 2018-02-05 19:06:34 +00:00
vfs_hash.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
vfs_init.c Make it easier for filesystems to count themselves as jail-enabled, 2018-05-04 20:54:27 +00:00
vfs_lookup.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
vfs_mount.c Make it easier for filesystems to count themselves as jail-enabled, 2018-05-04 20:54:27 +00:00
vfs_mountroot.c Remove Giant from init creation and vfs_mountroot. 2018-03-21 14:46:54 +00:00
vfs_subr.c Make it easier for filesystems to count themselves as jail-enabled, 2018-05-04 20:54:27 +00:00
vfs_syscalls.c Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
vfs_vnops.c In vn_io_fault1(), reduce the scope where pagefaults are disabled. 2018-03-24 13:13:52 +00:00
vnode_if.src Use long for the last argument to VOP_PATHCONF rather than a register_t. 2018-01-17 22:36:58 +00:00