[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] MT renderer
From:       dlila () redhat ! com (Denis Lila)
Date:       2011-02-16 1:40:20
Message-ID: 2123821376.95822.1297820420382.JavaMail.root () zmail04 ! collab ! prod ! int ! phx2 ! redhat ! com
[Download RAW message or body]

Hi Jim,

Here's the first draft of the multithreading in pisces:
http://icedtea.classpath.org/~dlila/webrevs/MT/webrev/

There's 1-2 bugs in there somewhere. There's an OOB
in splitEdgesAtStrips which shouldn't be hard to fix,
and I saw an instance where I miss a crossing and the
whole line is filled (but I may have fixed this - I need
to run the tests again).

As for performance, the overhead right now is horrible,
but that's probably because on every frame we're creating
N threads, destroying them, creating N again, and destroying
them again. This can be fixed very easily by just making the
thread pool static and waiting for all the tasks to finish
by comparing the number of completed tasks to the number of
submitted tasks. There are some other things we can do to
reduce overhead, and I'm confident we can either make it
negligible (for small tasks) or make it so the gains from
parallelism offset it completely.

For large tasks, even the above implementation is very fast.
On a 2-core machine it takes about 65-75% of the time taken
by the single threaded version. I think the gains should
be roughly linear with the number of processors. I will
test on a 6 core machine to confirm this, and I'll update
you when I'm done.

If anyone else on this list has experience with parallel
computing, I'd love to hear your thoughts.

One more thing. I'm pretty sure I introduced a bug in
my last push. I already filed it. bugid: 7019861

Regards,
Denis.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic