mtd comments

David Woodhouse dwmw2 at infradead.org
Tue Mar 14 12:17:37 EST 2000


> > If they're actually called with a kernel-space buffer, we use 
> > set_fs(KERNEL_DS) beforehand, which handles the rest of your question.

alex at cendio.se said:
> Oh, i didn't know about that trick. Well that seems like a good idea
> then. I suppose we have to fix all driver too. 

I'm not convinced that this is such a good idea. While copy_to_user() is free
on decent CPUs, we expect people to be using 386en for embedded systems, and
copy_to_user() is unnecessary overhead. 

The only front end which copies directly to userspace is the chardevice, isn't 
it? Everything else copies to kernel-space. As the chardevice is mainly a 
hacking and config tool - it's generally only used to put the filesystem on 
the device in the first place - I think it's best to slow it down rather than 
slowing down everything else - i.e. to make it allocate buffers and copy to 
userspace itself.

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list