POSIX_FADV_DONTNEED implemented wrong

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]