[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e8340490903262235g6174c6b4t4bfd76311be91eeb@mail.gmail.com>
Date: Fri, 27 Mar 2009 01:35:18 -0400
From: Bryan Donlan <bdonlan@...il.com>
To: sidc7 <siddhartha.chhabra@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Copy-on-write
On Fri, Mar 27, 2009 at 1:15 AM, sidc7 <siddhartha.chhabra@...il.com> wrote:
>
> When the kernel does a COW, say from a "src" to a "dest" page, does it need
> to map the "src" and "dest" page to its address space or the kernel can
> directly initiate the read from "src" and write to "dest" page ?
If the source and destination pages are not in high memory (exactly
where this boundary is depends on your architecture) they do not need
to be mapped before copying. See cow_user_page in mm/memory.c,
copy_user_highpage in include/linux/highmem.h and kmap_atomic in
arch/x86/mm/highmem_32.c (as well as implementations for other
architectures)
Note that on 64-bit platforms, generally there will be no high memory,
and so remappings will never be needed to carry out a COW.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists