Skip to content
Snippets Groups Projects
  • Avi Kivity's avatar
    43df74e7
    vfs: relax dependency of close() performance on rcu grace periods · 43df74e7
    Avi Kivity authored
    Currently, we perform the final fdrop() in an rcu callback, which means it
    can have considerable latency.  This in turn places restrictions on
    further optimizations we can do to rcu, as we need prompt close() execution.
    
    Relax this by performing the fdrop() immediately, and only deferring the
    final free().  To do this, we harden fget() so it now expects files with
    positive refcounts, and make sure that after the final fdrop() refcounts
    are either zero or negative.
    
    This also makes close() take effect immediately, which fixes tst-pipe.so.
    43df74e7
    History
    vfs: relax dependency of close() performance on rcu grace periods
    Avi Kivity authored
    Currently, we perform the final fdrop() in an rcu callback, which means it
    can have considerable latency.  This in turn places restrictions on
    further optimizations we can do to rcu, as we need prompt close() execution.
    
    Relax this by performing the fdrop() immediately, and only deferring the
    final free().  To do this, we harden fget() so it now expects files with
    positive refcounts, and make sure that after the final fdrop() refcounts
    are either zero or negative.
    
    This also makes close() take effect immediately, which fixes tst-pipe.so.