gvisor/pkg/sentry/fs/gofer
Nicolas Lacasse f17692d807 Add fs.AsyncWithContext and call it in fs/gofer/inodeOperations.Release.
fs/gofer/inodeOperations.Release does some asynchronous work.  Previously it
was calling fs.Async with an anonymous function, which caused the function to
be allocated on the heap.  Because Release is relatively hot, this results in a
lot of small allocations and increased GC pressure, noticeable in perf profiles.

This CL adds a new function, AsyncWithContext, which is just like Async, but
passes a context to the async function.  It avoids the need for an extra
anonymous function in fs/gofer/inodeOperations.Release.  The Async function
itself still requires a single anonymous function.

PiperOrigin-RevId: 233141763
Change-Id: I1dce4a883a7be9a8a5b884db01e654655f16d19c
2019-02-08 15:54:15 -08:00
..
BUILD Remove license comments 2019-01-31 11:12:53 -08:00
attr.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
cache_policy.go Make cacheRemoteRevalidating detect changes to file size 2019-01-25 17:23:07 -08:00
context_file.go Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
device.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
file.go Invalidate COW mappings when file is truncated 2019-01-31 12:54:00 -08:00
file_state.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
fs.go Remove fs.Handle, ramfs.Entry, and all the DeprecatedFileOperations. 2019-01-14 20:34:28 -08:00
gofer_test.go Deflake gofer_test. 2018-12-20 17:23:26 -08:00
handles.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
inode.go Add fs.AsyncWithContext and call it in fs/gofer/inodeOperations.Release. 2019-02-08 15:54:15 -08:00
inode_state.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
path.go Make cacheRemoteRevalidating detect changes to file size 2019-01-25 17:23:07 -08:00
session.go Invalidate COW mappings when file is truncated 2019-01-31 12:54:00 -08:00
session_state.go Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
socket.go Convert Unix transport to syserr 2018-10-24 11:05:08 -07:00
util.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00