[Nepomuk] High mutex contention in Nepomuk2::Resource
David Faure
faure at kde.org
Fri Mar 8 16:52:10 UTC 2013
On Friday 08 March 2013 11:10:50 Simeon Bird wrote:
> > Note that I detected an error in the use of the "modification mutex" within
> > Resource. I had used it only for "writes" to variables, but obviously the
> >
> >> reads must be mutex-protected too. Now that I understand the C++11 memory
> >> model, it's a lot clearer :)
> >> I'll rename the mutex then, it's not a "modification mutex", it's a mutex
> >> for
> >> the resource member variables.
> >
> > Uhm. Okay.
>
> Does the extra locking fix
> https://bugs.kde.org/show_bug.cgi?id=305024 which is some sort of
> memory corruption in the client-side resource
> watcher? It seems to be threading related, since it is intermittent...
I can't say for sure. My fixes are not related to DBus at all.
Is ResourceWatcher used from multiple threads at the same time? It's not
mutex-protected at all. But it doesn't sound like a class that needs thread-
safety to me.
I suppose the only way to find out if there are still data races will be to run
kmail in helgrind again, as I did some time ago...
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
More information about the Nepomuk
mailing list