From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750874AbdALX1Z (ORCPT ); Thu, 12 Jan 2017 18:27:25 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:57160 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750825AbdALX1X (ORCPT ); Thu, 12 Jan 2017 18:27:23 -0500 Date: Thu, 12 Jan 2017 23:27:19 +0000 From: Al Viro To: Linus Torvalds Cc: "Alan J. Wylie" , Thorsten Leemhuis , linux-kernel Subject: Re: 4.9.0 regression in pipe-backed iov_iter with systemd-nspawn Message-ID: <20170112232719.GE1555@ZenIV.linux.org.uk> References: <22647.59020.331664.632444@wylie.me.uk> <20170112223718.GA1555@ZenIV.linux.org.uk> <20170112224624.GB1555@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2017 at 03:14:41PM -0800, Linus Torvalds wrote: > On Thu, Jan 12, 2017 at 3:02 PM, Linus Torvalds > wrote: > > > > Looking at the callers of "do_splice_to()", we already have the > > wait_for_space() in do_splice(), but we do *not* have it in the > > do_splice_from() case when both the input and output file descriptors > > are pipes. > > Bah. That case doesn't even trigger the new code. I was lazy with my > grep. The two cases are "do_splice()" (which does have the > wait-for-space) and splice_direct_to_actor(). And > splice_direct_to_actor() shouldn't even need it, should it? > > So ignore that. But I think there is something about the EAGAIN. It might, but I would really like to see where has that EAGAIN come from. I see several possibilities: * wait_for_space() with SPLICE_F_NONBLOCK in flags. Shouldn't happen with 0 in the last argument of splice(2). * default_file_splice_read() seeing pipe->nrbufs == pipe->buffers. Shouldn't be possible after successful wait_for_space(). * vfs_readv() returning -EAGAIN. That might be possible, actually - the damn thing has come from 13761 open("/dev/ptmx", O_RDWR|O_NOCTTY|O_NONBLOCK|O_CLOEXEC) = 5 and O_NONBLOCK had been present in open flags. What I'd like to see is strace of the same thing on the working kernel, ideally - just prior to the commit bisect has converged to.