This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Tue May 7 21:56:30 2024 Received: from spaans.ds9a.nl (adsl-xs4all.ds9a.nl [213.84.159.51]) by kylie.puddingonline.com (8.11.6/8.11.6) with SMTP id g8IHXMX28392 for ; Wed, 18 Sep 2002 19:33:23 +0200 Received: (qmail 6083 invoked from network); 18 Sep 2002 06:34:34 -0000 Received: from unknown (HELO spaans.ds9a.nl) (3ffe:8280:10:360:202:44ff:fe2a:a1dd) by mayo.ipv6.ds9a.nl with SMTP; 18 Sep 2002 06:34:34 -0000 Received: (qmail 5079 invoked by uid 1000); 17 Sep 2002 20:03:29 -0000 Received: (maildatabase); juh Received: (qmail 19279 invoked by alias); 20 Feb 2001 14:50:56 -0000 Received: (qmail 19276 invoked from network); 20 Feb 2001 14:50:55 -0000 Received: from vger.kernel.org (199.183.24.194) by spaans-smp.ds9a.tudelft.nl with SMTP; 20 Feb 2001 14:50:55 -0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 20 Feb 2001 09:49:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 20 Feb 2001 09:49:24 -0500 Received: from mandrakesoft.mandrakesoft.com ([216.71.84.35]:24080 "EHLO mandrakesoft.mandrakesoft.com") by vger.kernel.org with ESMTP id ; Tue, 20 Feb 2001 09:49:18 -0500 Received: from localhost (jgarzik@localhost) by mandrakesoft.mandrakesoft.com (8.8.5/8.8.5) with SMTP id IAA19901; Tue, 20 Feb 2001 08:49:12 -0600 Date: Tue, 20 Feb 2001 08:49:12 -0600 (CST) From: Jeff Garzik To: Norbert Roos Cc: linux-kernel@vger.kernel.org Subject: Re: Probs with PCI bus master DMA to user space In-Reply-To: <3A927AE9.CE3B88F9@berlin.de> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Feb 2001, Norbert Roos wrote: > Jeff Garzik wrote: > > > > But the buffers are usually allocated with malloc() by any application > > > which wants to use my driver.. otherwise my driver would have to offer a > > > malloc-like function, but I can hardly force the application to use my > > > own malloc function. > > > > If you are writing the driver, sure you can. > > ?? > > The application is doing something like > > fd = open("/dev/mydriver"); > buf = malloc(); > fill_buffer_with_data(buf); >  write(fd,buf); > > And now i should tell the programmer not to use malloc() but my special > driver-malloc? > Or do you mean something different? fd = open(...); buf = mmap(fd, ...); fill_buffer_with_data(buf); ioctl(fd, ...); /* tell kernel data is there */ There are variations depending on the application, but you get the picture. A buffer copy is eliminated when mmap is used, too, making your application faster. Jeff - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/