Re: wrong madvise(MADV_DONTNEED) semantic

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

 



On Tue, 28 June 2005 16:05:11 -0400, Robert Love wrote:
> 
> I like the idea (I think someone suggested this early on) of renaming
> the current MADV_DONTNEED to MADV_FREE and then adding a correct
> MADV_DONTNEED.

Imo, that's still a crime against common sense.  Madvice should give
the kernel some advice about which data to keep or not to keep in
memory, hence the name.  It should *not* tell the kernel to corrupt
data, which currently appears to be the case.

If the application knows 100% that it is the _only_ possible user of
this data and will never again use it, dropping dirty pages might be a
sane option.  Effectively that translates to anonymous memory only.
In all other cases, dirty pages should be written back.

> And, as I said, the man page needs clarification.

Definitely.

Jörn

-- 
Eighty percent of success is showing up.
-- Woody Allen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux