Re: xfs_file_splice_read: possible circular locking dependency detected

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

 



On Thu, Sep 08, 2016 at 07:26:44PM -0700, Linus Torvalds wrote:
> On Thu, Sep 8, 2016 at 7:22 PM, Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> > On Thu, Sep 8, 2016 at 6:53 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> >>
> >> So if we race iwth a truncate, the pages in spd.pages[] that are
> >> beyond the new EOF may or may not have been removed from the page
> >> cache.
> >
> > So I'm not sure why we'd need to care?
> 
> Side note, just to clarify: I'm not actually convinced that turning
> things into page/offset/len tuples is the right thing to do.
> 
> I still suspect that the reference count updates on each page may not
> be a good idea.  I suspect we'd easily be better off trying to do
> everything under the pipe lock exactly so that we can *avoid* having
> to do per-page "increment ref-count, then decrement it again". But the
> locking would have to be changed radically for us to be able to do
> that (and the only sane model ios, I think, to make pipe_lock be the
> outermost lock, and outside *every* downcall)

IDGI.  Suppose we do splice from file to pipe.  Everything had been in
page cache, so we want to end up with pipe_buffers containing references
to those page cache pages.  How do you propose to do that without having
grabbed references to them?  What's to keep them from being freed by the
time we get to reading from the pipe?

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux