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: Fri, 2 Sep 2016 17:57:04 -0700
Cc: CAI Qian <caiqian@xxxxxxxxxx>, linux-xfs <linux-xfs@xxxxxxxxxxxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, 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=YGE1e/+gYTsBsl8he4DnSe7siAmjPO9bEzhfwFsisVQ=; b=fweOLNyZIMNke3943tkuFDrf0qdCGE28el4jgGrm0ax40EFL2o0Prh5y7MmVJfefvI GDd/p9igaUXRparRNYsDxCjDBfu6HZaTmmagfx7chdEE5pavV9r2wqprnBWPHii2gBhX WdeUVyaS1v7XlL9HevsFrT+ArL4Y7ZcXpuekoWJISrqYNcq3Q7s7bjOvvOaRyeqHHWXn Rgs3mhb/2dkFi1eVQw+PyPhud/rb4NQFsbQX+8OvWg+qTdnl1qE4KrqqBdWCHSUuXRXp 4ye11zAW6wRChwLt0StmYzs/T9KNIEqNiqnZzCjR0t4O52OQRwGuE6S21Lyu660HncWk OYOw==
In-reply-to: <20160903003919.GI30056@dastard>
References: <723420070.1340881.1472835555274.JavaMail.zimbra@xxxxxxxxxx> <1832555471.1341372.1472835736236.JavaMail.zimbra@xxxxxxxxxx> <20160903003919.GI30056@dastard>
Sender: linus971@xxxxxxxxx
On Fri, Sep 2, 2016 at 5:39 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
>
> Fundamentally a splice infrastructure problem.

Yeah, I don't really like how we handle the pipe lock.

It *might* be possible to instead just increment the reference
counters as we build a kvec[] array of them, and simply do teh write
without holding the pipe lock at all.

That has other problems, ie concurrect spices from the same pipe would
possibly write the same data multiple times, though.

But yes, the fundamental problem is how splice wants to take the pipe
lock both early and late. Very annoying.

              Linus

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