Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 9 Oct 2002 15:31:02 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 9 Oct 2002 15:31:01 -0400 Received: from vsmtp1.tin.it ([212.216.176.221]:42963 "EHLO smtp1.cp.tin.it") by vger.kernel.org with ESMTP id ; Wed, 9 Oct 2002 15:31:01 -0400 Message-ID: <3DA4852B.7CC89C09@denise.shiny.it> Date: Wed, 09 Oct 2002 21:36:11 +0200 From: Giuliano Pochini X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.4.19 ppc) X-Accept-Language: en MIME-Version: 1.0 To: Mark Mielke CC: linux-kernel@vger.kernel.org Subject: Re: [PATCH] O_STREAMING - flag for optimal streaming I/O References: <1034104637.29468.1483.camel@phantasy> <20021009170517.GA5608@mark.mielke.cc> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1238 Lines: 26 > > Does it drop pages unconditionally ? What happens if I do a > > streaming_cat largedatabase > /dev/null while other processes > > are working on it ? It's not a good thing to remove the whole > > cached data other apps are working on. > > Anybody could make the cache thrash. I don't see this as an argument against > O_STREAMING (whether explicitly activated, or dynamically activated). In fact it isn't. But I don't undestand why we unconditionally discard a page after it has been read. Yes, I told the kernel I will not need it anymore, but someone else could need it. I'm not a kernel hacker and I don't know if this is possible: when a page is read from disk by a O_STR file flag it "kill me first when needed, otherwise leave me in memory", and if a page is already cache, just use it and change nothing. This will preserve data used by other processes, and the data I've just read if there is room. Free memory is wasted momory. Don't drop caches if nobody need memory. Bye. - 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/