Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (4h)  netbsd-10 (17d)  netbsd-9 (17d)  netbsd-8 (22d) 

2024-06-03 00:13:11 UTC Now

2020-03-22 14:23:27 UTC ad-namecache commitmail json YAML

Keeping the namecache lock next to the vnode lock has a repeatable
detrimental effect.  So shuffle some stuff around in vnode_impl to save
a bit of space, and give the namecache locks their own cache line.

(ad)

2020-03-22 14:16:50 UTC ad-namecache commitmail json YAML

Resurrect the counter stuff from HEAD, which tries to deal with 32-bit
counter rollover.  Drive it by sysctl and/or callout every 5 minutes,
since there's no garbage collection kthread any more.

(ad)

2020-03-22 01:58:22 UTC ad-namecache commitmail json YAML

- rb_tree_insert_node() refuses to insert duplicate nodes.  It always
  returns a pointer to the current node in the tree for the given key.
  Therefore the call to rb_tree_lookup_node() in cache_enter() is not
  needed.

- Adjust a comment and move some code for clarity.

(ad)

2020-03-22 00:34:31 UTC ad-namecache commitmail json YAML

- Fold the "doingcache" conditional into the max length conditional.
- Mark the tunables __read_mostly.

(ad)

2020-03-21 22:04:17 UTC ad-namecache commitmail json YAML

Move nc_key up, so cache_lookup_entry() only needs to touch one cache line
at each step.

(ad)

2020-03-21 22:00:56 UTC ad-namecache commitmail json YAML

- Include sys/types.h for vax.
- Use macro versions of kpreempt_disable()/enable().
- Use atomic_load_relaxed().
- Make cache_key() inline.

(ad)

2020-03-10 21:53:46 UTC ad-namecache commitmail json YAML

__read_mostly -> const in one place

(ad)

2020-03-04 20:26:29 UTC ad-namecache commitmail json YAML

2020-03-04 20:21:05 UTC ad-namecache commitmail json YAML

2020-03-03 22:30:57 UTC ad-namecache commitmail json YAML

lookup_fastforward(): bail out on mount -o union

(ad)

2020-02-29 22:00:03 UTC ad-namecache commitmail json YAML

Back out experimental change - not ready for LK_SHARED on VOP_OPEN() just yet.

(ad)

2020-02-29 21:50:45 UTC ad-namecache commitmail json YAML

2020-02-29 20:21:12 UTC ad-namecache commitmail json YAML

2020-02-29 20:20:19 UTC ad-namecache commitmail json YAML

src/sys/external/bsd/common/include/asm/byteorder.h@1.1.2.2 / diff / nxr@1.1.2.2
src/sys/external/bsd/common/include/asm/div64.h@1.1.2.2 / diff / nxr@1.1.2.2
src/sys/external/bsd/common/include/linux/kernel.h@1.23.2.1 / diff / nxr@1.23.2.1
src/sys/external/bsd/common/include/linux/list.h@1.18.6.1 / diff / nxr@1.18.6.1
src/sys/external/bsd/common/include/linux/log2.h@1.1.2.2 / diff / nxr@1.1.2.2
src/sys/external/bsd/common/linux/linux_work.c@1.44.6.1 / diff / nxr@1.44.6.1
src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc@1.3.2.1 / diff / nxr@1.3.2.1
src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc@1.4.2.1 / diff / nxr@1.4.2.1
src/sys/external/bsd/drm2/amdgpu/files.amdgpu@1.7.10.1 / diff / nxr@1.7.10.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_atom.c@1.1.10.1 / diff / nxr@1.1.10.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_atombios.c@1.3.10.1 / diff / nxr@1.3.10.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_atombios_crtc.c@1.1.10.1 / diff / nxr@1.1.10.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_atombios_dp.c@1.2.8.1 / diff / nxr@1.2.8.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_atombios_encoders.c@1.1.10.1 / diff / nxr@1.1.10.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_atombios_i2c.c@1.1.10.1 / diff / nxr@1.1.10.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_bo_list.c@1.4.10.1 / diff / nxr@1.4.10.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cgs.c@1.4.10.1 / diff / nxr@1.4.10.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ci_dpm.c@1.2.10.1 / diff / nxr@1.2.10.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ci_smc.c@1.2.10.1 / diff / nxr@1.2.10.1
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cik_ih.c@1.2.10.1 / diff / nxr@1.2.10.1
      :
(more 235 files)
Sync with head.

(ad)

2020-02-29 20:19:17 UTC ad-namecache commitmail json YAML

2020-02-29 20:18:34 UTC ad-namecache commitmail json YAML

2020-02-29 20:17:43 UTC ad-namecache commitmail json YAML

2020-02-23 19:14:03 UTC ad-namecache commitmail json YAML

Turns out there's no point adjusting v_holdcnt with atomics.

(ad)

2020-02-16 22:00:53 UTC ad-namecache commitmail json YAML

2020-01-25 22:38:53 UTC ad-namecache commitmail json YAML

2020-01-25 21:45:00 UTC ad-namecache commitmail json YAML

2020-01-25 18:42:24 UTC ad-namecache commitmail json YAML

Add a missing membar to previous.

(ad)

2020-01-25 15:54:04 UTC ad-namecache commitmail json YAML

2020-01-24 16:49:12 UTC ad-namecache commitmail json YAML

2020-01-24 16:48:59 UTC ad-namecache commitmail json YAML

- Put all the namecache stuff back into vnode_impl_t.
- Tidy vfs_cache.c up, finish the comments.
- Finalise how ID information is entered to the cache.
- Handle very small/old systems.

(ad)

2020-01-24 16:05:37 UTC ad-namecache commitmail json YAML

2020-01-24 16:05:23 UTC ad-namecache commitmail json YAML

vnodes:

- Have own v_usecount again, don't share the uvm_object's refcount.
- Cluster the members of vnode_t and vnode_impl_t in a cache-concious way.
- Go back to having vi_lock directly in vnode_impl_t.
- Go back to having v_usecount adjusted with atomics.
- Start adjusting v_holdcnt with atomics, too.
- Put all the namecache stuff back into vnode_impl_t.

(ad)

2020-01-23 21:24:54 UTC ad-namecache commitmail json YAML

Add an IMNT_NCLOOKUP flag to indicate the FS is OK with lookup directly
from cache.

(ad)

2020-01-23 21:23:56 UTC ad-namecache commitmail json YAML

Improve an assertion.

(ad)

2020-01-23 19:28:39 UTC ad-namecache commitmail json YAML

vcache_reclaim(): purge namecache immediately after setting vnode to
VS_RECLAIMED.

(ad)

2020-01-23 12:33:18 UTC ad-namecache commitmail json YAML

2020-01-23 12:21:01 UTC ad-namecache commitmail json YAML

- Change style of new code slightly to match rest of file.
- NFS lookup needs to cross mountpoint too.
- Update comments.

(ad)

2020-01-23 12:17:08 UTC ad-namecache commitmail json YAML

2020-01-22 12:10:46 UTC ad-namecache commitmail json YAML

Fast-forward through the namecache was stopping one component too soon when
there was an obstacle, e.g. a mountpoint.  The obstacle should be returned
not the parent directory.

(ad)

2020-01-22 12:04:36 UTC ad-namecache commitmail json YAML

Copy the IMNT_SHRLOOKUP flag from lowerrootvp's mount.

(ad)

2020-01-22 12:00:18 UTC ad-namecache commitmail json YAML

Make sure LK_UPGRADE always comes with LK_NOWAIT; dropping the lock in here
is unclean and I wonder if it could screw over fstrans.

(ad)

2020-01-22 11:40:17 UTC ad-namecache commitmail json YAML

2020-01-19 21:24:01 UTC ad-namecache commitmail json YAML

2020-01-19 21:23:36 UTC ad-namecache commitmail json YAML

Use LOCKLEAF in the few cases it's useful for ffs/tmpfs/nullfs.  Others need
to be checked.

(ad)

2020-01-19 21:21:56 UTC ad-namecache commitmail json YAML

2020-01-19 21:19:25 UTC ad-namecache commitmail json YAML

- Add a LOCKSHARED flag to namei (matching FreeBSD) indicating that we want
  the leaf locked with LK_SHARED.

- Add an IMNT_SHRLOOKUP flag to struct mount indicating that the file
  system can do VOP_LOOKUP() with an shared lock.  If it encounters
  something tricky, VOP_LOOKUP() is free to return ENOLCK and namei() will
  retry the lookup with an exclusive lock.  If the file system has this flag
  set, namei() will try with shared locks for all of the "read only"
  lookups, i.e. nameiop=LOOKUP or !ISLASTCN.

- vfs_getcwd: only take vnode locks when really needed, take shared locks if
  possible, and where the namecache has identify info for the directories,
  do it all in the namecache.

- vfs_lookup: when crossing mountpoints take only a shared lock on the
  covered vnode; don't need anything else.

(ad)

2020-01-19 21:11:00 UTC ad-namecache commitmail json YAML

2020-01-19 21:08:30 UTC ad-namecache commitmail json YAML

2020-01-19 19:44:34 UTC ad-namecache commitmail json YAML

2020-01-18 17:16:20 UTC ad-namecache commitmail json YAML

Fix namecache_print().

(ad)

2020-01-18 17:14:35 UTC ad-namecache commitmail json YAML

2020-01-18 17:14:13 UTC ad-namecache commitmail json YAML

2020-01-18 17:12:59 UTC ad-namecache commitmail json YAML

2020-01-18 15:42:02 UTC ad-namecache commitmail json YAML

- Adjust comments & assertions.
- Ditch memcmp().

(ad)

2020-01-17 22:26:26 UTC ad-namecache commitmail json YAML

vfs_lookup:

- Do the easy component name lookups directly in the namecache without
  taking vnode locks nor vnode references (between the start and the leaf /
  parent), which seems to largely solve the lock contention problem with
  namei().  It needs support from the file system, which has to tell the
  name cache about directory permissions (only ffs and tmpfs tried so far),
  and I'm not sure how or if it can work with layered file systems yet.
  Work in progress.

vfs_cache:

- Make the rbtree operations more efficient: inline the lookup, and key on a
  64-bit hash value (32 bits plus 16 bits length) rather than names.

- Take namecache stuff out of vnode_impl, and take the rwlocks, and put them
  all together an an nchnode struct which is mapped 1:1: with vnodes.  Saves
  memory and nicer cache profile.

- Add a routine to help vfs_lookup do its easy component name lookups.

- Report some more stats.

- Tidy up the file a bit.

(ad)

2020-01-17 21:55:13 UTC ad-namecache commitmail json YAML

vrelel: don't change the vnode state to VS_BLOCKED for VOP_INACTIVE(), it's
not needed (at least not for the usual case).  Will revist before merge.

(ad)

2020-01-17 21:54:27 UTC ad-namecache commitmail json YAML

- Get shared locks on the directories, except for VOP_GETATTR() which
  unfortunately still needs LK_EXCLUSIVE due to itimes handling in UFS.

- vnode locks are not needed to traverse the namecache.

(ad)

2020-01-17 21:53:01 UTC ad-namecache commitmail json YAML

LK_SHARED for VOP_ACCESS().

(ad)

2020-01-17 21:47:38 UTC ad-namecache commitmail json YAML

2020-01-16 16:45:31 UTC ad-namecache commitmail json YAML

Push the vnode locking in namei() about as far back as it will go.

(ad)

2020-01-14 11:08:01 UTC ad-namecache commitmail json YAML

2020-01-14 11:07:40 UTC ad-namecache commitmail json YAML

namecache:

This is working better than expected.  It seems to cut system time for
build.sh by ~10% on my test machine and joerg@ is seeing better results with
pbulk.  Improve it a bit more without changing the basic idea:

- Split cache_list_lock into a per-vnode rwlock for reverse lookup, and a
  lightly contended global lock on LRU state (cache_lru_lock),

- For LRU replacement, imitate the VM system's page replacement algorithm.
  This eliminates the writebacks to struct namecache (to track time of last
  hit).

- Dynamically allocate the per-directory lock, preparing the way for having
  a "struct nchdir" or similar which could contain stuff like different
  structures for lookup, cached info to do the equivalent of VOP_ACCESS() in
  cache, and so on.

(ad)

2020-01-13 08:51:07 UTC ad-namecache commitmail json YAML

2020-01-08 21:55:10 UTC ad-namecache commitmail json YAML

2020-01-08 11:44:30 UTC ad-namecache commitmail json YAML

cache_enter(): check namelen before touching name.

(ad)

2020-01-08 11:02:35 UTC ad-namecache commitmail json YAML

2020-01-08 11:02:16 UTC ad-namecache commitmail json YAML

Redo the namecache to focus on per-directory data structures, removing the
huge hashtable and nasty locking scheme.

Initially this uses rbtrees (because that's what's there).  The intent is
experiment with other data structures.

(ad)