Re: [RFC \ WISH] Add -o option to git-rev-list
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Dec 11, 2006, 20:40 UTC
- Message-ID
- <Pine.LNX.4.64.0612111238560.3515@woody.osdl.org>
- In-Reply-To
- <200612112128.06485.Josef.Weidendorfer@gmx.de>
On Mon, 11 Dec 2006, Josef Weidendorfer wrote:
Show 8 quoted lines
> > A general question: How many context switches are involved in such > a producer/consumer scenario, given that the consumer writes one > line at a time, and the consumer uses poll/select to wait for the > data? > Is there some possibility to make the kernel write-combine single > small producer writes into bigger chunks, which will be delivered > at once (or smaller data only after a small timeout)?
The data will be write-combined.
The kernel doesn't context-switch after a write() to a pipe if there is space left (and usually the pipe buffer is 64kB with current kernels, so there obviously will be), unless the reader has a higher priority for some reason (ie the reader has been waiting a long time).
So _normally_ you'll see many many writes in one go, and only see context switching when the kernel pipe buffer fills up.