xfs
[Top] [All Lists]

Re: xfs_file_splice_read: possible circular locking dependency detected

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: xfs_file_splice_read: possible circular locking dependency detected
From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 8 Sep 2016 19:26:44 -0700
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>, CAI Qian <caiqian@xxxxxxxxxx>, linux-xfs <linux-xfs@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=pNREwHYy/ovOGnX+lHCH1w43EqKwHdvLHifV2bYJVf8=; b=ojc1Kuiem6TR6B1MmIt3Y7VLVln7D2jlq85YaowyuYfaQobXs+eBFu0OCLVXJBUpkS ezJZZL0/X2C8kdguvK/g0e3S/mY2dqA3KDrlDxF3xTAyJe2BBqj3Xd8gDeRkfi6CQRiU /Ksh9at4knQqsYJPQgA33hkSBWQbJmR9WtbhK4nZP1KqyqMx/uOoOqH1wX0x15vxLvLN ZIk+hFsSDQLbTJcoZCErK74d+JhHNFmprIgb9nu8ZW0M1IbgtQXRYooOuQFa1uarQm10 u9VXTdpcaDzGcO1bWg21m/SAB8/jvCh5Zr5et/uWkOeIGXS+ZmJ7yXfZfvcaUDEy+WVn tErg==
In-reply-to: <CA+55aFzohsUXj_3BeFNr2t50Wm=G+7toRDEz=Tk7VJqP3n1hXQ@xxxxxxxxxxxxxx>
References: <723420070.1340881.1472835555274.JavaMail.zimbra@xxxxxxxxxx> <1832555471.1341372.1472835736236.JavaMail.zimbra@xxxxxxxxxx> <20160903003919.GI30056@dastard> <1450936953.949798.1473348551588.JavaMail.zimbra@xxxxxxxxxx> <20160908175632.GH2356@xxxxxxxxxxxxxxxxxx> <CA+55aFzg+Q0DzFNBR9TeL13_yfrfFwHu9OrZe--Zpje0EeN4Cw@xxxxxxxxxxxxxx> <20160908213835.GY30056@dastard> <20160908235521.GL2356@xxxxxxxxxxxxxxxxxx> <20160909015324.GD30056@dastard> <CA+55aFzohsUXj_3BeFNr2t50Wm=G+7toRDEz=Tk7VJqP3n1hXQ@xxxxxxxxxxxxxx>
Sender: linus971@xxxxxxxxx
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)

               Linus

<Prev in Thread] Current Thread [Next in Thread>