Film - the bottleneck

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: Dade, jromang, tomb, zcott, coordinators

Re: Film - the bottleneck

Postby jeanphi » Mon Dec 26, 2011 3:14 am

Hi,

Ok, so after all it is required. I agree with the overall idea, however you should push the tiling and locking really low level so the current AddSample doesn't gain tile parameters, but you do the locking when really do splat something on the buffer (ie after the filter computations). Thus you know the span of the filter, you have all the data available and you can properly compute the locking boundaries and keep the locking periods as small as possible.

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: Film - the bottleneck

Postby Lord Crc » Mon Dec 26, 2011 3:30 am

Hm, sounds expensive in terms of locking. I'll give it a try and compare with my current scheme.

Sadly I didn't get a 24 core machine for xmas, so it's hard to test the different schemes scale under real pressure.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Film - the bottleneck

Postby B.Y.O.B. » Mon Dec 26, 2011 4:10 am

Lord Crc wrote:B.Y.O.B., I agree that having control over sampling density would be nice, it's something else than what this thread is all about though. :)
This is about how sample contributions are added to the film.

Ok. To me as an un-experienced person in this stuff it seemed that there maybe could have been a relationship ;)
User avatar
B.Y.O.B.
Developer
 
Posts: 5181
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: Film - the bottleneck

Postby Lord Crc » Mon Dec 26, 2011 4:23 am

B.Y.O.B. wrote:Ok. To me as an un-experienced person in this stuff it seemed that there maybe could have been a relationship ;)


Yes, it's a very deep and nasty part of the core this, not many have crawled this far and survived to tell the tale :P
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Film - the bottleneck

Postby jeanphi » Mon Dec 26, 2011 6:23 am

Lord Crc wrote:Hm, sounds expensive in terms of locking. I'll give it a try and compare with my current scheme.

Well, it shouldn't make a difference if you do the locking outside the loops, ie loop over each impacted tile, lock the tile, loop over each impacted pixel of the tile, splat, unlock the tile and move to the next one.

Lord Crc wrote:Sadly I didn't get a 24 core machine for xmas, so it's hard to test the different schemes scale under real pressure.

Same here :)

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: Film - the bottleneck

Postby Lord Crc » Mon Dec 26, 2011 6:37 am

jeanphi wrote:Well, it shouldn't make a difference if you do the locking outside the loops, ie loop over each impacted tile, lock the tile, loop over each impacted pixel of the tile, splat, unlock the tile and move to the next one.


But then the contribution pool will need to sort based on tiles, so the film must expose this. As such I don't see why we need to push the tile locking to the film. Seems better to keep it in one place? It's tricky enough as it is.

Anyway your initial post made me think we could perhaps do some lightweight spinlock-like locking per tile for each AddSample. Would be like a hybrid between full-blown tile locking and atomic adds. Could be interesting to try.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Film - the bottleneck

Postby jeanphi » Mon Dec 26, 2011 10:49 am

Lord Crc wrote:Anyway your initial post made me think we could perhaps do some lightweight spinlock-like locking per tile for each AddSample. Would be like a hybrid between full-blown tile locking and atomic adds. Could be interesting to try.

That's what I was trying to explain: don't sort contributions at the high level (actually the more random, the better for the locking in my proposed scheme) and lock the tiles as requested during AddSample for a given contribution.

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: Film - the bottleneck

Postby Lord Crc » Mon Dec 26, 2011 4:02 pm

Yes, I realized that after I had a nap :)

I'll give it a try.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Film - the bottleneck

Postby Lord Crc » Tue Dec 27, 2011 12:18 am

So, given that I have at least one potential improvement, and quite possibly two after I try out jeanphi's approach, and that I don't have the hardware to really test it...

Could I push these changes into a branch? Given the nature of the changes, one branch per approach would be nice. I could set up my own repo at bitbucket if you don't want to soil the official repo.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Film - the bottleneck

Postby jeanphi » Tue Dec 27, 2011 3:10 am

Hi,

I think that you should be able to experience the bottleneck by running more threads than you have cores. You can make branches in the main repo if you want, or bitbucket, or publish builds with your changes, ...

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

PreviousNext

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest