From owner-freebsd-hackers Thu May 18 8:44:59 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from arjun.niksun.com (gwnew.niksun.com [206.20.52.130]) by hub.freebsd.org (Postfix) with ESMTP id 82D0237B50D for ; Thu, 18 May 2000 08:44:56 -0700 (PDT) (envelope-from joy@niksun.com) Received: from falcon.niksun.com (falcon.niksun.com [10.0.0.167]) by arjun.niksun.com (8.9.3/8.9.3) with ESMTP id LAA13161; Thu, 18 May 2000 11:44:53 -0400 (EDT) (envelope-from joy@falcon.niksun.com) Message-ID: <39241002.1F03763A@falcon.niksun.com> Date: Thu, 18 May 2000 11:45:06 -0400 From: Joy Ganguly X-Mailer: Mozilla 4.51 [en] (X11; I; FreeBSD 3.2-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Matthew Dillon , freebsd-hackers Subject: Re: Question about file write???? References: <20000517160746.12768.qmail@www0a.netaddress.usa.net> <20000517102516.B14968@fw.wintelcom.net> <3922DB0F.9D9095C9@falcon.niksun.com> <20000517135644.D14968@fw.wintelcom.net> <39231E06.31DFB153@falcon.niksun.com> <200005172324.QAA28046@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Dillon wrote: > I think it would be a whole lot easier to implement mmap() on the > device, then allow the user process to mmap() the device buffer > and read() and write() it directly. I don't think you need to > implement any ioctl's for this problem. > > fd = open device > ptr = mmap(...) > > fd = open file > read(fd, ptr, BUFSIZE) read from file, store into device buf > ... > write(fd, ptr, BUFSIZE) read from device buf, store into file > > I can do that but will it improve performance? right now the ioctl which does the write takes substantially more time than the normal write from user space. Is this because the previous read touches the user space buffer and hence it is in the cache?? i am not very sure on this . any suggestions?? thanx in advance joy > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message