lkml.org 
[lkml]   [2013]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 6/9] mm + fs: store shadow entries in page cache
    On Tue, Nov 26, 2013 at 11:20:53AM +0100, Peter Zijlstra wrote:
    > On Tue, Nov 26, 2013 at 10:17:16AM +1100, Dave Chinner wrote:
    > > void truncate_inode_pages_final(struct address_space *mapping)
    > > {
    > > mapping_set_exiting(mapping);
    > > if (inode->i_data.nrpages || inode->i_data.nrshadows) {
    > > /*
    > > * spinlock barrier to ensure all modifications are
    > > * complete before we do the final truncate
    > > */
    > > spin_lock_irq(&mapping->tree_lock);
    > > spin_unlock_irq(&mapping->tree_lock);
    >
    > spin_unlock_wait() ?
    >
    > Its cheaper, but prone to starvation; its typically useful when you're
    > waiting for the last owner to go away and know there won't be any new
    > ones around.

    The other side is reclaim plucking pages one-by-one from the address
    space in LRU order. It'd be preferable to not starve the truncation
    side, because it is much more efficient at getting rid of those pages.


    \
     
     \ /
      Last update: 2013-11-27 18:01    [W:3.084 / U:0.972 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site