From: Dmitry Potapov Date: Mon, 15 Feb 2010 12:25:27 GMT Subject: Re: [PATCH] don't use mmap() to hash files Message-ID: <37fcd2781002150425od069e75ueaff424e2357d78b@mail.gmail.com> In-Reply-To: <4B78FC36.1090108@gnu.org> On Mon, Feb 15, 2010 at 10:48 AM, Paolo Bonzini wrote: > On 02/14/2010 08:56 PM, Dmitry Potapov wrote: >> >> It may not work without enough swap space > > No, the kernel will use the file itself as "swap" if it has to page out the > memory (since the mmap is PROT_READ). I was speaking about read(), when the whole file is read in memory. In this case, you are going to use a lot of "swap" and it is not pretty... That's why I said maybe we should have an option here... Dmitry