From mboxrd@z Thu Jan 1 00:00:00 1970
From: =?ISO-8859-1?Q?P=E1draig_Brady?=
Subject: Re: [RFC Patch] fs: implement per-file drop caches
Date: Wed, 30 May 2012 16:14:03 +0100
Message-ID: <4FC6393B.7090105@draigBrady.com>
References: <1338385120-14519-1-git-send-email-amwang@redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: linux-kernel@vger.kernel.org, Andrew Morton ,
Cong Wang ,
Alexander Viro ,
Matthew Wilcox , linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org
To: Cong Wang
Return-path:
In-Reply-To: <1338385120-14519-1-git-send-email-amwang@redhat.com>
Sender: owner-linux-mm@kvack.org
List-Id: linux-fsdevel.vger.kernel.org
On 05/30/2012 02:38 PM, Cong Wang wrote:
> This is a draft patch of implementing per-file drop caches.
>=20
> It introduces a new fcntl command F_DROP_CACHES to drop
> file caches of a specific file. The reason is that currently
> we only have a system-wide drop caches interface, it could
> cause system-wide performance down if we drop all page caches
> when we actually want to drop the caches of some huge file.
This is useful functionality.
Though isn't it already provided with POSIX_FADV_DONTNEED?
This functionality was added to GNU dd (8.11) a year ago:
http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommitdiff;h=3D5f3115=
5
Here are the examples from that patch:
# Advise to drop cache for whole file
dd if=3Difile iflag=3Dnocache count=3D0
# Ensure drop cache for the whole file
dd of=3Dofile oflag=3Dnocache conv=3Dnotrunc,fdatasync count=3D0
# Drop cache for part of file
dd if=3Difile iflag=3Dnocache skip=3D10 count=3D10 of=3D/dev/null
# Stream data using just the read-ahead cache
dd if=3Difile of=3Dofile iflag=3Dnocache oflag=3Dnocache
cheers,
P=E1draig.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter=
.ca/
Don't email: email@kvack.org
From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from psmtp.com (na3sys010amx162.postini.com [74.125.245.162])
by kanga.kvack.org (Postfix) with SMTP id 263056B0071
for ; Wed, 30 May 2012 11:14:09 -0400 (EDT)
Message-ID: <4FC6393B.7090105@draigBrady.com>
Date: Wed, 30 May 2012 16:14:03 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?=
MIME-Version: 1.0
Subject: Re: [RFC Patch] fs: implement per-file drop caches
References: <1338385120-14519-1-git-send-email-amwang@redhat.com>
In-Reply-To: <1338385120-14519-1-git-send-email-amwang@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-linux-mm@kvack.org
List-ID:
To: Cong Wang
Cc: linux-kernel@vger.kernel.org, Andrew Morton , Cong Wang , Alexander Viro , Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
On 05/30/2012 02:38 PM, Cong Wang wrote:
> This is a draft patch of implementing per-file drop caches.
>
> It introduces a new fcntl command F_DROP_CACHES to drop
> file caches of a specific file. The reason is that currently
> we only have a system-wide drop caches interface, it could
> cause system-wide performance down if we drop all page caches
> when we actually want to drop the caches of some huge file.
This is useful functionality.
Though isn't it already provided with POSIX_FADV_DONTNEED?
This functionality was added to GNU dd (8.11) a year ago:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=5f31155
Here are the examples from that patch:
# Advise to drop cache for whole file
dd if=ifile iflag=nocache count=0
# Ensure drop cache for the whole file
dd of=ofile oflag=nocache conv=notrunc,fdatasync count=0
# Drop cache for part of file
dd if=ifile iflag=nocache skip=10 count=10 of=/dev/null
# Stream data using just the read-ahead cache
dd if=ifile of=ofile iflag=nocache oflag=nocache
cheers,
Padraig.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: email@kvack.org
From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1753996Ab2E3PON (ORCPT );
Wed, 30 May 2012 11:14:13 -0400
Received: from mx1.redhat.com ([209.132.183.28]:60083 "EHLO mx1.redhat.com"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1753476Ab2E3POL (ORCPT );
Wed, 30 May 2012 11:14:11 -0400
Message-ID: <4FC6393B.7090105@draigBrady.com>
Date: Wed, 30 May 2012 16:14:03 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Cong Wang
CC: linux-kernel@vger.kernel.org, Andrew Morton ,
Cong Wang ,
Alexander Viro ,
Matthew Wilcox , linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [RFC Patch] fs: implement per-file drop caches
References: <1338385120-14519-1-git-send-email-amwang@redhat.com>
In-Reply-To: <1338385120-14519-1-git-send-email-amwang@redhat.com>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Sender: linux-kernel-owner@vger.kernel.org
List-ID:
X-Mailing-List: linux-kernel@vger.kernel.org
On 05/30/2012 02:38 PM, Cong Wang wrote:
> This is a draft patch of implementing per-file drop caches.
>
> It introduces a new fcntl command F_DROP_CACHES to drop
> file caches of a specific file. The reason is that currently
> we only have a system-wide drop caches interface, it could
> cause system-wide performance down if we drop all page caches
> when we actually want to drop the caches of some huge file.
This is useful functionality.
Though isn't it already provided with POSIX_FADV_DONTNEED?
This functionality was added to GNU dd (8.11) a year ago:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=5f31155
Here are the examples from that patch:
# Advise to drop cache for whole file
dd if=ifile iflag=nocache count=0
# Ensure drop cache for the whole file
dd of=ofile oflag=nocache conv=notrunc,fdatasync count=0
# Drop cache for part of file
dd if=ifile iflag=nocache skip=10 count=10 of=/dev/null
# Stream data using just the read-ahead cache
dd if=ifile of=ofile iflag=nocache oflag=nocache
cheers,
Pádraig.