xfs
[Top] [All Lists]

Re: [PATCH 0/5] splice: locking changes and code refactoring

To: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH 0/5] splice: locking changes and code refactoring
From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 18 Jan 2014 11:59:56 -0800
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, Mark Fasheh <mfasheh@xxxxxxxx>, Joel Becker <jlbec@xxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, Sage Weil <sage@xxxxxxxxxxx>, Steve French <sfrench@xxxxxxxxx>
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:date:message-id:subject :from:to:cc:content-type; bh=dhzZKzKI0oNo6t/X7udLba98qNmhUpW5Wp/GET9AIto=; b=limD7FYfz1Q+WZCjMHbrWF7qVElKDTyCS6XEgOeUJGGEAn8C1CkPc6Ur+F1teWrf4o Mo8U+eBcHrTMR57VoRbOUXyhFeq0VzPf8vnKOyL+REgAJkvMBNgL/Ui1ZwJKpWhIP/rE xiT8+VcRk3l6AcO89roMv4uhxXIyoKfMWmqoHusLgGwXrImJ5vcvNJp/I2IZqjg5oQu0 qdb7IFxp9r3MVn9om31UpmPD4bHBSFwhSaMoDaM8kd8zCGiF5Cd9JT94o3GySnRAUMsv wJcw4dgza8i3RI1L3GazSMHJDjbiG07F2WbWPx63s1LUPPc76PSz+IRn0JPQJXwGglJV V2sA==
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=dhzZKzKI0oNo6t/X7udLba98qNmhUpW5Wp/GET9AIto=; b=Y0ebtsHMePVQZGSwfiKm78wpf+jFbCflP3OOe2btChCiFIQKzrVCIQqjca/CJw+hfT SK7m4/OOleCYPx0gN2sLYpaF+ZhcfnuPZ8C5zk6Mw9EmdW/Ln/PxCImrrgqfl1jVIw2o wGYaLeZNce6OmNDOQ2eteWaIMvThhAxCEyNbk=
In-reply-to: <20140118074649.GF10323@xxxxxxxxxxxxxxxxxx>
References: <20131212181459.994196463@xxxxxxxxxxxxxxxxxxxxxx> <20140113141416.GA30117@xxxxxxxxxxxxx> <20140113235646.GR10323@xxxxxxxxxxxxxxxxxx> <20140114132207.GA25170@xxxxxxxxxxxxx> <20140114172033.GU10323@xxxxxxxxxxxxxxxxxx> <20140118064040.GE10323@xxxxxxxxxxxxxxxxxx> <CA+55aFw4LgyYEkygxHUnpKZg3jMACGzsyENc9a9rWFmLcaRefQ@xxxxxxxxxxxxxx> <20140118074649.GF10323@xxxxxxxxxxxxxxxxxx>
Sender: linus971@xxxxxxxxx
On Fri, Jan 17, 2014 at 11:46 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Fri, Jan 17, 2014 at 11:22:04PM -0800, Linus Torvalds wrote:
>> On Fri, Jan 17, 2014 at 10:40 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>> >
>> > Objections, comments?
>>
>> I certainly object to the "map, then unmap" approach. No VM games.
>
> Um...
>
> If we are going to copy that data (and all users of 
> generic_file_splice_write()
> do that memcpy() to page cache), we have to kmap the source ;-/

Yeah, the kmap/kunmap we have to do. But that's a no-op on 64-bit, and
has to be done one page at a time (well, I guess you could do a
couple).

But you can't do that *around* the default_file_splice_write(), so I
thought you meant some kind of "map into user space". And I absolutely
*detest* that kind of approach.

                  Linus

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