Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756751Ab1F0HHv (ORCPT ); Mon, 27 Jun 2011 03:07:51 -0400 Received: from mail.betterlinux.com ([199.58.199.50]:60549 "EHLO mail.betterlinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756964Ab1F0HF5 (ORCPT ); Mon, 27 Jun 2011 03:05:57 -0400 Date: Mon, 27 Jun 2011 09:05:52 +0200 From: Andrea Righi To: Rik van Riel Cc: Andrew Morton , Minchan Kim , Peter Zijlstra , Johannes Weiner , KAMEZAWA Hiroyuki , Andrea Arcangeli , Hugh Dickins , Jerry James , Marcus Sorensen , Matt Heaton , KOSAKI Motohiro , Theodore Tso , Shaohua Li , =?iso-8859-1?Q?P=E1draig?= Brady , linux-mm , LKML Subject: Re: [PATCH v3 2/2] fadvise: implement POSIX_FADV_NOREUSE Message-ID: <20110627070552.GA1790@thinkpad> References: <1308923350-7932-1-git-send-email-andrea@betterlinux.com> <1308923350-7932-3-git-send-email-andrea@betterlinux.com> <4E07B709.9010306@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E07B709.9010306@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1324 Lines: 44 On Sun, Jun 26, 2011 at 06:47:37PM -0400, Rik van Riel wrote: > On 06/24/2011 09:49 AM, Andrea Righi wrote: > > >@@ -114,7 +114,8 @@ SYSCALL_DEFINE(fadvise64_64)(int fd, loff_t offset, loff_t len, int advice) > > ret = 0; > > break; > > case POSIX_FADV_NOREUSE: > >- break; > >+ /* Reduce cache eligibility */ > >+ force = false; > > case POSIX_FADV_DONTNEED: > > if (!bdi_write_congested(mapping->backing_dev_info)) > > filemap_flush(mapping); > > And the same is true here. "force" is just not a very > descriptive name. OK, I'll change the name to "invalidate" in the next version of the patch. Thanks, -Andrea > > >@@ -124,8 +125,8 @@ SYSCALL_DEFINE(fadvise64_64)(int fd, loff_t offset, loff_t len, int advice) > > end_index = (endbyte>> PAGE_CACHE_SHIFT); > > > > if (end_index>= start_index) > >- invalidate_mapping_pages(mapping, start_index, > >- end_index); > >+ __invalidate_mapping_pages(mapping, start_index, > >+ end_index, force); > > break; > > default: > > ret = -EINVAL; > > > -- > All rights reversed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/