From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] Add block device speciffic splice write method Date: Thu, 23 Oct 2008 00:03:15 -0700 Message-ID: <20081023000315.6aa579f2.akpm@linux-foundation.org> References: <1224424858-3927-1-git-send-email-dmonakhov@openvz.org> <20081020174931.GH19428@kernel.dk> <20081020181156.GI19428@kernel.dk> <20081022223928.a6ce476f.akpm@linux-foundation.org> <20081023062921.GQ22217@kernel.dk> <20081022234157.33d46459.akpm@linux-foundation.org> <20081023065113.GU22217@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Dmitri Monakhov , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Jens Axboe Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:53095 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751970AbYJWHD5 (ORCPT ); Thu, 23 Oct 2008 03:03:57 -0400 In-Reply-To: <20081023065113.GU22217@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 23 Oct 2008 08:51:13 +0200 Jens Axboe wrote: > On Wed, Oct 22 2008, Andrew Morton wrote: > > On Thu, 23 Oct 2008 08:29:23 +0200 Jens Axboe wrote: > > > > > > But really it'd be better if the throttling happened down in > > > > pipe_to_file(), on a per-page basis. As it stands we can dirty an > > > > arbitrary number of pagecache pages without throttling. I think? > > > > > > That's pretty exactly why it isn't done in the actor, to avoid doing it > > > per-page. As it's going to be PIPE_BUFFERS (16) pages max, I think this > > > is better. > > > > > > Back in the splice early days, the balance_dirty_pages() actually showed > > > up in profiles when it was done on a per-page basis. So I'm reluctant to > > > change it :-) > > > > That's why (the misnamed) balance_dirty_pages_ratelimited() exists? > > I think that is what was used, but the details are a little hazy at this > point. So I can't say for sure. All that function does is to bump a per-cpu variable and once-per-thousand or so it does the balance. If it was causing problems in the splice application we want to know, because write() uses it! > In this case it's moot anyway, since we can kill it. Nope, we can only remove it if the fd is O_SYNC||is_sync().