OpenBSD CVS

CVS log for src/sys/uvm/uvm_vnode.h


[BACK] Up to [local] / src / sys / uvm

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.21 / (download) - annotate - [select for diffs], Thu Oct 20 13:31:52 2022 UTC (19 months, 3 weeks ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.20: +15 -12 lines
Diff to previous 1.20 (colored)

Access to `u_flags' should be serialized by the `vmobjlock'.

This complete previous fix from gnezdo@.  The uvm_vnp_sync() still
requires some love and isn't addressed by this diff.

Document which lock is protecting vnode variables.

ok gnezdo@

Revision 1.20 / (download) - annotate - [select for diffs], Wed Sep 21 07:32:59 2022 UTC (20 months, 3 weeks ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored)

Revert UVM_VNODE_CANPERSIST removal, it exposes an issue on arm64.

Found the hardway by miod@ and deraadt@.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Sep 10 16:14:36 2022 UTC (21 months ago) by mpi
Branch: MAIN
Changes since 1.18: +1 -2 lines
Diff to previous 1.18 (colored)

Get rid of the extra vnode reference known as UVM_VNODE_CANPERSIST.

Back in the 4.4BSD days the VM subystem had a OBJ_CANPERSIST flag to
enter objects in a global cached list.  Some of this logic seem to have
been copied to UVM but without the global list.

Unfortunately keeping UVM vnode objects alive after munmap(2)ing the
corresponding region without incrementing the reference count of the
related vnode led to many bugs when the vnode was recycled and/or when
it data where written back to disk (via the page daemon).

The problem is that VM pages might have a non-accounted reference to a
vnode via `pg->uobject'.

Fix "vref used where vget required" panic reported by bluhm@, gkoehler@
and Andrew Krasavinseen on bugs@.

Thanks a lot to semarie@ for co-debugging this issue!

Tested by bluhm@, tb@, miod@.

ok kettenis@, semarie@

Revision 1.18 / (download) - annotate - [select for diffs], Tue Oct 12 07:37:42 2021 UTC (2 years, 8 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 (colored)

Revert the fix for the deadlock between uvn_io() and uvn_flush().

This fix (ab)use the vnode lock to serialize access to some fields of
the corresponding pages associated with UVM vnode object and this will
create new deadlocks with the introduction of a per-uobj lock.

ok anton@

Revision 1.17 / (download) - annotate - [select for diffs], Thu Mar 4 08:38:48 2021 UTC (3 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

Bring back previous fix for UVM vnode deadlock.

tb@ reports that refaulting when there's contention on the vnode makes
firefox start very slowly on his machine.  To revisit when the fault
handler will be unlocked.

ok anton@

Original commit message:

Fix a deadlock between uvn_io() and uvn_flush(). While faulting on a
page backed by a vnode, uvn_io() will end up being called in order to
populate newly allocated pages using I/O on the backing vnode. Before
performing the I/O, newly allocated pages are flagged as busy by
uvn_get(), that is before uvn_io() tries to lock the vnode. Such pages
could then end up being flushed by uvn_flush() which already has
acquired the vnode lock. Since such pages are flagged as busy,
uvn_flush() will wait for them to be flagged as not busy. This will
never happens as uvn_io() cannot make progress until the vnode lock is
released.

Instead, grab the vnode lock before allocating and flagging pages as
busy in uvn_get(). This does extend the scope in uvn_get() in which the
vnode is locked but resolves the deadlock.

ok mpi@

Reported-by: syzbot+e63407b35dff08dbee02@syzkaller.appspotmail.com

Revision 1.16 / (download) - annotate - [select for diffs], Tue Mar 2 10:09:20 2021 UTC (3 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.15: +1 -2 lines
Diff to previous 1.15 (colored)

Revert the fix for the deadlock between uvn_io() and uvn_flush().

This fix (ab)use the vnode lock to serialize access to some fields of
the corresponding pages associated with UVM vnode object and this will
create new deadlocks with the introduction of a per-uobj lock.

ok anton@

Revision 1.15 / (download) - annotate - [select for diffs], Mon Oct 26 19:48:19 2020 UTC (3 years, 7 months ago) by anton
Branch: MAIN
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

Fix a deadlock between uvn_io() and uvn_flush(). While faulting on a
page backed by a vnode, uvn_io() will end up being called in order to
populate newly allocated pages using I/O on the backing vnode. Before
performing the I/O, newly allocated pages are flagged as busy by
uvn_get(), that is before uvn_io() tries to lock the vnode. Such pages
could then end up being flushed by uvn_flush() which already has
acquired the vnode lock. Since such pages are flagged as busy,
uvn_flush() will wait for them to be flagged as not busy. This will
never happens as uvn_io() cannot make progress until the vnode lock is
released.

Instead, grab the vnode lock before allocating and flagging pages as
busy in uvn_get(). This does extend the scope in uvn_get() in which the
vnode is locked but resolves the deadlock.

ok mpi@

Reported-by: syzbot+e63407b35dff08dbee02@syzkaller.appspotmail.com

Revision 1.14 / (download) - annotate - [select for diffs], Tue Dec 16 18:30:04 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.13: +5 -4 lines
Diff to previous 1.13 (colored)

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

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jun 29 22:56:31 2014 UTC (9 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.12: +1 -18 lines
Diff to previous 1.12 (colored)

delete a #ifdef _KERNEL chunk protecting userland from an #if 0 chunk

Revision 1.3.4.6 / (download) - annotate - [select for diffs], Thu Mar 28 14:54:27 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.3.4.5: +1 -1 lines
Diff to previous 1.3.4.5 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Merge in -current from roughly a week ago

Revision 1.12 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:19 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, SMP_SYNC_B, SMP_SYNC_A, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

First round of __P removal in sys

Revision 1.3.4.5 / (download) - annotate - [select for diffs], Wed Mar 6 02:17:14 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.3.4.4: +50 -0 lines
Diff to previous 1.3.4.4 (colored) to branchpoint 1.3 (colored)

Merge in trunk

Revision 1.11 / (download) - annotate - [select for diffs], Wed Dec 19 08:58:07 2001 UTC (22 years, 5 months ago) by art
Branch: MAIN
Changes since 1.10: +51 -1 lines
Diff to previous 1.10 (colored)

UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.

We apologise for the inconvenience.

Revision 1.10, Mon Dec 10 02:19:34 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
CVS Tags: UBC_BASE, UBC
Changes since 1.9: +1 -1 lines
FILE REMOVED

Merge in struct uvm_vnode into struct vnode.

Revision 1.3.4.4 / (download) - annotate - [select for diffs], Wed Dec 5 01:23:58 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.3.4.3: +0 -50 lines
Diff to previous 1.3.4.3 (colored) to branchpoint 1.3 (colored)

Merge in -current

Revision 1.9 / (download) - annotate - [select for diffs], Tue Nov 27 05:27:12 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
Changes since 1.8: +1 -51 lines
Diff to previous 1.8 (colored)

Merge in the unified buffer cache code as found in NetBSD 2001/03/10. The
code is written mostly by Chuck Silvers <chuq@chuq.com>/<chs@netbsd.org>.

Tested for the past few weeks by many developers, should be in a pretty stable
state, but will require optimizations and additional cleanups.

Revision 1.3.4.3 / (download) - annotate - [select for diffs], Wed Oct 31 03:32:14 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.3.4.2: +3 -3 lines
Diff to previous 1.3.4.2 (colored) to branchpoint 1.3 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.8 / (download) - annotate - [select for diffs], Mon Aug 6 14:03:05 2001 UTC (22 years, 10 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Add a new type voff_t (right now it's typedefed as off_t) used for offsets
into objects.

Gives the possibilty to mmap beyond the size of vaddr_t.

From NetBSD.

Revision 1.3.4.2 / (download) - annotate - [select for diffs], Mon May 14 22:47:49 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.3.4.1: +6 -2 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.7 / (download) - annotate - [select for diffs], Thu Mar 22 03:05:57 2001 UTC (23 years, 2 months ago) by smart
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Sync style, typo, and comments a little closer to NetBSD.  art@ ok

Revision 1.6 / (download) - annotate - [select for diffs], Fri Mar 9 05:34:38 2001 UTC (23 years, 3 months ago) by smart
Branch: MAIN
Changes since 1.5: +5 -2 lines
Diff to previous 1.5 (colored)

Protect protypes, certain macros, and inlines from userland.  Checked userland
with a 'make build'.  From NetBSD.  art@ ok

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 29 02:07:52 2001 UTC (23 years, 4 months ago) by niklas
Branch: MAIN
Changes since 1.4: +1 -0 lines
Diff to previous 1.4 (colored)

$OpenBSD$

Revision 1.3.4.1 / (download) - annotate - [select for diffs], Fri Mar 24 09:09:52 2000 UTC (24 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

Sync with -current

Revision 1.4 / (download) - annotate - [select for diffs], Wed Mar 15 15:50:22 2000 UTC (24 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

Fix the NetBSD id strings.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Aug 23 08:13:25 1999 UTC (24 years, 9 months ago) by art
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6
Branch point for: SMP
Changes since 1.2: +0 -5 lines
Diff to previous 1.2 (colored)

sync with NetBSD from 1999.05.24 (there is a reason for this date)
 Mostly cleanups, but also a few improvements to pagedaemon for better
 handling of low memory and/or low swap conditions.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 26 05:32:08 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.1: +1 -0 lines
Diff to previous 1.1 (colored)

add OpenBSD tags

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 26 01:30:18 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN

Import of uvm from NetBSD. Some local changes, some code disabled

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.