summaryrefslogtreecommitdiffhomepage
path: root/pkg/p9/messages.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2019-06-21 16:26:26 -0700
committergVisor bot <gvisor-bot@google.com>2019-06-21 16:27:26 -0700
commit6f933a934f715f4bcd4f4e4430d4040b6cf61032 (patch)
tree4402c27bcb692270850cffe6d7c5b862b3321b6d /pkg/p9/messages.go
parentae4ef32b8c77a067229c593af784fbfa3098fd97 (diff)
Remove O(n) lookup on unlink/rename
Currently, the path tracking in the gofer involves an O(n) lookup of child fidRefs. This causes a significant overhead on unlinks in directories with lots of child fidRefs (<4k). In this transition, pathNode moves from sync.Map to normal synchronized maps. There is a small chance of contention in walk, but the lock is held for a very short time (and sync.Map also had a chance of requiring locking). OTOH, sync.Map makes it very difficult to add a fidRef reverse map. PiperOrigin-RevId: 254489952
Diffstat (limited to 'pkg/p9/messages.go')
0 files changed, 0 insertions, 0 deletions