Re: Thread implementations...

Larry McVoy (lm@bitmover.com)
Fri, 26 Jun 1998 14:59:50 -0700


Then you are back to paying the overhead of looking at user virtual pages,
converting them to physical pages, etc. All a waste. As you push the
performance up, this waste becomes the dominant factor. Linux is nowhere
near that point, but it SGI is.

Just from an esthetic point of view, playing with user virtual addresses
when what you really want are physical pages is a lose. And that lose
turns into cycles.

: In that case, do you really lose much from normal read/write -- esp
: if you have a "raw" read mode directly into user space?
:
:
: On Fri, Jun 26, 1998 at 02:37:28PM -0700, Larry McVoy wrote:
: > This mode only works if there is a perfect ``impedance match'' between
: > the source and the sink. What if you need to do a bunch of small reads
: > from the source and then one large write to the sink? This is not a
: > made up example, it occurs all the time when trying to source from the
: > network and sink to the disk when the disk a a logical volume that needs
: > to get sent a large chunk in order to go fast.
: >
: > : What's wrong with ?
: > : /dev/sendfile
: > :
: > : struct transmit { int fdin,fdout,count};
: > : struct complete {int countsent, errorin,errorout}
: > :
: > : /* implement sendfile */
: > : sendfile(fd1,fd2,count) {
: > : int fd;
: > : struct transmit t;
: > : struct complete r;
: > :
: > : fd = open("/dev/sendfile",2,synchronous);
: > : transmit.fdin = f1;
: > : transmit.fdin = f2;
: > : write(fd,&transmit,sizeof transmit); /* ask to transfer */
: > : read(fd,&complete, sizeof complete); /* read status */
: > : }
:
: --
:
: ---------------------------------
: Victor Yodaiken
: Department of Computer Science
: New Mexico Institute of Mining and Technology
: Socorro NM 87801
: Homepage http://www.cs.nmt.edu/~yodaiken
: PowerPC Linux page http://linuxppc.cs.nmt.edu
: Real-Time Page http://rtlinux.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu