Re: single copy pipe/fifo

From: Manfred Spraul (
Date: Wed Feb 07 2001 - 16:10:32 EST

"David S. Miller" wrote:
> Manfred Spraul writes:
> > * if you run 2 instances on a dual cpu P II/350 it's a big win, but if
> > you run only one instance, then the bw_pipe processes will jump from one
> > cpu to the other and it's only a small improvement (~+15%).
> wake_up_interruptible_sync is meant specifically to avoid
> this cpu hopping behavior.
I use it whereever possible, but in this case it's not possible:
pipe is empty.

process 1 (on cpu 1)
        * creates kiobuf
        * sleeps.

process 2 (on cpu 1)
        * reads the data
        * now it must wake up, but it will return from the syscall, thus
        * wakeup notices that cpu1 is busy and sends process 1 to cpu 2
        * read returns
        read(fd, buf, 64kB)
        * no data waiting, sleeps.

process 1 (on cpu 2)
        * write returns
        write(fd, buf, 64 kB)
        * creates kiobuf
        * wake_up_interruptible_sync(), since it will schedule
        * schedule()
but now schedule will pull process 2 to cpu 2

I haven't verified the sequence with kdb, but I'm certain that this

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Feb 07 2001 - 21:00:28 EST