man-db-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Man-db-devel] An attempt at making mandb multithreaded


From: Kari Pahula
Subject: [Man-db-devel] An attempt at making mandb multithreaded
Date: Mon, 19 Mar 2012 21:17:35 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

I already talked about this with cjwatson and his opinion was that
trying to turn mandb multithreaded might not be the best way to try to
speed it up.  It's not that I necessarily disagreed with that, but I'm
just bad at giving up on an idea.

As it stands, mandb processes directories one at a time.  My idea was
that what it does in each directory is isolated enough so that it
should be possible to parallelise.  I used pthreads for that.  I've
attached a tarball with two patches against man-db 2.6.1, one to turn
mandb thread safe, mainly by turning some global variables into
function parameters, and another to actually start worker threads and
such.

My patches don't actually work.  The file names readdir returns get
somehow corrupted if I try to enable multiple threads.  readdir should
be thread safe when used on separete DIR pointers but there's still
something odd going on that I'm not going to use more time to debug.

Anyway, here it is, if anyone would want to look at it.  Better email
it here than let it be forgotten on my hard disk.

Attachment: man-db-2.6.1-threaded-patches.tar.gz
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]