* Joy Ganguly <[EMAIL PROTECTED]> [000517 11:19] wrote:
> Alfred Perlstein wrote:
>
> > * Joy Ganguly <[EMAIL PROTECTED]> [000517 09:41] wrote:
> > >
> > > hi all,
> > >
> > > i have written a special ioctl which writes data into a file from a buffer in
> > > kernel memory. it invokes fo->fo_write() and involves one copy from kernel
> > > mem
> > > to disk cache. however this takes substantially more time than an ordinary
> > > write which copies from user space to the disk cache. any explanations???
> >
> > What are you using for your kernel to kernel copy?
> >
>
> fo->fo_write uses uiomove() with seg_flg = UIO_SYSSPACE. uiomove() uses
> bcopy() to do the actual copying. my ioctl sets up the struct uio to point to the
> kernel buf and calls fo->fo_write(). Hence the only difference between my ioctl
> and original write is that the former has seg_flg = UIO_SYSSPACE and the latter
> has UIO_USERSPACE.
>
>
>
> >
> > (copyin and friends are hand optimized for great speed when copying
> > from/to userspace)
> >
>
> what sort of optimizations are you referrring to?? is there some other way i can
> do this??
bcopy should be using the hand optimized code, I think you may have
to explain more of what you're doing if anyone is going to be able
to help.
--
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message