Subject: Re: page reuse while accessing files sequentially
To: <>
From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
List: tech-kern
Date: 06/04/2004 10:18:08
--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jun 04, 2004 at 10:07:41AM +0200, Frank Kardel wrote:
> Hi *,
>=20
> just a few thoughs with respect to vm page usage, i haven't checked wheth=
er
> this has been discussed before, if it has: I am sorry.
>=20
> When writing a large backup data is copied sequentially from a file to=20
> some place else.
> The vm system seemingly keeps these pages around just like any other=20
> file pages. Thus there is a constant need for fresh pages and thus all
> other file pages are pushed out in favor of the pages for the sequential
> file copy.

I don't know whether this actually works sufficiently well with the=20
current VM implementation and pmaps, but...

your backup program should mmap() the files to read and
madvise(addr, len, MADV_SEQUENTIAL) them.

(Unless you need madvise(addr, len, MADV_RANDOM), of course.)

Regards,
	-is

--azLHFNyN32YCQGCU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: 2.6.i

iQEVAgUBQMAwPjCn4om+4LhpAQFdEggAlPAE8kC76v0smuMO2WfN/HVXzGVa6fAj
fdhT1pysbsIc6vpl/PMXpY114SEkJEu1tgFNakEQGTF3OjW2bM9RJnLjALKSgs27
OON7lzKkxYGC7kAvSwoQIZT/qQvPwfw3UBbQ5fOyxpCHFYhLs8StCMc8qxsNFcE4
oPreKiAagqNitHRVxuc1QxNTBFRjR4VlKQ2DJWxr0zRwAapnF83FRa2oNbqzJKLo
5uw4U+xfpEHxh9ZhnWrIHzze7r4TvAFE+RHY6eQhqsLkk02Wc5HLSLlYSsEixY/G
az2+tZAFK6HKFXKCrt6+WRfNKIE9fpwneypNSobg8XoAx2fEmEwpTQ==
=hJ6A
-----END PGP SIGNATURE-----

--azLHFNyN32YCQGCU--