Re: Atomic operation for physically moving a page

From: Dave Hansen
Date: Fri Jun 18 2004 - 21:56:05 EST


On Fri, 2004-06-18 at 18:03, Valdis.Kletnieks@xxxxxx wrote:
> On Fri, 18 Jun 2004 17:37:12 PDT, Ashwin Rao <ashwin_s_rao@xxxxxxxxx> said:
> > I want to copy a page from one physical location to
> > another (taking the appr. locks).
>
> At the risk of sounding stupid, what problem are you trying to solve by copying
> a page? Not only (as you note) could the page be referenced by multiple
> processes, it could (conceivably) belong to a kernel slab or something, or be a
> buffer for an in-flight I/O request, or any number of other possibly-racy
> situations.

You also have to make sure that the page is something who's physical
address is allowed to change. Some stuff like DMA buffers, or a part of
a hugetlb page might not even be valid to move.

-- Dave

-
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/