Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: [PATCH v2 3/3] grep: disable threading in all but worktree case

From: Thomas Rast <hidden>
Date: 2016-06-15 22:52:41

Ævar Arnfjörð Bjarmason [off-list ref] writes:
On Fri, Dec 2, 2011 at 14:07, Thomas Rast [off-list ref] wrote:
quoted
I conjecture that this is caused by contention on
read_sha1_mutex. [...] So disable threading entirely when not
scanning the worktree
Why does git-grep even need to keep a mutex to call read_sha1_file()?
It's inherently a read-only operation isn't it? If the lock is needed
because data is being shared between threads in sha1_file.c shouldn't
we tackle that instead of completely disabling threading?
The problem is that all sorts of data is shared.  See

  http://thread.gmane.org/gmane.comp.version-control.git/186618

But I need to go through it again, there are some races and double locks
in the posted version.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help