Date: Wed, 17 May 2000 13:56:44 -0700 From: Alfred Perlstein <bright@wintelcom.net> To: Joy Ganguly <joy@niksun.com> Cc: freebsd-hackers <freebsd-hackers@freeBSD.org> Subject: Re: Question about file write???? Message-ID: <20000517135644.D14968@fw.wintelcom.net> In-Reply-To: <3922DB0F.9D9095C9@falcon.niksun.com>; from joy@niksun.com on Wed, May 17, 2000 at 01:46:55PM -0400 References: <20000517160746.12768.qmail@www0a.netaddress.usa.net> <20000517102516.B14968@fw.wintelcom.net> <3922DB0F.9D9095C9@falcon.niksun.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Joy Ganguly <joy@niksun.com> [000517 11:19] wrote: > Alfred Perlstein wrote: > > > * Joy Ganguly <joy.ganguly@usa.net> [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 - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000517135644.D14968>