From: Manfred Spraul <manfred@colorfullife.com>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: single copy pipe/fifo
Date: Wed, 07 Feb 2001 22:10:32 +0100 [thread overview]
Message-ID: <3A81B9C8.476E66CF@colorfullife.com> (raw)
In-Reply-To: <3A81AE75.3CEF5577@colorfullife.com> <14977.46399.167035.94694@pizda.ninka.net>
"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)
write(fd,buf,64kB).
* creates kiobuf
* sleeps.
process 2 (on cpu 1)
read(fd,buf,64kB).
* reads the data
* now it must wake up, but it will return from the syscall, thus
wake_up_interruptible().
* 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
happens.
--
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-02-07 21:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-07 20:22 Manfred Spraul
2001-02-07 20:51 ` David S. Miller
2001-02-07 21:10 ` Manfred Spraul [this message]
2001-02-07 21:16 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A81B9C8.476E66CF@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®