Commit Graph

15 Commits

Author SHA1 Message Date
hannken 872808dec2 Move the diagnostic check for a missing VOP_CLOSE() to the top of vrelel().
As long as we hold the vnode interlock there is no chance for this vnode
to gain new references.

Fixes false alarms observed by Thor Lancelot Simon and reported on tech-kern.

Ok: David Holland <dholland@netbsd.org>
2011-12-20 16:49:37 +00:00
hannken 34f54c83be As vnalloc() always allocates with PR_WAITOK there is no longer the need
to test its result for NULL.
2011-10-07 09:35:04 +00:00
hannken 15b3d123ae As getnewvnode() is prepared to wait for an allocation change vnalloc()
to always use PR_WAITOK.

No more 'WARNING: unable to allocate new vnode, retrying...' messages.
2011-10-03 10:30:13 +00:00
hannken cafde4eb6a The path getnewvnode()->getcleanvnode()->vclean()->VOP_LOCK() will panic
if the vnode we want to clean is a layered vnode and the caller already
locked its lower vnode.

Change getnewvnode() to always allocate a fresh vnode and add a helper
thread (vdrain) to keep the number of allocated vnodes within desiredvnodes.

Rename getcleanvnode() to cleanvnode() and let it take a vnode from the
lists, clean and free it.

Reviewed by: David Holland <dholland@netbsd.org>

Should fix:
PR #19110 (nullfs mounts over NFS cause lock manager problems)
PR #34102 (ffs panic in NetBSD 3.0_STABLE)
PR #45115 (lock error panic when build.sh*3 and daily script is running)
PR #45355 (Reader/writer lock error:  rw_vector_enter: locking against myself)
2011-10-02 13:00:06 +00:00
christos 3fca869442 rename vpanic() to vnpanic() and make it varyadic. While there, fix the
broken formats, always call panic() from vnpanic() and make all the calls
use vnpanic(). We only call vprint() on DIAGNOSTIC now.
2011-09-29 20:51:38 +00:00
christos c20851872a Check for v_type before v_rdev because it is cheaper and safer. 2011-09-01 09:04:08 +00:00
rmind e225b7bd09 Welcome to 5.99.53! Merge rmind-uvmplock branch:
- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
2011-06-12 03:35:36 +00:00
rmind 5b686f3960 Add some general description of vnode life-cycle. 2011-05-19 03:26:06 +00:00
rmind 4a4e52516e Remove cache_purge(9) calls from reclamation routines in the file systems,
as vclean(9) performs it for us since Lite2 merge.
2011-05-19 03:11:55 +00:00
rmind f132c365c0 Sprinkle __cacheline_aligned and __read_mostly. 2011-05-13 22:16:43 +00:00
rmind 3b0d20a4ad getcleanvnode: make static, add few comments, convert checks to asserts. 2011-04-04 02:46:57 +00:00
rmind 05bae7a216 KNF, slightly improve few comments. 2011-04-02 07:33:49 +00:00
rmind 8be41a9351 vfs_drainvnodes: drop lwp argument, remove variable name in prototype. 2011-04-02 05:07:56 +00:00
rmind 6fe40e04a2 - Move vrele_list flush notify code into vrele_flush() routine.
- Make some structures static.
2011-04-02 04:45:24 +00:00
rmind fbc8beae75 Split off parts of vfs_subr.c into vfs_vnode.c and vfs_mount.c modules.
No functional change.  Discussed on tech-kern@.
2011-04-02 04:28:56 +00:00