Messages in this thread |  | | | From | "Stephen C. Tweedie" <> | | Date | Wed, 9 Feb 2000 18:27:50 +0000 (GMT) | | Subject | Re: Copy_to_user() and locks. |
| |
Hi,
On Tue, 8 Feb 2000 15:46:34 -0500 (EST), "Richard B. Johnson" <root@chaos.analogic.com> said:
> You must not copy_to_user() under a lock. This is because the > user's pages may not be in memory and the kernel needs to page- > fault.
> Unfortunately, this often means that you have to copy twice, double > buffer. However, a typical PC nowdays can copy over 800 megabytes per > second.
Correct. However, what you _can_ do is to allocate kernel memory and access that from your driver, and to map that same memory into user space so that it is visible from a user process without copying.
--Stephen
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
|  |