The NetBSD Project

CVS log for src/sys/kern/vfs_cache.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.156 / (download) - annotate - [select for diffs], Mon Oct 2 21:50:18 2023 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.155: +9 -9 lines
Diff to previous 1.155 (colored) to selected 1.56 (colored)

Tweak a couple of comments.

Revision 1.155 / (download) - annotate - [select for diffs], Sat Sep 9 18:27:59 2023 UTC (7 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.154: +63 -42 lines
Diff to previous 1.154 (colored) to selected 1.56 (colored)

- Shrink namecache entries to 64 bytes on 32-bit platforms and use 32-bit
  key values there for speed (remains 128 bytes & 64-bits on _LP64).
- Comments.

Revision 1.154 / (download) - annotate - [select for diffs], Sat Apr 29 10:07:22 2023 UTC (11 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.153: +2 -4 lines
Diff to previous 1.153 (colored) to selected 1.56 (colored)

vfs(9): Move SDT_PROVIDER_DEFINE(vfs) from vfs_cache.c to vfs_init.c.

Not a namecache-specific thing.

Revision 1.153 / (download) - annotate - [select for diffs], Sun Apr 9 09:18:09 2023 UTC (12 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.152: +8 -5 lines
Diff to previous 1.152 (colored) to selected 1.56 (colored)

kern: KASSERT(A && B) -> KASSERT(A); KASSERT(B)

Revision 1.152 / (download) - annotate - [select for diffs], Mon Nov 1 21:28:03 2021 UTC (2 years, 5 months ago) by andvar
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.151: +3 -3 lines
Diff to previous 1.151 (colored) to selected 1.56 (colored)

fix typos, mainly in words minimum and maximum, but also few others.

Revision 1.151 / (download) - annotate - [select for diffs], Tue Sep 21 14:56:08 2021 UTC (2 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.150: +5 -4 lines
Diff to previous 1.150 (colored) to selected 1.56 (colored)

don't opencode kauth_cred_get()

Revision 1.150 / (download) - annotate - [select for diffs], Wed Jul 21 06:35:45 2021 UTC (2 years, 8 months ago) by skrll
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.149: +3 -2 lines
Diff to previous 1.149 (colored) to selected 1.56 (colored)

need <sys/param.h> for COHERENCY_UNIT

Minor KNF along the way.

Revision 1.149 / (download) - annotate - [select for diffs], Sat Dec 12 18:41:13 2020 UTC (3 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.148: +4 -3 lines
Diff to previous 1.148 (colored) to selected 1.56 (colored)

Be more clear and don't rely on cur being the first member.

Revision 1.148 / (download) - annotate - [select for diffs], Sat Dec 12 18:35:59 2020 UTC (3 years, 4 months ago) by uwe
Branch: MAIN
Changes since 1.147: +3 -4 lines
Diff to previous 1.147 (colored) to selected 1.56 (colored)

vfs_cache - do not write outside allocated memory.

In cache_cpu_init allocate struct nchcpu, not struct nchstats_percpu.
cache_update_stats expects the former (that contains two percpu
structs).  Stat updates where smashing whatever was in the next pool
allocation.

Reported by martin@ as crashes in ptyfs on Krups.

Revision 1.147 / (download) - annotate - [select for diffs], Thu Jun 4 03:08:33 2020 UTC (3 years, 10 months ago) by riastradh
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.146: +7 -7 lines
Diff to previous 1.146 (colored) to selected 1.56 (colored)

Nix trailing whitespace.  NFCI.

Revision 1.146 / (download) - annotate - [select for diffs], Sat May 30 20:16:14 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.145: +66 -0 lines
Diff to previous 1.145 (colored) to selected 1.56 (colored)

A couple of small changes to lookup that cut 5-10% system time from
"build.sh release" on my test system:

- Crossing mount points during lookup is slow because the set up for, and
  act of doing VFS_ROOT() is quite involved.  Use the name cache to help
  with this.  Cache an "impossible" zero-length name with covered vnodes,
  that points to the root of the file system mounted there.  Use it to cross
  mounts.  When cache_purge() is called on either of the vnodes involved the
  cache entry will disappear.  All of the needed calls for that are already
  in place (vnode reclaim, unmount, etc).

- In lookup_fastforward(), if the the last component has been found and the
  parent directory (searchdir) is not going to be returned, then don't get a
  reference to it.

Revision 1.145 / (download) - annotate - [select for diffs], Sat May 30 18:06:17 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.144: +40 -25 lines
Diff to previous 1.144 (colored) to selected 1.56 (colored)

cache_lookup_linked():

- If the lookup fails return with the same lock held.  There's no bug here
  because either parent or child's lock is sufficient to prevent both from
  disappearing into thin air, but may as well be correct.

- if FSCRED is passed in then skip the auth check.

Revision 1.144 / (download) - annotate - [select for diffs], Tue May 26 18:38:37 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.143: +4 -10 lines
Diff to previous 1.143 (colored) to selected 1.56 (colored)

Make vcache_tryvget() lockless.  Reviewed by hannken@.

Revision 1.143 / (download) - annotate - [select for diffs], Sat May 16 18:31:50 2020 UTC (3 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.142: +8 -8 lines
Diff to previous 1.142 (colored) to selected 1.56 (colored)

Add ACL support for FFS. From FreeBSD.

Revision 1.142 / (download) - annotate - [select for diffs], Tue May 12 23:17:41 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.141: +26 -17 lines
Diff to previous 1.141 (colored) to selected 1.56 (colored)

cache_enter_id(): give it a boolean parameter to indicate whether the cached
identity is valid.

Revision 1.141 / (download) - annotate - [select for diffs], Thu Apr 23 22:58:36 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.140: +4 -8 lines
Diff to previous 1.140 (colored) to selected 1.56 (colored)

cache_lookup_linked(): We can't use the name to decide how to lock the dir,
since the name refers to the child (found object) not the parent (the thing
that's being locked).

Fix it by always doing rw_tryenter().  There's not much to be won by
optimising for the contended case, and were this routine doing lockless
lookups (the eventual goal) it wouldn't be hanging around waiting for
changes either.

Revision 1.140 / (download) - annotate - [select for diffs], Wed Apr 22 21:35:52 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.139: +11 -4 lines
Diff to previous 1.139 (colored) to selected 1.56 (colored)

lookup_fastforward(): handle dotdot lookups and give up less often in
the union mount case.

Revision 1.139 / (download) - annotate - [select for diffs], Mon Apr 13 19:23:18 2020 UTC (4 years ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base1
Changes since 1.138: +3 -3 lines
Diff to previous 1.138 (colored) to selected 1.56 (colored)

Replace most uses of vp->v_usecount with a call to vrefcnt(vp), a function
that hides the details and does atomic_load_relaxed().  Signature matches
FreeBSD.

Revision 1.138 / (download) - annotate - [select for diffs], Fri Apr 10 16:55:40 2020 UTC (4 years ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200411
Changes since 1.137: +5 -5 lines
Diff to previous 1.137 (colored) to selected 1.56 (colored)

Cosmetic changes

Revision 1.137 / (download) - annotate - [select for diffs], Sat Apr 4 20:49:30 2020 UTC (4 years ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.136: +2 -6 lines
Diff to previous 1.136 (colored) to selected 1.56 (colored)

Merge the remaining changes from the ad-namecache branch, affecting namei()
and getcwd():

- push vnode locking back as far as possible.
- do most lookups directly in the namecache, avoiding vnode locks & refs.
- don't block new refs to vnodes across VOP_INACTIVE().
- get shared locks for VOP_LOOKUP() if the file system supports it.
- correct lock types for VOP_ACCESS() / VOP_GETATTR() in a few places.

Possible future enhancements:

- make the lookups lockless.
- support dotdot lookups by being lockless and inferring absence of chroot.
- maybe make it work for layered file systems.
- avoid vnode references at the root & cwd.

Revision 1.136 / (download) - annotate - [select for diffs], Mon Mar 30 19:15:28 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.135: +10 -10 lines
Diff to previous 1.135 (colored) to selected 1.56 (colored)

cache_lookup(): fix a use-after-free.

Revision 1.135 / (download) - annotate - [select for diffs], Fri Mar 27 00:14:25 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.134: +20 -19 lines
Diff to previous 1.134 (colored) to selected 1.56 (colored)

- Stats: add a cast to make sure 32-bit wraparound works properly.
- cache_purge_children(): just use RB_TREE_MIN().
- Change the name of the pool to "namecache".
- Update comments.

Revision 1.134 / (download) - annotate - [select for diffs], Mon Mar 23 20:02:13 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.133: +15 -12 lines
Diff to previous 1.133 (colored) to selected 1.56 (colored)

cache_remove(): remove from the vnode list first, so cache_revlookup()
doesn't try to re-activate an entry no longer on the LRU list.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Mar 23 19:45:11 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.132: +6 -2 lines
Diff to previous 1.132 (colored) to selected 1.56 (colored)

Oops. Fix merge error.

Revision 1.132 / (download) - annotate - [select for diffs], Mon Mar 23 18:56:14 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.131: +3 -7 lines
Diff to previous 1.131 (colored) to selected 1.56 (colored)

Correct an assertion.

Revision 1.131 / (download) - annotate - [select for diffs], Mon Mar 23 18:41:40 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.130: +41 -68 lines
Diff to previous 1.130 (colored) to selected 1.56 (colored)

- Deal with (rare) hash collisions by using memcmp() to partition further.
- Adjust some comments.

Revision 1.130 / (download) - annotate - [select for diffs], Mon Mar 23 18:37:30 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.129: +27 -30 lines
Diff to previous 1.129 (colored) to selected 1.56 (colored)

Fix a race between cache_enter() and cache_revlookup().

Revision 1.129 / (download) - annotate - [select for diffs], Mon Mar 23 18:33:43 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.128: +9 -9 lines
Diff to previous 1.128 (colored) to selected 1.56 (colored)

Pacify a syzbot complaint about bit shifting.

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

Revision 1.128 / (download) - annotate - [select for diffs], Sun Mar 22 14:38:37 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.127: +953 -813 lines
Diff to previous 1.127 (colored) to selected 1.56 (colored)

Merge vfs_cache.c from the ad-namecache branch.  With this the namecache
index becomes per-directory (initially, a red-black tree).  The remaining
changes on the branch to namei()/getcwd() will be merged in the future.

Revision 1.127 / (download) - annotate - [select for diffs], Wed Jan 8 12:04:56 2020 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1
Changes since 1.126: +72 -62 lines
Diff to previous 1.126 (colored) to selected 1.56 (colored)

- options NAMECACHE_ENTER_REVERSE is no more.

- Partially sort the list of per-vnode namecache entries by using a TAILQ.
  Put the real name to the head, and put dot and dotdot to the tail so that
  cache_lookup_reverse() doesn't have to consider them.

Revision 1.126 / (download) - annotate - [select for diffs], Mon Jan 6 11:22:33 2020 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.125: +24 -81 lines
Diff to previous 1.125 (colored) to selected 1.56 (colored)

Kill ncvhashtbl.  It uses 64MB on my computer to map: vp -> vp (lol!).

Revision 1.125 / (download) - annotate - [select for diffs], Sun Dec 1 18:31:19 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.124: +135 -178 lines
Diff to previous 1.124 (colored) to selected 1.56 (colored)

Back out previous temporarily - seeing unusual lookup failures.  Will
come back to it.

Revision 1.124 / (download) - annotate - [select for diffs], Sun Dec 1 13:39:53 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.123: +180 -137 lines
Diff to previous 1.123 (colored) to selected 1.56 (colored)

namecache changes:

- Delete the per-entry lock, and borrow the associated vnode's v_interlock
  instead.  We need to acquire it during lookup anyway.  We can revisit this
  in the future but for now it's a stepping stone, and works within the
  quite limited context of what we have (BSD namecache/lookup design).

- Implement an idea that Mateusz Guzik (mjg@FreeBSD.org) gave me.  In
  cache_reclaim(), we don't need to lock out all of the CPUs to garbage
  collect entries.  All we need to do is observe their locks unheld at least
  once: then we know they are not in the critical section, and no longer
  have visibility of the entries about to be garbage collected.

- The above makes it safe for sysctl to take only namecache_lock to get stats,
  and we can remove all the crap dealing with per-CPU locks.

- For lockstat, make namecache_lock a static now we have __cacheline_aligned.

- Avoid false sharing - don't write back to nc_hittime unless it has changed.
  Put a a comment in place explaining this.  Pretty sure this was there in
  2008/2009 but someone removed it (understandably, the code looks weird).

- Use a mutex to protect the garbage collection queue instead of atomics, and
  adjust the low water mark up so that cache_reclaim() isn't doing so much
  work at once.

Revision 1.123 / (download) - annotate - [select for diffs], Sun Sep 15 17:37:25 2019 UTC (4 years, 7 months ago) by maya
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.122: +3 -3 lines
Diff to previous 1.122 (colored) to selected 1.56 (colored)

More indentation

Revision 1.122 / (download) - annotate - [select for diffs], Sun Sep 15 17:36:43 2019 UTC (4 years, 7 months ago) by maya
Branch: MAIN
Changes since 1.121: +4 -3 lines
Diff to previous 1.121 (colored) to selected 1.56 (colored)

indentation and whitespace

Revision 1.121 / (download) - annotate - [select for diffs], Fri Sep 13 14:01:33 2019 UTC (4 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.120: +16 -11 lines
Diff to previous 1.120 (colored) to selected 1.56 (colored)

- expose the now hidden namecache
- compare with USHRT_MAX since the max length grew (we could make it NAME_MAX)
- use kmem_alloc for entries > NCHNAMLEN so the namecache contains all
  possible entries.

Revision 1.120 / (download) - annotate - [select for diffs], Sat Mar 18 22:36:56 2017 UTC (7 years, 1 month ago) by riastradh
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20190609, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, isaki-audio2-base, isaki-audio2, bouyer-socketcan-base1
Branch point for: phil-wifi
Changes since 1.119: +44 -2 lines
Diff to previous 1.119 (colored) to selected 1.56 (colored)

Summarize lifetime of cache entries.

Revision 1.119 / (download) - annotate - [select for diffs], Sat Mar 18 22:04:52 2017 UTC (7 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.118: +2 -3 lines
Diff to previous 1.118 (colored) to selected 1.56 (colored)

Omit duplicate forward declaration of cache_invalidate.

Revision 1.118 / (download) - annotate - [select for diffs], Sat Mar 18 22:02:11 2017 UTC (7 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.117: +8 -3 lines
Diff to previous 1.117 (colored) to selected 1.56 (colored)

Fix lock order statement.  Annotate with references to examples.

Revision 1.117 / (download) - annotate - [select for diffs], Sat Mar 18 21:03:28 2017 UTC (7 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.116: +81 -57 lines
Diff to previous 1.116 (colored) to selected 1.56 (colored)

Rework namecache locking commentary.

- Annotate struct namecache declaration in namei.src/namei.h.
- Bulleted lists, not walls of texts.
- Identify lock order too.
- Note subtle exceptions.

Revision 1.116 / (download) - annotate - [select for diffs], Sat Mar 18 20:01:44 2017 UTC (7 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.115: +4 -4 lines
Diff to previous 1.115 (colored) to selected 1.56 (colored)

Nix trailing whitespace.

Revision 1.115 / (download) - annotate - [select for diffs], Sat Mar 18 20:00:10 2017 UTC (7 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.114: +14 -14 lines
Diff to previous 1.114 (colored) to selected 1.56 (colored)

Sort #includes.

Revision 1.114 / (download) - annotate - [select for diffs], Sat Mar 18 19:59:20 2017 UTC (7 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.113: +2 -5 lines
Diff to previous 1.113 (colored) to selected 1.56 (colored)

Omit vestigial comment.

- We have not dropped the cache entry on vget failure since 2008.
- We have not had `generation numbers' since 2001.

Revision 1.113 / (download) - annotate - [select for diffs], Sat Mar 18 19:43:31 2017 UTC (7 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.112: +21 -20 lines
Diff to previous 1.112 (colored) to selected 1.56 (colored)

Make cache_lookup return bool for clarity.

Revision 1.112 / (download) - annotate - [select for diffs], Wed Jan 11 09:04:37 2017 UTC (7 years, 3 months ago) by hannken
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.111: +8 -8 lines
Diff to previous 1.111 (colored) to selected 1.56 (colored)

Move vnode members v_dnclist and v_nclist as vi_dnclist and
vi_nclist to vnode_impl.h.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Jan 2 10:33:28 2017 UTC (7 years, 3 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107
Changes since 1.110: +10 -10 lines
Diff to previous 1.110 (colored) to selected 1.56 (colored)

Rename vget() to vcache_vget() and vcache_tryvget() respectively and
move the definitions to sys/vnode_impl.h.

No functional change intended.

Welcome to 7.99.54

Revision 1.110 / (download) - annotate - [select for diffs], Thu Jul 7 06:55:43 2016 UTC (7 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored) to selected 1.56 (colored)

KNF. Remove extra spaces. No functional change.

Revision 1.109 / (download) - annotate - [select for diffs], Sat Dec 5 05:23:35 2015 UTC (8 years, 4 months ago) by dholland
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.108: +5 -6 lines
Diff to previous 1.108 (colored) to selected 1.56 (colored)

Fix lying comment.

Revision 1.108 / (download) - annotate - [select for diffs], Fri Oct 2 16:54:15 2015 UTC (8 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.107: +51 -2 lines
Diff to previous 1.107 (colored) to selected 1.56 (colored)

Change SDT (Statically Defined Tracing) probes to use link sets so that it
is easier to add probes. (From FreeBSD)

Revision 1.107 / (download) - annotate - [select for diffs], Mon Aug 24 22:50:32 2015 UTC (8 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.106: +4 -2 lines
Diff to previous 1.106 (colored) to selected 1.56 (colored)

to garnish, dust with _KERNEL_OPT

Revision 1.106 / (download) - annotate - [select for diffs], Mon Apr 20 13:44:16 2015 UTC (9 years ago) by riastradh
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.105: +5 -5 lines
Diff to previous 1.105 (colored) to selected 1.56 (colored)

Make vget always return vnode unlocked.

Convert callers who want locks to use vn_lock afterward.

Add extra argument so the compiler will report stragglers.

Revision 1.105 / (download) - annotate - [select for diffs], Fri Jan 16 20:10:25 2015 UTC (9 years, 3 months ago) by dennis
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.104: +3 -3 lines
Diff to previous 1.104 (colored) to selected 1.56 (colored)

Add a membar_datadep_consumer() before dereferencing the pointer
to a cache entry in cache_lookup_entry().  The entries are being
added to the list it is looking at without mutually-exclusive locking,
so this is necessary to keep some Alphas from seeing stale data
when the pointer is newly-updated.

XXX this is doing lockless adds to a list maintained with LIST_* macros.

Revision 1.104 / (download) - annotate - [select for diffs], Sun Jan 4 19:31:00 2015 UTC (9 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.103: +12 -4 lines
Diff to previous 1.103 (colored) to selected 1.56 (colored)

initialize sysctl node from init() instead of via linkset

Revision 1.103 / (download) - annotate - [select for diffs], Wed Dec 24 20:01:21 2014 UTC (9 years, 3 months ago) by dennis
Branch: MAIN
Changes since 1.102: +175 -85 lines
Diff to previous 1.102 (colored) to selected 1.56 (colored)

Update stats-keeping in sys/kern/vfs_cache.c to remove (most)
races while allowing consistent lockless sampling of the per-cpu
statistics without atomic operations.  Update comment describing
the locking protocol to include this.

These files were fumble-fingered out of the last commit.

Revision 1.102 / (download) - annotate - [select for diffs], Sun Dec 7 22:23:38 2014 UTC (9 years, 4 months ago) by dennis
Branch: MAIN
Changes since 1.101: +45 -37 lines
Diff to previous 1.101 (colored) to selected 1.56 (colored)

Take 2.  Do a fairly mechanical reversion of the locking protocol
to that of revision 1.94.  Add a comment documenting my best guess
about the locking requirements in this subsystem.  Don't take locks
solely for the sake of stats counter increments; the locking around
the increment of ->ncs_pass2 and/or ->ncs_2passes caused a deadlock.
Defer fixing stats-keeping to allow this change to be easily backed
out of.

Revision 1.101 / (download) - annotate - [select for diffs], Wed Dec 3 01:30:32 2014 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.100: +52 -83 lines
Diff to previous 1.100 (colored) to selected 1.56 (colored)

Reverts previous: Causes all processes to hang in tstile in rw_lock from
genfs_lock during a make -j 20 build

Revision 1.100 / (download) - annotate - [select for diffs], Sun Nov 30 04:11:03 2014 UTC (9 years, 4 months ago) by dennis
Branch: MAIN
Changes since 1.99: +85 -54 lines
Diff to previous 1.99 (colored) to selected 1.56 (colored)

Do a fairly mechanical reversion of the locking protocol to that
of revision 1.97.  Add a comment documenting my best guess about
the locking requirements in this subsystem.  Leave the locks
taken solely for stats counter increments in place for now; they
should ultimately go but that is a bigger change.

Revision 1.99 / (download) - annotate - [select for diffs], Mon Jun 16 12:28:10 2014 UTC (9 years, 10 months ago) by joerg
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: nick-nhusb
Changes since 1.98: +10 -4 lines
Diff to previous 1.98 (colored) to selected 1.56 (colored)

Require the actual namecache_look around cache_lookup_entry.
Add one last case of missing stat locking.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Jun 14 16:12:34 2014 UTC (9 years, 10 months ago) by joerg
Branch: MAIN
Changes since 1.97: +20 -10 lines
Diff to previous 1.97 (colored) to selected 1.56 (colored)

Make the stat mutex a leaf. XXX Use atomic counters.

Revision 1.97 / (download) - annotate - [select for diffs], Tue Jun 3 21:16:15 2014 UTC (9 years, 10 months ago) by joerg
Branch: MAIN
Changes since 1.96: +49 -2 lines
Diff to previous 1.96 (colored) to selected 1.56 (colored)

Provide sysctl for namecache statistics.

Revision 1.96 / (download) - annotate - [select for diffs], Tue Jun 3 19:42:17 2014 UTC (9 years, 10 months ago) by joerg
Branch: MAIN
Changes since 1.95: +19 -12 lines
Diff to previous 1.95 (colored) to selected 1.56 (colored)

Don't play loop games, just enumerate the 10 fields explicitly.

Revision 1.95 / (download) - annotate - [select for diffs], Tue Jun 3 19:30:30 2014 UTC (9 years, 10 months ago) by joerg
Branch: MAIN
Changes since 1.94: +30 -4 lines
Diff to previous 1.94 (colored) to selected 1.56 (colored)

Introduce two helper functions to centralise the namecache statistics
in vfs_cache.c. Use consistent locking around the per-cpu data.

Revision 1.94 / (download) - annotate - [select for diffs], Fri Feb 7 15:29:22 2014 UTC (10 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.93: +2 -24 lines
Diff to previous 1.93 (colored) to selected 1.56 (colored)

Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31

Revision 1.93 / (download) - annotate - [select for diffs], Mon Jan 20 07:47:22 2014 UTC (10 years, 3 months ago) by hannken
Branch: MAIN
Changes since 1.92: +4 -4 lines
Diff to previous 1.92 (colored) to selected 1.56 (colored)

Change cache_prune() to test for end-of-list before testing for an
invalid entry.  Prevents a lifelock when the end-of-list marker
gets invalid while scanning the list and all entries are recent.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Oct 29 09:53:51 2013 UTC (10 years, 5 months ago) by hannken
Branch: MAIN
Changes since 1.91: +38 -53 lines
Diff to previous 1.91 (colored) to selected 1.56 (colored)

Vnode API cleanup pass 1.

- Make these defines and functions private to vfs_vnode.c:

  VC_MASK, VC_LOCK, DOCLOSE, VI_IANCTREDO and VI_INACTNOW
  vclean() and vrelel()

- Remove the long time unused lwp argument from vrecycle().

- Remove vtryget(), it is responsible for ugly hacks and doesn't
  look that effective.

Presented on tech-kern.

Welcome to 6.99.25

Revision 1.91 / (download) - annotate - [select for diffs], Mon Nov 5 17:27:39 2012 UTC (11 years, 5 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.90: +35 -33 lines
Diff to previous 1.90 (colored) to selected 1.56 (colored)

Excise struct componentname from the namecache.

This uglifies the interface, because several operations need to be
passed the namei flags and cache_lookup also needs for the time being
to be passed cnp->cn_nameiop. Nonetheless, it's a net benefit.

The glop should be able to go away eventually but requires structural
cleanup elsewhere first.

This change requires a kernel bump.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Nov 5 17:24:11 2012 UTC (11 years, 5 months ago) by dholland
Branch: MAIN
Changes since 1.89: +148 -60 lines
Diff to previous 1.89 (colored) to selected 1.56 (colored)

Disentangle the namecache from the internals of namei.

 - Move the namecache's hash computation to inside the namecache code,
instead of being spread out all over the place. Remove cn_hash from
struct componentname and delete all uses of it.

 - It is no longer necessary (if it ever was) for cache_lookup and
cache_lookup_raw to clear MAKEENTRY from cnp->cn_flags for the cases
that cache_enter already checks for.

 - Rearrange the interface of cache_lookup (and cache_lookup_raw) to
make it somewhat simpler, to exclude certain nonexistent error
conditions, and (most importantly) to make it not require write access
to cnp->cn_flags.

This change requires a kernel bump.

Revision 1.89 / (download) - annotate - [select for diffs], Sun Jul 22 00:53:18 2012 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.88: +34 -28 lines
Diff to previous 1.88 (colored) to selected 1.56 (colored)

Move some the test for MAKEENTRY into the cache_enter(9).  Make some
variables in vfs_cache.c static, __read_mostly, etc.

No objection on tech-kern@.

Revision 1.88 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:56 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, netbsd-6
Changes since 1.87: +5 -5 lines
Diff to previous 1.87 (colored) to selected 1.56 (colored)

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.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Jul 21 17:52:12 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: cherry-xenmp
Changes since 1.86: +5 -5 lines
Diff to previous 1.86 (colored) to selected 1.56 (colored)

Make holding v_interlock mandatory for callers of vget().

Announced some time ago on tech-kern.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Jul 21 09:01:36 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.85: +23 -8 lines
Diff to previous 1.85 (colored) to selected 1.56 (colored)

Using cache_revlookup() leads to vnode races as it returns an unreferenced
vnode that may disappear before the caller has a chance to reference it.

Reference the vnode while the name cache is locked.

No objections on tech-kern.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:11 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.84: +3 -3 lines
Diff to previous 1.84 (colored) to selected 1.56 (colored)

Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Feb 18 13:36:11 2009 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, uebayasi-xip-base1, uebayasi-xip-base, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.83: +3 -2 lines
Diff to previous 1.83 (colored) to selected 1.56 (colored)

cache_lookup_entry: add an assertion.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Feb 18 13:24:18 2009 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored) to selected 1.56 (colored)

cache_purge1: consistently unlock ncp a little earlier.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Jan 17 07:02:35 2009 UTC (15 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.81: +2 -4 lines
Diff to previous 1.81 (colored) to selected 1.56 (colored)

malloc -> kmem_alloc.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Jan 16 06:59:21 2009 UTC (15 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored) to selected 1.56 (colored)

cache_prune: use (a - b > 0) rather than (a > b) to compare ticks.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Oct 25 14:20:17 2008 UTC (15 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap
Changes since 1.79: +4 -2 lines
Diff to previous 1.79 (colored) to selected 1.56 (colored)

cache_lookup_raw: update "goodhits" statistics to be less confused.
add an XXX comment.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Oct 25 14:18:18 2008 UTC (15 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.78: +4 -2 lines
Diff to previous 1.78 (colored) to selected 1.56 (colored)

add assertions.

Revision 1.78 / (download) - annotate - [select for diffs], Wed Aug 20 15:34:59 2008 UTC (15 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, matt-mips64-base2, haad-dm-base1
Changes since 1.77: +3 -2 lines
Diff to previous 1.77 (colored) to selected 1.56 (colored)

Release vnode in cache_lookup() error branch if locking fails.

Revision 1.77 / (download) - annotate - [select for diffs], Tue Jun 3 15:50:22 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl
Branch point for: haad-dm
Changes since 1.76: +138 -94 lines
Diff to previous 1.76 (colored) to selected 1.56 (colored)

vfs_cache:

- Don't use goto in critical paths, it can confuse the compiler.
- Sprinkle some branch hints.
- Make namecache stats per-CPU and collate once per second.
- Use vtryget().

Revision 1.76 / (download) - annotate - [select for diffs], Mon May 5 17:11:17 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.75: +10 -12 lines
Diff to previous 1.75 (colored) to selected 1.56 (colored)

- Convert hashinit() to use kmem_alloc(). The hash tables can be large
  and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.

Revision 1.75 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:05 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.74: +2 -9 lines
Diff to previous 1.74 (colored) to selected 1.56 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.74 / (download) - annotate - [select for diffs], Sat Apr 12 17:34:26 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.73: +8 -3 lines
Diff to previous 1.73 (colored) to selected 1.56 (colored)

cache_enter: inline LIST_INSERT_HEAD so that the membar_producer() can be
put in the right spot. The 'next' link in the new entry must become globally
visible before the list head is updated. This could have affected systems
with weak memory ordering like the alpha.

Revision 1.73 / (download) - annotate - [select for diffs], Fri Apr 11 15:25:24 2008 UTC (16 years ago) by ad
Branch: MAIN
Changes since 1.72: +403 -129 lines
Diff to previous 1.72 (colored) to selected 1.56 (colored)

Restructure the name cache code to eliminate most lock contention
resulting from forward lookups. Discussed on tech-kern@.

Revision 1.72 / (download) - annotate - [select for diffs], Sun Nov 11 23:22:25 2007 UTC (16 years, 5 months ago) by matt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, jmcneill-pm-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386, bouyer-xenamd64-base2, bouyer-xenamd64-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.71: +4 -4 lines
Diff to previous 1.71 (colored) to selected 1.56 (colored)

Change some initialization of static queues to compile time.
(xxx_INIT to xxx_HEAD_INITIALIZER).  Drop code which inits
non-auto (global or static) variables to 0 since that's
already implied by being non-auto.  Init some static/global
cpu_simple_locks at compile time.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:25 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.70: +9 -6 lines
Diff to previous 1.70 (colored) to selected 1.56 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:57 2007 UTC (16 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, jmcneill-base, hpcarm-cleanup
Branch point for: mjf-devfs, matt-armv6, jmcneill-pm, bouyer-xenamd64
Changes since 1.69: +6 -6 lines
Diff to previous 1.69 (colored) to selected 1.56 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.69 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:34 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored) to selected 1.56 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.68 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:32 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp, vmlocking
Changes since 1.67: +31 -30 lines
Diff to previous 1.67 (colored) to selected 1.56 (colored)

Merge newlock2 to head.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Dec 9 16:11:51 2006 UTC (17 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, newlock2-nbase, newlock2-base
Changes since 1.66: +3 -31 lines
Diff to previous 1.66 (colored) to selected 1.56 (colored)

a smorgasbord of improvements to vnode locking and path lookup:
 - LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
   these now always return the parent vnode locked.  namei() works as before.
   lookup() and various other paths no longer acquire vnode locks in the
   wrong order via vrele().  fixes PR 32535.
   as a nice side effect, path lookup is also up to 25% faster.
 - the above allows us to get rid of PDIRUNLOCK.
 - also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
 - remove an assumption in layer_node_find() that all file systems implement
   a recursive VOP_LOCK() (unionfs doesn't).
 - require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
   fill in eopnotsupp() for file systems that don't support being exported
   and remove the checks for NULL.  (layerfs calls these without checking.)
 - in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
   adjust which vnode is locked.  fixes PR 33374.
 - apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().

Revision 1.66 / (download) - annotate - [select for diffs], Wed Oct 25 18:56:38 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.65: +4 -2 lines
Diff to previous 1.65 (colored) to selected 1.56 (colored)

enable namecache enter reverse for linux procfs lookups.
XXX: how expensive is that?

Revision 1.65 / (download) - annotate - [select for diffs], Sun Sep 10 05:51:33 2006 UTC (17 years, 7 months ago) by dbj
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored) to selected 1.56 (colored)

make comment match logic in cache_lookup dvp unlock code

Revision 1.64 / (download) - annotate - [select for diffs], Sat Apr 15 04:33:48 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, rpaulo-netinet-merge-pcb-base, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: newlock2
Changes since 1.63: +5 -8 lines
Diff to previous 1.63 (colored) to selected 1.56 (colored)

Coverity CID 602: Remove always true if statement.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Dec 24 19:12:23 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored) to selected 1.56 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:30 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored) to selected 1.56 (colored)

merge ktrace-lwp.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Jun 27 08:50:44 2004 UTC (19 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, thorpej-vnode-attr-base, thorpej-vnode-attr, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, ktrace-lwp-base, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-lazymbuf
Changes since 1.60: +73 -2 lines
Diff to previous 1.60 (colored) to selected 1.56 (colored)

introduce a new function, cache_lookup_raw(), for filesystems which
want more flexible namecache handling.
it just looks up a dnlc entry and vget() the result vnode.
ie. no automatic entry removal, no automatic vnode locking.

discussed on tech-kern@.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Jun 19 18:49:47 2004 UTC (19 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.59: +10 -12 lines
Diff to previous 1.59 (colored) to selected 1.56 (colored)

cache_lookup: avoid to grab two vnode's v_interlock.
just hold a reference (usecount) to a vnode instead.

Revision 1.59 / (download) - annotate - [select for diffs], Fri May 7 12:05:41 2004 UTC (19 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.58: +15 -11 lines
Diff to previous 1.58 (colored) to selected 1.56 (colored)

redo the previous (rev.1.58; overwrite a duplicate entry rather than leave it)
differently so that entries entered during we're doing pool_get() are
checked as well.  pointed by Paul Kranenburg on source-changes@.

Revision 1.58 / (download) - annotate - [select for diffs], Thu May 6 22:02:02 2004 UTC (19 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.57: +12 -13 lines
Diff to previous 1.57 (colored) to selected 1.56 (colored)

cache_enter: when we found a duplicate entry,
simply overwrite it rather than leaving a stale entry.

Revision 1.57 / (download) - annotate - [select for diffs], Sun May 2 12:00:34 2004 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.56: +14 -4 lines
Diff to previous 1.56 (colored)

cache_enter: concurrent lookups in the same directory may race for a
cache entry. Upon detection, free our tentative entry and return.

Revision 1.56 / (download) - annotate - [selected], Sun Apr 25 16:42:41 2004 UTC (19 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.55: +4 -5 lines
Diff to previous 1.55 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Apr 5 10:20:52 2004 UTC (20 years ago) by yamt
Branch: MAIN
Changes since 1.54: +51 -28 lines
Diff to previous 1.54 (colored) to selected 1.56 (colored)

make cache_purge more controlable.
namely, allow following operations.
	- purge only an entry specified by a component name.
	- purge only child entries.
	- purge only parent entries.
no objections on tech-kern@.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Sep 1 12:13:55 2003 UTC (20 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.53: +3 -4 lines
Diff to previous 1.53 (colored) to selected 1.56 (colored)

remove an obsolete comment.  pointed by enami@

Revision 1.53 / (download) - annotate - [select for diffs], Fri Aug 8 20:19:56 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.52: +21 -11 lines
Diff to previous 1.52 (colored) to selected 1.56 (colored)

- make this a bit MP friendly.
  (although no actual changes under the kernel lock)
- remove a test that isn't meaningful anymore.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Aug 8 20:18:19 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.51: +20 -12 lines
Diff to previous 1.51 (colored) to selected 1.56 (colored)

arrange namecache lru before vget (and releasing namecache_slock)
since our namecache entry can go away during we're sleeping on the vnode.

the bug pointed by enami tsugutomo.
tested by Matthias Scheler.
PR/22363.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Aug 7 16:32:01 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.50: +3 -7 lines
Diff to previous 1.50 (colored) to selected 1.56 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Jul 31 15:43:07 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.49: +4 -4 lines
Diff to previous 1.49 (colored) to selected 1.56 (colored)

remove remaining v_id.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Jul 31 15:14:08 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.48: +4 -3 lines
Diff to previous 1.48 (colored) to selected 1.56 (colored)

for NCHASH, obtain bits from the vnode pointer as well
to achieve a better hash distribution.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Jul 31 15:13:05 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored) to selected 1.56 (colored)

when casting a pointer to an integer,
cast it to uintptr_t so that 64-bit archs will be happy.

pointed by Juergen Hannken-Illjes.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Jul 30 12:10:57 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.46: +9 -33 lines
Diff to previous 1.46 (colored) to selected 1.56 (colored)

eliminate v_id.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jul 30 12:09:47 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.45: +58 -24 lines
Diff to previous 1.45 (colored) to selected 1.56 (colored)

maintain the list of namecaches attached to the vnode.
it makes vnodes freeable.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:32 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored) to selected 1.56 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Jun 29 18:43:28 2003 UTC (20 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.43: +4 -4 lines
Diff to previous 1.43 (colored) to selected 1.56 (colored)

Undo part of the ktrace/lwp changes.  In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:58 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.42: +4 -4 lines
Diff to previous 1.42 (colored) to selected 1.56 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.42 / (download) - annotate - [select for diffs], Wed May 21 09:36:06 2003 UTC (20 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.41: +3 -2 lines
Diff to previous 1.41 (colored) to selected 1.56 (colored)

Fix a missing namecache_slock unlock. From Stephan Uphoff.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Mar 2 13:26:22 2003 UTC (21 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored) to selected 1.56 (colored)

... and no need to aqcuire lock while free'ing old hash which no one
refers it.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Feb 20 02:49:51 2003 UTC (21 years, 2 months ago) by jmc
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored) to selected 1.56 (colored)

Move simple_lock after the hashinit's to avoid possible sleeping/malloc'ing
with a simplelock held.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Feb 14 21:39:46 2003 UTC (21 years, 2 months ago) by pk
Branch: MAIN
Changes since 1.38: +41 -9 lines
Diff to previous 1.38 (colored) to selected 1.56 (colored)

Make cache insertion, removal and lookup MP-safe.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:45 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.37: +4 -2 lines
Diff to previous 1.37 (colored) to selected 1.56 (colored)

Add extensible malloc types, adapted from FreeBSD.  This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Sep 4 01:32:47 2002 UTC (21 years, 7 months ago) by matt
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored) to selected 1.56 (colored)

Use the queue macros from <sys/queue.h> instead of referring to the queue
members directly.  Use *_FOREACH whenever possible.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Aug 26 01:21:58 2002 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.35: +5 -5 lines
Diff to previous 1.35 (colored) to selected 1.56 (colored)

Fix signed/unsigned comparison warnings from GCC 3.3.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:42 2002 UTC (22 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.34: +3 -4 lines
Diff to previous 1.34 (colored) to selected 1.56 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Dec 10 01:49:26 2001 UTC (22 years, 4 months ago) by enami
Branch: MAIN
CVS Tags: ifpoll-base
Changes since 1.33: +59 -67 lines
Diff to previous 1.33 (colored) to selected 1.56 (colored)

KNF.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Dec 8 04:09:56 2001 UTC (22 years, 4 months ago) by enami
Branch: MAIN
Changes since 1.32: +8 -10 lines
Diff to previous 1.32 (colored) to selected 1.56 (colored)

Test ".." correctly when creating reverse cache entry.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:36 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.31: +4 -1 lines
Diff to previous 1.31 (colored) to selected 1.56 (colored)

add RCSIDs

Revision 1.31 / (download) - annotate - [select for diffs], Sat Oct 27 04:53:38 2001 UTC (22 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.30: +3 -2 lines
Diff to previous 1.30 (colored) to selected 1.56 (colored)

in cache_lookup(), if we get a cache hit but then fail to vget() the found
vnode, we should not attempt to remove the namecache entry.  this is because
vget() can sleep (eg. if VXLOCK is set because the vnode is being reclaimed),
and so multiple threads can end up in this context at the same time.
if this happens, each thread ends up removing the cache entry, but
the code to remove the entry assumes that the entry is still valid.
so we should just leave the (now stale) entry in the cache.
if another thread finds the entry again before it is reused,
that thread will notice that the entry is stale and remove it safely.
fixes PR 14042.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Sep 24 06:01:13 2001 UTC (22 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.29: +50 -5 lines
Diff to previous 1.29 (colored) to selected 1.56 (colored)

resize the namecache hash table also when desiredvnodes changes.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Mar 29 22:39:23 2001 UTC (23 years ago) by fvdl
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.28: +8 -1 lines
Diff to previous 1.28 (colored) to selected 1.56 (colored)

Depending on the NAMECACHE_ENTER_REVERSE option, always enter reverse
mappings (vnode -> name) in the reverse mapping hash table. Without
this option, there is no change; only directories will be entered to
speed up getcwd. This is an option because it will cause getcwd
to hit longer hash chains, and at the moment its usefulness is
still limited.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Nov 24 07:25:51 2000 UTC (23 years, 4 months ago) by chs
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.27: +28 -1 lines
Diff to previous 1.27 (colored) to selected 1.56 (colored)

add ddb commands "show uvmexp" and "show ncache".
the former used to be "call uvm_dump", the latter is new.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Nov 24 05:02:23 2000 UTC (23 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.26: +9 -15 lines
Diff to previous 1.26 (colored) to selected 1.56 (colored)

change cache_purgevfs() from O(N^2) to O(N).
use queue.h macros where possible.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Nov 8 14:28:13 2000 UTC (23 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.25: +5 -3 lines
Diff to previous 1.25 (colored) to selected 1.56 (colored)

Update for hashinit() change.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Apr 16 21:41:49 2000 UTC (24 years ago) by chs
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored) to selected 1.56 (colored)

change "nextvnodeid" from a global in namei.h to a static in
the one function that uses it.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Apr 16 21:39:57 2000 UTC (24 years ago) by chs
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored) to selected 1.56 (colored)

limit the number of namecache entries to numvnodes rather than desiredvnodes.
getnewvnode() has been changed to virtually guarantee that we'll have more
vnodes than "desired", so previously there would always be more vnodes
than namecache entries.  this fixes PR 9792.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:14 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.22: +7 -7 lines
Diff to previous 1.22 (colored) to selected 1.56 (colored)

Get rid of register declarations.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Mar 23 14:32:41 2000 UTC (24 years, 1 month ago) by soren
Branch: MAIN
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored) to selected 1.56 (colored)

Tiny comment update.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Sep 10 23:24:23 1999 UTC (24 years, 7 months ago) by mycroft
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: thorpej_scsipi
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored) to selected 1.56 (colored)

Obey negative cache entries for intermediate directories during a create.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Sep 5 14:22:34 1999 UTC (24 years, 7 months ago) by jdolecek
Branch: MAIN
Changes since 1.19: +86 -18 lines
Diff to previous 1.19 (colored) to selected 1.56 (colored)

Change cache_lookup() as per discussion on tech-kern & ICB:

If the entry is found in name cache, cache_lookup() does all the
necessary locking now, simplifying the interface and making the
code easier to follow and maintain.

The code now also removes the entry from cache when it's either invalid
(vget() fails) or the vnode has been recycled while waiting for the lock.
In that case, unlock/relock of the directory vnode has been eliminated too.
Both changes could lead to sligh performace improvement in same cases.

Furthermore, obscure bug has been found and eliminated for ISDOTDOT in the
lockparent && ISLASTCN case: if the vget() succeded and the re-lock
of the directory vnode not, we returned the error with the '..' vnode still
locked.

For simplicity, cache_lookup() now returns 0 if the positive entry was found
in cache, -1 if not found and ENOENT or error returned by the locking
functions in any other case.

Many thanks to Bill Studenmund and especially Charles Hannum
for invaluable advices and code to get this right.

Tested by: jdolecek
Rewieved by: wrstuden, mycroft

Revision 1.19 / (download) - annotate - [select for diffs], Mon Mar 22 17:01:55 1999 UTC (25 years, 1 month ago) by sommerfe
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame, chs-ubc2-base
Branch point for: chs-ubc2
Changes since 1.18: +108 -1 lines
Diff to previous 1.18 (colored) to selected 1.56 (colored)

Change namei cache to record vnode->(parent,name) entries (for directories).
Add kernel implementation of getcwd() which uses this cache, falling
back to reading the filesystem on a cache miss.
Along for the ride: add new VOP_FSYNC flag FSYNC_RECLAIM indicating
that a reclaim is being done, so only a "shallow" fsync is needed.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Sep 1 04:33:56 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base
Branch point for: chs-ubc
Changes since 1.17: +8 -3 lines
Diff to previous 1.17 (colored) to selected 1.56 (colored)

Use the pool allocator and "nointr" pool page allocator for name cache entries.
The only benefit this provides is that we don't use kmem_map to map the memory
used for name cache entries (though, this is a 13 virtual page savings on my
PPro) since vnodes are never freed (they have their own freelist).

Revision 1.17 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:18 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored) to selected 1.56 (colored)

Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
  bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jul 31 22:50:53 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored) to selected 1.56 (colored)

fix sizeofs so they comply with the KNF style guide. yes, it is pedantic.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:35 1998 UTC (26 years, 1 month ago) by fvdl
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored) to selected 1.56 (colored)

Merge with Lite2 + local changes

Revision 1.14 / (download) - annotate - [select for diffs], Sat Feb 7 02:44:49 1998 UTC (26 years, 2 months ago) by chs
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored) to selected 1.56 (colored)

add flags arg to hashinit(), to pass to malloc().

Revision 1.13 / (download) - annotate - [select for diffs], Sun Feb 4 02:18:09 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, thorpej-setroot, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, mrg-vm-swap, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, is-newarp-before-merge, is-newarp-base, is-newarp, bouyer-scsipi
Changes since 1.12: +6 -2 lines
Diff to previous 1.12 (colored) to selected 1.56 (colored)

First pass at prototyping

Revision 1.12 / (download) - annotate - [select for diffs], Fri Sep 8 14:15:07 1995 UTC (28 years, 7 months ago) by ws
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored) to selected 1.56 (colored)

Distribute cache entries more evenly

Revision 1.11 / (download) - annotate - [select for diffs], Tue May 30 09:02:02 1995 UTC (28 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +12 -3 lines
Diff to previous 1.10 (colored) to selected 1.56 (colored)

Preserve the ISWHITEOUT flag between cache_enter() and cache_lookup().

Revision 1.10 / (download) - annotate - [select for diffs], Tue Dec 13 09:14:34 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored) to selected 1.56 (colored)

Sync with CSRG.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Aug 30 03:06:11 1994 UTC (29 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +39 -98 lines
Diff to previous 1.8 (colored) to selected 1.56 (colored)

Convert process, file, and namei lists and hash tables to use queue.h.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jul 5 19:09:32 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.7: +4 -2 lines
Diff to previous 1.7 (colored) to selected 1.56 (colored)

fix for kern/322, pointed out by osymh@gemini.oscs.montana.edu.  Neither
suggested fix was correct: the suggested change to cache_lookup would cause
the counters to be incremented when doingcache was zero, and the suggested
change to cache_enter was prone to a race condition (e.g. if doingcache
became 1 between the cache_lookup and cache_enter).

Revision 1.7 / (download) - annotate - [select for diffs], Sat Jul 2 20:26:19 1994 UTC (29 years, 9 months ago) by chopps
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored) to selected 1.56 (colored)

we like cache.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jun 29 06:33:47 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.5: +4 -3 lines
Diff to previous 1.5 (colored) to selected 1.56 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 8 11:28:50 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +96 -91 lines
Diff to previous 1.4 (colored) to selected 1.56 (colored)

Update to 4.4-Lite fs code.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Dec 18 04:22:39 1993 UTC (30 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.3: +9 -9 lines
Diff to previous 1.3 (colored) to selected 1.56 (colored)

Canonicalize all #includes.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Sep 7 15:41:10 1993 UTC (30 years, 7 months ago) by ws
Branch: MAIN
CVS Tags: magnum-base
Branch point for: magnum
Changes since 1.2: +6 -5 lines
Diff to previous 1.2 (colored) to selected 1.56 (colored)

Changes to VFS readdir semantics
NFS changes for better cookie support
ISOFS changes for better Rockridge support and support for generation numbers

Revision 1.2 / (download) - annotate - [select for diffs], Thu May 20 02:55:33 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored) to selected 1.56 (colored)

add $Id$ strings, and clean up file headers where necessary

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN
Diff to selected 1.56 (colored)

Initial revision

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.




CVSweb <webmaster@jp.NetBSD.org>