lkml.org 
[lkml]   [2003]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Interesting VM feature?
Jamie Lokier wrote:
> You can call madvise(start, length, MADV_DONTNEED),
> or you can mmap() fresh empty pages into the region.

madvise appears to be exactly what I'm looking for.
(almost...)

> I have no idea if either of these methods is
efficient enough to be
> useful. Also, I don't know whether mmap() would
create multiple VMAs,
> or if it is clever enough to merge adjacent vmas
of anonymous private
> mappings regardles of offset.

Enough possible pitfalls that madvise becomes the
better solution.

> The ideal implementation would give the kernel the
_option_ of
> discarding pages until they are next touched, so
that they are
> discarded when there is memory pressure but
retained if not, avoiding
> the unnecessary zero-fill and cache flush.

Is madvise required to result in zero filled pages
by a standard, or is this just the commonly accepted
behavior?

> -- Jamie

Thanks a bunch,
Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.053 / U:3.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site