linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: Thread implementations...
@ 1998-06-30 19:30 Larry McVoy
  1998-07-01  8:50 ` Stephen C. Tweedie
  0 siblings, 1 reply; 26+ messages in thread
From: Larry McVoy @ 1998-06-30 19:30 UTC (permalink / raw)
  To: Stephen C. Tweedie
  Cc: Eric W. Biederman, Christoph Rohland, linux-kernel, linux-mm

: Not for very large files: the forget-behind is absolutely critical in
: that case.

SunOS' local file system, UFS, implements the following alg for forget
behind on all types of accesses (SunOS has a unified page cache, all
accesses are mmap based, read/write are implemented by the kernel doing
an mmap and then a bcopy):

	if ((free_memory < we_will_start_paging_soon) &&
	    (offset is clust_size multiple) &&
	    (offset > small_file) &&
	    (access is sequential)) {
	    	free_behind(vp, offset - clust_size, clust_size);
	}

in the ufs_getpage() code.

I'll admit this was a hack, but it had some nice attributes that you might
want to consider:

	1) it was nice that I/O took care of itself.  The pageout daemon is
	   pretty costly (Stephen, we talked about this at Linux Expo - this
	   is why I want a pageout daemon that works on files, not on pages).
	
	2) Small files aren't worth the trouble and aren't the cause of the
	   trouble.  
	
	3) Random access frequently wants caching and randoms are expensive
	   to bring in.
	
	4) I/O is freed in large chunks, not a page at a time.  It's about
	   as costly to bring in one page as bring in 64-256K these days.

^ permalink raw reply	[flat|nested] 26+ messages in thread
[parent not found: <199806240915.TAA09504@vindaloo.atnf.CSIRO.AU>]

end of thread, other threads:[~1998-07-04 16:38 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-30 19:30 Thread implementations Larry McVoy
1998-07-01  8:50 ` Stephen C. Tweedie
1998-07-03 15:21   ` Rik van Riel
1998-07-03 20:05     ` Stephen C. Tweedie
1998-07-03 20:36       ` Rik van Riel
1998-07-04 16:37         ` Stephen C. Tweedie
     [not found] <199806240915.TAA09504@vindaloo.atnf.CSIRO.AU>
     [not found] ` <Pine.LNX.3.96dg4.980624025515.26983E-100000@twinlark.arctic.org>
     [not found]   ` <199806241213.WAA10661@vindaloo.atnf.CSIRO.AU>
1998-06-24 22:00     ` Eric W. Biederman
1998-06-24 23:41       ` Richard Gooch
1998-06-25  4:45         ` Eric W. Biederman
1998-06-25 17:14           ` Todd Larason
1998-06-26  7:53           ` Christoph Rohland
1998-06-26 14:16             ` Eric W. Biederman
1998-06-29 10:19               ` Stephen C. Tweedie
1998-06-30  6:19                 ` Eric W. Biederman
1998-06-30 13:10                   ` Stephen C. Tweedie
1998-06-30 19:35                     ` Dean Gaudet
1998-07-01  9:09                       ` Stephen C. Tweedie
1998-06-25  4:12       ` Dean Gaudet
1998-06-25  3:53         ` Richard Gooch
1998-06-25 11:32           ` Stephen C. Tweedie
1998-06-25 21:24             ` Chris Wedgwood
1998-06-25 22:16             ` Richard Gooch
1998-06-25  4:56         ` Eric W. Biederman
1998-06-25 11:35           ` Stephen C. Tweedie
1998-06-25 20:31             ` Dean Gaudet
1998-06-30  6:40             ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox