On Thu, 18 Dec 2008, James Pickens wrote: > On Thu, Dec 18, 2008, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > So instead of doing all the unpacking etc in parallel (with locking around > > it to serialize it), I'd suggest doing ll the unpacking serially since > > that isn't the problem anyway (and since you have to protect it with a > > lock anyway), and just have a "write out and free the buffer" phase that > > is done in the threads. > > That's certainly a more elegant way to do it, but unless I'm missing > something, it requires rewriting a good bit of code. The main reason I > went with the locking was to keep the patch as simple and non-intrusive > as possible. Yeah, I looked a bit more at it, and one problem is that we don't just write out the file, we also refresh the cache with the stat information after writing it out. If we just write the thing out, it would be simpler: we'd just make the thread locklessly write things out and free the data from a simple set of lockless threads - no need for any access to git data structures. Ho humm. I'll think about it a bit more. Linus -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html