Re: [RFC PATCH v2] mm, netfs: Provide a means of invalidation without using launder_folio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> > +	/* Prevent new folios from being added to the inode. */
> > +	filemap_invalidate_lock(mapping);
> 
> I'm kind of surprised that the callers wouldn't want to hold that lock
> over a call to this function.  I guess you're working on the callers,
> so you'd know better than I would, but I would have used lockdep to
> assert that invalidate_lock was held.

I'm not sure.  None of the places that look like they'd be calling this
currently take that lock (though possibly they should).

Also, should I provide it with explicit range, I wonder?

> > +	if (unlikely(!RB_EMPTY_ROOT(&mapping->i_mmap.rb_root)))
> > +		unmap_mapping_pages(mapping, 0, ULONG_MAX, false);
> 
> Is this optimisation worth it?

Perhaps not.

David





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux