History log of /openbsd-src/sys/kern/vfs_sync.c (Results 1 – 25 of 73)
Revision Date Author Comments
# 5a0ec814 18-Oct-2024 miod <miod@openbsd.org>

Put the bowels of the various VOP_PRINT routines under
defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
as they won't be used otherwise.

Shaves a few bytes off installation kernels.

ok

Put the bowels of the various VOP_PRINT routines under
defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
as they won't be used otherwise.

Shaves a few bytes off installation kernels.

ok kn@ semarie@

show more ...


# aa47c49a 13-May-2024 semarie <semarie@openbsd.org>

vfs: VOP_REMOVE: move vnode unlocking and ref dropping to FS-indep part

while here, ensure all vop_remove field are set, and always call the function.

the change is very conservative: it only adds

vfs: VOP_REMOVE: move vnode unlocking and ref dropping to FS-indep part

while here, ensure all vop_remove field are set, and always call the function.

the change is very conservative: it only adds vnode ref drop/unlock where it was
absent because it should be unreachable (and if it wasn't, it should fix
things).

ok miod@

show more ...


# 6e85720a 12-May-2024 semarie <semarie@openbsd.org>

vfs: struct vops: show all members, even if NULL

In order to help code maintenance, explicitly add all `struct vops` members with
the current value (if not present, it is NULL), still using the C99

vfs: struct vops: show all members, even if NULL

In order to help code maintenance, explicitly add all `struct vops` members with
the current value (if not present, it is NULL), still using the C99 notation.

ok miod@

show more ...


# 81fb472f 03-Feb-2024 beck <beck@openbsd.org>

Remove Softdep.

Softdep has been a no-op for some time now, this removes it to get
it out of the way.

Flensing mostly done in Talinn, with some help from krw@

ok deraadt@


# 4f92c6a3 25-May-2023 claudio <claudio@openbsd.org>

Do not use wakeup_proc() outside of the sleep machinery. Just use
wakeup_one().
OK mpi@


# 0d280c5f 14-Aug-2022 jsg <jsg@openbsd.org>

remove unneeded includes in sys/kern
ok mpi@ miod@


# 413a7ab5 15-Oct-2021 semarie <semarie@openbsd.org>

vnode: remove vop_generic_{,is,un}lock stub functions

These functions are only stubs (returning 0). Replace them with nullop
function (same behaviour). There is no intented behaviour changes.

While

vnode: remove vop_generic_{,is,un}lock stub functions

These functions are only stubs (returning 0). Replace them with nullop
function (same behaviour). There is no intented behaviour changes.

While here, reorder some vop_islocked member in structs to be next
others vop_{,un}lock members.

ok visa@

show more ...


# 4ea72498 15-Jun-2021 dlg <dlg@openbsd.org>

factor out nsecuptime and getnsecuptime.

these functions were implemented in a bunch of places with comments
saying it should be moved to kern_tc.c when more pop up, and i was
about to add another o

factor out nsecuptime and getnsecuptime.

these functions were implemented in a bunch of places with comments
saying it should be moved to kern_tc.c when more pop up, and i was
about to add another one. i think it's time to move them to kern_tc.c.

ok cheloa@ jmatthew@

show more ...


# 59ca1c10 14-Jan-2021 cheloha <cheloha@openbsd.org>

syncer_thread: sleep without lbolt

The syncer_thread() uses lbolt to perform periodic execution. We can
do this without lbolt.

- Adding a local wakeup(9) channel (syncer_chan) and sleep on it.

-

syncer_thread: sleep without lbolt

The syncer_thread() uses lbolt to perform periodic execution. We can
do this without lbolt.

- Adding a local wakeup(9) channel (syncer_chan) and sleep on it.

- Use a local copy of getnsecuptime() to get 1/hz resolution for time
measurements. This is much better than using gettime(9), which is
wholly unsuitable for this use case. Measure how long we spend in
the loop and use this to calculate how long to sleep until the next
execution.

NB: getnsecuptime() is probably ready to be moved to kern_tc.c and
documented.

- Using the system uptime instead of the UTC time avoids issues with
time jumps.

ok mpi@

show more ...


# 3209772d 24-Jun-2020 cheloha <cheloha@openbsd.org>

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t. However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.

This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel. Similarly, time_uptime(9) is replaced
with getuptime(9).

There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.

There is no performance cost on 64-bit (__LP64__) platforms.

With input from visa@, dlg@, and tedu@.

Several bugs squashed by visa@.

ok kettenis@

show more ...


# 2d6b9e38 20-Jan-2020 claudio <claudio@openbsd.org>

struct vops is not modified during runtime so use const which moves each
into read-only data segment.
OK deraadt@ tedu@


# 9566af89 16-Jan-2020 mpi <mpi@openbsd.org>

Introduce wakeup_proc() a function to un-SSTOP/SSLEEP a thread.

This moves most of the SCHED_LOCK() related to protecting the sleepqueue
and its states to kern/kern_sync.c

Name suggestion from jsg@

Introduce wakeup_proc() a function to un-SSTOP/SSLEEP a thread.

This moves most of the SCHED_LOCK() related to protecting the sleepqueue
and its states to kern/kern_sync.c

Name suggestion from jsg@, ok kettenis@, visa@

show more ...


# 668db6ef 08-Dec-2019 mpi <mpi@openbsd.org>

Convert infinite sleeps to tsleep_nsec(9).

ok visa@, jca@


# 643e3253 13-Aug-2018 visa <visa@openbsd.org>

Simplify the startup of the cleaner, reaper and update threads by
passing the main function directly to kthread_create(9). The start_*
functions are mere stepping stones nowadays and can be pruned.
T

Simplify the startup of the cleaner, reaper and update threads by
passing the main function directly to kthread_create(9). The start_*
functions are mere stepping stones nowadays and can be pruned.
They used to contain more logic in the pre-kthread era.

While here, set `cleanerproc' and `syncerproc' during the thread
creation rather than expect the threads to set the proc pointer.
Also, rename `sched_sync' to `syncer_thread' to reduce confusion
with the scheduler-related functions.

OK kettenis@, deraadt@, mpi@

show more ...


# 08107a0b 27-May-2018 visa <visa@openbsd.org>

Drop unnecessary `p' parameter from vget(9).

OK mpi@


# 36bb23f1 28-Apr-2018 visa <visa@openbsd.org>

Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is always
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.

OK mpi@, deraadt@


# 976e9839 10-Feb-2018 deraadt <deraadt@openbsd.org>

Syncronize filesystems to disk when suspending. Each mountpoint's vnodes
are pushed to disk. Dangling vnodes (unlinked files still in use) and
vnodes undergoing change by long-running syscalls are

Syncronize filesystems to disk when suspending. Each mountpoint's vnodes
are pushed to disk. Dangling vnodes (unlinked files still in use) and
vnodes undergoing change by long-running syscalls are identified -- and
such filesystems are marked dirty on-disk while we are suspended (in case
power is lost, a fsck will be required). Filesystems without dangling or
busy vnodes are marked clean, resulting in faster boots following
"battery died" circumstances.
Tested by numerous developers, thanks for the feedback.

show more ...


# 9b1ed563 14-Feb-2017 mpi <mpi@openbsd.org>

Convert most of the manual checks for CPU hogging to sched_pause().

The distinction between preempt() and yield() stays as it is usueful
to know if a thread decided to yield by itself or if the kern

Convert most of the manual checks for CPU hogging to sched_pause().

The distinction between preempt() and yield() stays as it is usueful
to know if a thread decided to yield by itself or if the kernel told
him to go away.

ok tedu@, guenther@

show more ...


# 937fcae7 19-Mar-2016 natano <natano@openbsd.org>

Remove the unused flags argument from VOP_UNLOCK().

torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt


# 21dab745 14-Mar-2015 jsg <jsg@openbsd.org>

Remove some includes include-what-you-use claims don't
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@


# fde894e5 16-Dec-2014 tedu <tedu@openbsd.org>

primary change: move uvm_vnode out of vnode, keeping only a pointer.
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and

primary change: move uvm_vnode out of vnode, keeping only a pointer.
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt

show more ...


# 574e7ffd 09-Sep-2014 blambert <blambert@openbsd.org>

Make the cleaner, syncer, pagedaemon, aiodone daemons all
yield() if the cpu is marked SHOULDYIELD.

ok miod@ tedu@ phessler@


# 38032d1e 02-Jul-2013 guenther <guenther@openbsd.org>

Use time_t for storing time_t values, duh

ok deraadt@


# c89ed189 05-Apr-2011 thib <thib@openbsd.org>

Every single vop_default is set to eopnotsupp, so retire it
and return EOPNOTSUPP directly from the VOP_* functions.

Filesystems should, at some point fill in every function
in the vop_default struc

Every single vop_default is set to eopnotsupp, so retire it
and return EOPNOTSUPP directly from the VOP_* functions.

Filesystems should, at some point fill in every function
in the vop_default struct so we can get rid of the 'if'
statements in VOP_*.

show more ...


# dc81e71a 21-Dec-2010 thib <thib@openbsd.org>

Bring back the "End the VOP experiment." diff, naddy's issues where
unrelated, and his alpha is much happier now.

OK deraadt@


123