Re: How dose pipe work in aufs ?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 16 Feb 2004 12:03:15 +0100 (CET)

On Mon, 16 Feb 2004, [GB2312] ÏĺéÌÎ wrote:

> I had take a experiment today, and fund that the pipe mechanism is not
> necessary for aufs.

It is a tradeoff for aufs to not degrade heavily when there is only little
work.

> I know that the pipe is the mechanism to force the main process to
> resume when an disk I/O operation have completed. but I had inspect the
> source code, found the pipe was set non- blocked. and the callback
> function of the pipe just read characters from the pipe. Then how dose a
> non-blocked pipe force the main process to resume?

The worker thread writes a single character to this pipe when done. This
signals the poll/select loop that something has happened allowing the disk
I/O status to be polled. This all happens within the main loop. The pipe
is just there as an element which can be included in the main poll/select.

Without it the main thread does not notice the I/O worker thread have
finished the operation and I/O status will not be polled until poll/select
timeout or network activity.

It is quite likely the pipe activity can be further optimized to only
signal completetion via the pipe when required to break the above
mentioned degration. Maybe such simple change as the attached patch
improves your results? (please test)

Regards
Henrik

Received on Mon Feb 16 2004 - 04:03:29 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:04 MST