This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: IO space memcpy support for userspace.
- From: Roland McGrath <roland at redhat dot com>
- To: "Dave Airlie" <airlied at gmail dot com>
- Cc: "linux-kernel at vger dot kernel dot org" <linux-kernel at vger dot kernel dot org>, libc-alpha at sources dot redhat dot com
- Date: Fri, 5 Dec 2008 12:27:46 -0800 (PST)
- Subject: Re: IO space memcpy support for userspace.
- References: <21d7e9970812041940h29994c60w3e7bcf20b96efe04@mail.gmail.com>
There is never going to be something in memcpy that makes any magical
kernel calls to find out about an address. That's just loony, sorry.
memcpy is inlined away by the compiler in good cases. It's like you'd
asked for "*ptr" to have magical constraints by the compiler generating
code to ask the kernel if "ptr" is a special address. Uh, really?
If you can think of an efficient way to determine it and do what you need,
then you could write optimized routines that do that in the vDSO perhaps.
Thanks,
Roland