Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2000 15:51:58 -0700
From:      David Greenman <dg@root.com>
To:        Jonathan Lemon <jlemon@flugsvamp.com>
Cc:        Mike Smith <msmith@FreeBSD.ORG>, arch@FreeBSD.ORG
Subject:   Re: kblob discussion. 
Message-ID:  <200006192251.PAA18923@implode.root.com>
In-Reply-To: Your message of "Mon, 19 Jun 2000 17:20:41 CDT." <20000619172041.G37084@prism.flugsvamp.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>> > Also, if I want to send data from disk -> network, with the kblob
>> > API, I essentially have the following sequence of calls:
>> >
>> > 	read(fd, address, length)
>> > 	kblob(address, length)
>> > 	kblobsend(...)
>> > 
>> > which is to say, the data is copied from
>> > 	disk -> userspace   (assuming direct I/O)
>> >  	userspace -> kernel,
>> > 	kernel -> network.
>> > 
>> > Why shouldn't I be able to bypass second copy entirely and do:
>> > 	disk -> kernel     (data now in kernel 'blob')
>> > 	kernel -> network
>> 
>> Because this isn't what you use kblob for.  That's what you use sendfile 
>> for.
>
>But sendfile doesn't leave the data cached in kernel space for reuse,
>so it isn't suitable for this.

   I think you need to review the code a bit more closely. sendfile()
definately leaves the pages cached, and definately uses any cached pages
that it finds, thus avoiding I/O when possible.

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
Manufacturer of high-performance Internet servers - http://www.terasolutions.com
Pave the road of life with opportunities.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006192251.PAA18923>