linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* POSIX_FADV_DONTNEED implemented wrong
@ 2013-02-22 19:57 Phillip Susi
  2013-02-22 20:29 ` Johannes Weiner
  0 siblings, 1 reply; 18+ messages in thread
From: Phillip Susi @ 2013-02-22 19:57 UTC (permalink / raw)
  To: linux-mm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I believe the current implementation for this is wrong.  For clean
pages, it immediately discards them from the cache, and for dirty
ones, it immediately tries to initiate writeout if the bdi is not
congested.  I believe this is wrong for three reasons:

1)  It is completely useless for writing files.  This hint should
allow a program generating lots of writes to files that will not
likely be read again to reduce the cache pressure that causes.

2)  When there is little to no cache pressure, this hint should not
cause the disk to spin up.

3)  This is supposed to be a hint that caching this data is unlikely
to do any good, so the cache should favor other data instead.  Just
because one process does not think it will be used again does not mean
it won't be, so when there is little to no cache pressure, we
shouldn't go discarding potentially useful data.

I'd like to change this to simply force the pages to the inactive
list, so they will be reclaimed sooner than other pages, but not
immediately discarded, or written out.

Also the related POSIX_FADV_NOREUSE is currently unimplemented, and
this should also cause the cache pages to skip the active list and go
straight to the inactive list.

Any thoughts or hints on how to go about doing this?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRJ82ZAAoJEJrBOlT6nu75i3YIAMjrwhzL28m/WbsD4m2BQaX9
swz0OlO9AimoQLE0vvbYSRYFmlGAayQafIOJU1GiLSijPGmHqisOePZpWnCKbesP
PeoHFxC+jDNHGrmIDHGOgq7ELAX6DNh5yU1sBhvo7iSnDCfjdfvJP7wWNyzCD/bD
FT7bEgQ1vjd6bB3812Qj3PBs/UHvHUj8zAJDAiArqMJSW6LgxINzjyXs030NRqxS
A1RUVUJ/4ydJz7SS4uitFWmObrpImIt6oxpQnIb1SOzL67KNx/YwMgWq/hknAS3H
ravePc2VwH2aS/gcyo2VW3OLHlIXOxgbjhZWbKidkNv6KsccEqqY8yFeO+fCvjA=
=dsVO
-----END PGP SIGNATURE-----

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-02-26 15:39 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-22 19:57 POSIX_FADV_DONTNEED implemented wrong Phillip Susi
2013-02-22 20:29 ` Johannes Weiner
2013-02-22 21:52   ` Phillip Susi
2013-02-23 22:57     ` [PATCH 0/2] FADV_DONTNEED and FADV_NOREUSE Phillip Susi
2013-02-23 22:58     ` [PATCH 1/2] mm: fadvise: fix POSIX_FADV_DONTNEED Phillip Susi
2013-02-24  1:46       ` Dave Hansen
2013-02-24  3:37         ` Phillip Susi
2013-02-24 18:24           ` Dave Hansen
2013-02-24 20:40             ` Phillip Susi
2013-02-24 21:25               ` Dave Hansen
2013-02-24 22:38                 ` Phillip Susi
2013-02-25 17:50                   ` Dave Hansen
2013-02-24  3:58       ` Zheng Liu
2013-02-24  4:04         ` Phillip Susi
2013-02-26  4:21       ` Minchan Kim
2013-02-26 14:06         ` Andrea Righi
2013-02-26 15:39           ` Phillip Susi
2013-02-23 22:58     ` [PATCH 2/2] mm: fadvise: implement POSIX_FADV_NOREUSE Phillip Susi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).