Re: [RFC][patch 0/2] mm: remove PageReserved

From: Roman Zippel
Date: Tue Aug 09 2005 - 14:50:05 EST


Hi,

On Tue, 9 Aug 2005, Hugh Dickins wrote:

> PageReserved is about those pages which are managed by PageReserved.
> But quite what it means is unclear, one of the reasons to eliminate it.
> (Why is kernel text PageReserved?)

Short answer: /dev/mem
(Amazing that nobody mentioned it so far...)

To understand PageReserved it probably helps to know its history. One of
the first users of this was X so it can map the video memory. This flag
was the only way to distinguish which pages can be mapped this way, as
remap_page_range() has no idea who owns the page. The vm also used this
flag to skip these pages.

Later this was also used by drivers to map pages into user space using
remap_page_range() (as alternative to the nopage handler). Only later came
VM_RESERVED, IIRC it was first an optimization to avoid scanning these
mappings.

So the actual meaning of this flag is that if it's set the page structure
must not be changed and all fields must be treated as reserved. Only the
owner of the page who did set this flag can do whatever he wants with it.

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