Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Spinlocks

Date2009-05-01 11:47
Frommichael.gogins@gmail.com
SubjectRe: [Cs-dev] Spinlocks
Performance is indeed the motivation for these spinlocks. I am looking to 
the near future where 4 or more cores are running Csound instruments on up 
to dozens of threads. In that case, spinlocks seem to promise a significant 
performance advantage over mutexes, especially because we would not expect 
the locks to do much actual spinning. Each lock contention would be in cache 
and involve a short loop and some CAS, rather than hopping out to the OS.

Regards,
Mike

----- Original Message ----- 
From: "Felipe Sateler" 
To: "Developer discussions" 
Sent: Friday, May 01, 2009 12:05 AM
Subject: Re: [Cs-dev] Spinlocks


> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf


--------------------------------------------------------------------------------


> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 


------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-05-11 10:34
FromFelipe Sateler
SubjectRe: [Cs-dev] Spinlocks
AttachmentsNone  

Date2009-05-11 10:54
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Spinlocks
Indeed.  Talking it over with local experts I had concluded that we should
use mutexes until and unless we have a need for spinlocks.  I was going to
attemot that change when time allowed.  Feel free......
=John ff

> Perhaps we could use mutexes as a start and then optionally change them to
> spinlocks when supported. Since using either is very similar in pthreads
> implementation, we can switch them to test if spinlocks are effectively
> faster.
>
> El viernes 1 de mayo, michael.gogins@gmail.com escribió:
>> Performance is indeed the motivation for these spinlocks. I am looking
>> to
>> the near future where 4 or more cores are running Csound instruments on
>> up
>> to dozens of threads. In that case, spinlocks seem to promise a
>> significant
>> performance advantage over mutexes, especially because we would not
>> expect
>> the locks to do much actual spinning. Each lock contention would be in
>> cache and involve a short loop and some CAS, rather than hopping out to
>> the
>> OS.
>>
>> Regards,
>> Mike
>>
>> ----- Original Message -----
>> From: "Felipe Sateler" 
>> To: "Developer discussions" 
>> Sent: Friday, May 01, 2009 12:05 AM
>> Subject: Re: [Cs-dev] Spinlocks
>>
>> > -------------------------------------------------------------------------
>> >----- Register Now & Save for Velocity, the Web Performance &
>> Operations
>> > Conference from O'Reilly Media. Velocity features a full day of
>> > expert-led, hands-on workshops and two days of sessions from industry
>> > leaders in dedicated Performance & Operations tracks. Use code
>> vel09scf
>> > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>>
>> ---------------------------------------------------------------------------
>>-----
>>
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ---------------------------------------------------------------------------
>>--- Register Now & Save for Velocity, the Web Performance & Operations
>> Conference from O'Reilly Media. Velocity features a full day of
>> expert-led, hands-on workshops and two days of sessions from industry
>> leaders in dedicated Performance & Operations tracks. Use code vel09scf
>> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> Saludos,
> Felipe Sateler
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-05-11 12:48
FromFelipe Sateler
SubjectRe: [Cs-dev] Spinlocks
AttachmentsNone  

Date2009-05-11 13:02
FromMichael Gogins
SubjectRe: [Cs-dev] Spinlocks
I chose spinlocks over mutexes because with more than a couple of
cores and real-time ksmps, spinlocks seem very likely to be more
efficient. Think about 16 cores and kr = 8820.

Do you really, really want to make a system call 141,120 times per second?

Locks are exported because in future opcodes may need to call them. We
do not yet know if opcode writers will need to pay attention to
locking and unlock things in the Csound core.

It does no harm to export them, and may cause harm not to export them.

Regards,
Mike

On 5/11/09, Felipe Sateler  wrote:
> I'm taking a shot at replacing the current spinlock implementation with
> mutexes. However, it seems that it will require an API bump:
>
> PUBLIC int *csoundGetChannelLock
>
> I don't get why do locks have to be exported, though.
>
> El lunes 11 de mayo, jpff@cs.bath.ac.uk escribió:
>> Indeed.  Talking it over with local experts I had concluded that we should
>> use mutexes until and unless we have a need for spinlocks.  I was going to
>> attemot that change when time allowed.  Feel free......
>> =John ff
>>
>> > Perhaps we could use mutexes as a start and then optionally change them
>> > to spinlocks when supported. Since using either is very similar in
>> > pthreads implementation, we can switch them to test if spinlocks are
>> > effectively faster.
>> >
>> > El viernes 1 de mayo, michael.gogins@gmail.com escribió:
>> >> Performance is indeed the motivation for these spinlocks. I am looking
>> >> to
>> >> the near future where 4 or more cores are running Csound instruments on
>> >> up
>> >> to dozens of threads. In that case, spinlocks seem to promise a
>> >> significant
>> >> performance advantage over mutexes, especially because we would not
>> >> expect
>> >> the locks to do much actual spinning. Each lock contention would be in
>> >> cache and involve a short loop and some CAS, rather than hopping out to
>> >> the
>> >> OS.
>> >>
>> >> Regards,
>> >> Mike
>> >>
>> >> ----- Original Message -----
>> >> From: "Felipe Sateler" 
>> >> To: "Developer discussions" 
>> >> Sent: Friday, May 01, 2009 12:05 AM
>> >> Subject: Re: [Cs-dev] Spinlocks
>> >>
>> >> > ----------------------------------------------------------------------
>> >> >--- ----- Register Now & Save for Velocity, the Web Performance &
>> >>
>> >> Operations
>> >>
>> >> > Conference from O'Reilly Media. Velocity features a full day of
>> >> > expert-led, hands-on workshops and two days of sessions from industry
>> >> > leaders in dedicated Performance & Operations tracks. Use code
>> >>
>> >> vel09scf
>> >>
>> >> > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> >>
>> >> ------------------------------------------------------------------------
>> >>--- -----
>> >>
>> >> > _______________________________________________
>> >> > Csound-devel mailing list
>> >> > Csound-devel@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >> ------------------------------------------------------------------------
>> >>--- --- Register Now & Save for Velocity, the Web Performance &
>> >> Operations Conference from O'Reilly Media. Velocity features a full day
>> >> of expert-led, hands-on workshops and two days of sessions from
>> >> industry
>> >> leaders in dedicated Performance & Operations tracks. Use code vel09scf
>> >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> > Saludos,
>> > Felipe Sateler
>> >
>> > -------------------------------------------------------------------------
>> >----- The NEW KODAK i700 Series Scanners deliver under ANY circumstances!
>> > Your production scanning environment may not be a perfect world - but
>> > thanks to Kodak, there's a perfect scanner to get the job done! With the
>> > NEW KODAK i700
>> > Series Scanner you'll get full speed at 300 dpi even with all image
>> > processing features enabled. http://p.sf.net/sfu/kodak-com
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ---------------------------------------------------------------------------
>>--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances!
>> Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>> i700 Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> Saludos,
> Felipe Sateler
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-05-11 13:13
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Spinlocks
One could leave the API unchanged if the int was used as an index into a
tatable of pthread_mutex_t*
  Painful but saves all the gassle of API change?

I still think mutexs are better that spinlocks; with the parallel Csound
we have seen scheduling problems with spinlocks.

==John ff

> I'm taking a shot at replacing the current spinlock implementation with
> mutexes. However, it seems that it will require an API bump:
>
> PUBLIC int *csoundGetChannelLock
>
> I don't get why do locks have to be exported, though.
>
> El lunes 11 de mayo, jpff@cs.bath.ac.uk escribió:
>> Indeed.  Talking it over with local experts I had concluded that we
>> should
>> use mutexes until and unless we have a need for spinlocks.  I was going
>> to
>> attemot that change when time allowed.  Feel free......
>> =John ff
>>
>> > Perhaps we could use mutexes as a start and then optionally change
>> them
>> > to spinlocks when supported. Since using either is very similar in
>> > pthreads implementation, we can switch them to test if spinlocks are
>> > effectively faster.
>> >
>> > El viernes 1 de mayo, michael.gogins@gmail.com escribió:
>> >> Performance is indeed the motivation for these spinlocks. I am
>> looking
>> >> to
>> >> the near future where 4 or more cores are running Csound instruments
>> on
>> >> up
>> >> to dozens of threads. In that case, spinlocks seem to promise a
>> >> significant
>> >> performance advantage over mutexes, especially because we would not
>> >> expect
>> >> the locks to do much actual spinning. Each lock contention would be
>> in
>> >> cache and involve a short loop and some CAS, rather than hopping out
>> to
>> >> the
>> >> OS.
>> >>
>> >> Regards,
>> >> Mike
>> >>
>> >> ----- Original Message -----
>> >> From: "Felipe Sateler" 
>> >> To: "Developer discussions" 
>> >> Sent: Friday, May 01, 2009 12:05 AM
>> >> Subject: Re: [Cs-dev] Spinlocks
>> >>
>> >> > ----------------------------------------------------------------------
>> >> >--- ----- Register Now & Save for Velocity, the Web Performance &
>> >>
>> >> Operations
>> >>
>> >> > Conference from O'Reilly Media. Velocity features a full day of
>> >> > expert-led, hands-on workshops and two days of sessions from
>> industry
>> >> > leaders in dedicated Performance & Operations tracks. Use code
>> >>
>> >> vel09scf
>> >>
>> >> > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> >>
>> >> ------------------------------------------------------------------------
>> >>--- -----
>> >>
>> >> > _______________________________________________
>> >> > Csound-devel mailing list
>> >> > Csound-devel@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >> ------------------------------------------------------------------------
>> >>--- --- Register Now & Save for Velocity, the Web Performance &
>> >> Operations Conference from O'Reilly Media. Velocity features a full
>> day
>> >> of expert-led, hands-on workshops and two days of sessions from
>> industry
>> >> leaders in dedicated Performance & Operations tracks. Use code
>> vel09scf
>> >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> > Saludos,
>> > Felipe Sateler
>> >
>> > -------------------------------------------------------------------------
>> >----- The NEW KODAK i700 Series Scanners deliver under ANY
>> circumstances!
>> > Your production scanning environment may not be a perfect world - but
>> > thanks to Kodak, there's a perfect scanner to get the job done! With
>> the
>> > NEW KODAK i700
>> > Series Scanner you'll get full speed at 300 dpi even with all image
>> > processing features enabled. http://p.sf.net/sfu/kodak-com
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ---------------------------------------------------------------------------
>>--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances!
>> Your
>> production scanning environment may not be a perfect world - but thanks
>> to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>> i700 Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> Saludos,
> Felipe Sateler
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-05-11 13:48
FromFelipe Sateler
SubjectRe: [Cs-dev] Spinlocks
AttachmentsNone  

Date2009-05-24 09:14
FromFelipe Sateler
SubjectRe: [Cs-dev] Spinlocks
AttachmentsNone  None  None  

Date2009-05-24 16:25
FromMichael Gogins
SubjectRe: [Cs-dev] Spinlocks
I am using them. Please do not remove them unless you replace them
with something else that does the same job, only better. If you do
remove them I will put them back.

Regards,
Mike

On 5/24/09, Felipe Sateler  wrote:
> Since nobody is using these functions yet we can consider them an error, and
> stop exporting them. Technically we changed the API, but no harm is done.
>
> El lunes 11 de mayo, jpff@cs.bath.ac.uk escribió:
>> One could leave the API unchanged if the int was used as an index into a
>> tatable of pthread_mutex_t*
>>   Painful but saves all the gassle of API change?
>>
>> I still think mutexs are better that spinlocks; with the parallel Csound
>> we have seen scheduling problems with spinlocks.
>>
>> ==John ff
>>
>> > I'm taking a shot at replacing the current spinlock implementation with
>> > mutexes. However, it seems that it will require an API bump:
>> >
>> > PUBLIC int *csoundGetChannelLock
>> >
>> > I don't get why do locks have to be exported, though.
>> >
>> > El lunes 11 de mayo, jpff@cs.bath.ac.uk escribió:
>> >> Indeed.  Talking it over with local experts I had concluded that we
>> >> should
>> >> use mutexes until and unless we have a need for spinlocks.  I was going
>> >> to
>> >> attemot that change when time allowed.  Feel free......
>> >> =John ff
>> >>
>> >> > Perhaps we could use mutexes as a start and then optionally change
>> >>
>> >> them
>> >>
>> >> > to spinlocks when supported. Since using either is very similar in
>> >> > pthreads implementation, we can switch them to test if spinlocks are
>> >> > effectively faster.
>> >> >
>> >> > El viernes 1 de mayo, michael.gogins@gmail.com escribió:
>> >> >> Performance is indeed the motivation for these spinlocks. I am
>> >>
>> >> looking
>> >>
>> >> >> to
>> >> >> the near future where 4 or more cores are running Csound instruments
>> >>
>> >> on
>> >>
>> >> >> up
>> >> >> to dozens of threads. In that case, spinlocks seem to promise a
>> >> >> significant
>> >> >> performance advantage over mutexes, especially because we would not
>> >> >> expect
>> >> >> the locks to do much actual spinning. Each lock contention would be
>> >>
>> >> in
>> >>
>> >> >> cache and involve a short loop and some CAS, rather than hopping out
>> >>
>> >> to
>> >>
>> >> >> the
>> >> >> OS.
>> >> >>
>> >> >> Regards,
>> >> >> Mike
>> >> >>
>> >> >> ----- Original Message -----
>> >> >> From: "Felipe Sateler" 
>> >> >> To: "Developer discussions" 
>> >> >> Sent: Friday, May 01, 2009 12:05 AM
>> >> >> Subject: Re: [Cs-dev] Spinlocks
>> >> >>
>> >> >> > -------------------------------------------------------------------
>> >> >> >--- --- ----- Register Now & Save for Velocity, the Web Performance
>> >> >> > &
>> >> >>
>> >> >> Operations
>> >> >>
>> >> >> > Conference from O'Reilly Media. Velocity features a full day of
>> >> >> > expert-led, hands-on workshops and two days of sessions from
>> >>
>> >> industry
>> >>
>> >> >> > leaders in dedicated Performance & Operations tracks. Use code
>> >> >>
>> >> >> vel09scf
>> >> >>
>> >> >> > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >>--- --- -----
>> >> >>
>> >> >> > _______________________________________________
>> >> >> > Csound-devel mailing list
>> >> >> > Csound-devel@lists.sourceforge.net
>> >> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >>--- --- --- Register Now & Save for Velocity, the Web Performance &
>> >> >> Operations Conference from O'Reilly Media. Velocity features a full
>> >>
>> >> day
>> >>
>> >> >> of expert-led, hands-on workshops and two days of sessions from
>> >>
>> >> industry
>> >>
>> >> >> leaders in dedicated Performance & Operations tracks. Use code
>> >>
>> >> vel09scf
>> >>
>> >> >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> >> >> _______________________________________________
>> >> >> Csound-devel mailing list
>> >> >> Csound-devel@lists.sourceforge.net
>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >
>> >> > Saludos,
>> >> > Felipe Sateler
>> >> >
>> >> > ----------------------------------------------------------------------
>> >> >--- ----- The NEW KODAK i700 Series Scanners deliver under ANY
>> >>
>> >> circumstances!
>> >>
>> >> > Your production scanning environment may not be a perfect world - but
>> >> > thanks to Kodak, there's a perfect scanner to get the job done! With
>> >>
>> >> the
>> >>
>> >> > NEW KODAK i700
>> >> > Series Scanner you'll get full speed at 300 dpi even with all image
>> >> > processing features enabled. http://p.sf.net/sfu/kodak-com
>> >> > _______________________________________________
>> >> > Csound-devel mailing list
>> >> > Csound-devel@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >> ------------------------------------------------------------------------
>> >>--- --- The NEW KODAK i700 Series Scanners deliver under ANY
>> >> circumstances! Your
>> >> production scanning environment may not be a perfect world - but thanks
>> >> to
>> >> Kodak, there's a perfect scanner to get the job done! With the NEW
>> >> KODAK
>> >> i700 Series Scanner you'll get full speed at 300 dpi even with all
>> >> image
>> >> processing features enabled. http://p.sf.net/sfu/kodak-com
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> > Saludos,
>> > Felipe Sateler
>> >
>> > -------------------------------------------------------------------------
>> >----- The NEW KODAK i700 Series Scanners deliver under ANY circumstances!
>> > Your production scanning environment may not be a perfect world - but
>> > thanks to Kodak, there's a perfect scanner to get the job done! With the
>> > NEW KODAK i700
>> > Series Scanner you'll get full speed at 300 dpi even with all image
>> > processing features enabled. http://p.sf.net/sfu/kodak-com
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ---------------------------------------------------------------------------
>>--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances!
>> Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>> i700 Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> Saludos,
> Felipe Sateler
>


-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-05-25 01:53
FromFelipe Sateler
SubjectRe: [Cs-dev] Spinlocks
Don't worry, I won't remove them if someone is using them. And also
wasn't planning on removing them if there was no consensus.

Saludos,
Felipe Sateler



On Mon, May 25, 2009 at 01:25, Michael Gogins  wrote:
> I am using them. Please do not remove them unless you replace them
> with something else that does the same job, only better. If you do
> remove them I will put them back.
>
> Regards,
> Mike
>
> On 5/24/09, Felipe Sateler  wrote:
>> Since nobody is using these functions yet we can consider them an error, and
>> stop exporting them. Technically we changed the API, but no harm is done.
>>
>> El lunes 11 de mayo, jpff@cs.bath.ac.uk escribió:
>>> One could leave the API unchanged if the int was used as an index into a
>>> tatable of pthread_mutex_t*
>>>   Painful but saves all the gassle of API change?
>>>
>>> I still think mutexs are better that spinlocks; with the parallel Csound
>>> we have seen scheduling problems with spinlocks.
>>>
>>> ==John ff
>>>
>>> > I'm taking a shot at replacing the current spinlock implementation with
>>> > mutexes. However, it seems that it will require an API bump:
>>> >
>>> > PUBLIC int *csoundGetChannelLock
>>> >
>>> > I don't get why do locks have to be exported, though.
>>> >
>>> > El lunes 11 de mayo, jpff@cs.bath.ac.uk escribió:
>>> >> Indeed.  Talking it over with local experts I had concluded that we
>>> >> should
>>> >> use mutexes until and unless we have a need for spinlocks.  I was going
>>> >> to
>>> >> attemot that change when time allowed.  Feel free......
>>> >> =John ff
>>> >>
>>> >> > Perhaps we could use mutexes as a start and then optionally change
>>> >>
>>> >> them
>>> >>
>>> >> > to spinlocks when supported. Since using either is very similar in
>>> >> > pthreads implementation, we can switch them to test if spinlocks are
>>> >> > effectively faster.
>>> >> >
>>> >> > El viernes 1 de mayo, michael.gogins@gmail.com escribió:
>>> >> >> Performance is indeed the motivation for these spinlocks. I am
>>> >>
>>> >> looking
>>> >>
>>> >> >> to
>>> >> >> the near future where 4 or more cores are running Csound instruments
>>> >>
>>> >> on
>>> >>
>>> >> >> up
>>> >> >> to dozens of threads. In that case, spinlocks seem to promise a
>>> >> >> significant
>>> >> >> performance advantage over mutexes, especially because we would not
>>> >> >> expect
>>> >> >> the locks to do much actual spinning. Each lock contention would be
>>> >>
>>> >> in
>>> >>
>>> >> >> cache and involve a short loop and some CAS, rather than hopping out
>>> >>
>>> >> to
>>> >>
>>> >> >> the
>>> >> >> OS.
>>> >> >>
>>> >> >> Regards,
>>> >> >> Mike
>>> >> >>
>>> >> >> ----- Original Message -----
>>> >> >> From: "Felipe Sateler" 
>>> >> >> To: "Developer discussions" 
>>> >> >> Sent: Friday, May 01, 2009 12:05 AM
>>> >> >> Subject: Re: [Cs-dev] Spinlocks
>>> >> >>
>>> >> >> > -------------------------------------------------------------------
>>> >> >> >--- --- ----- Register Now & Save for Velocity, the Web Performance
>>> >> >> > &
>>> >> >>
>>> >> >> Operations
>>> >> >>
>>> >> >> > Conference from O'Reilly Media. Velocity features a full day of
>>> >> >> > expert-led, hands-on workshops and two days of sessions from
>>> >>
>>> >> industry
>>> >>
>>> >> >> > leaders in dedicated Performance & Operations tracks. Use code
>>> >> >>
>>> >> >> vel09scf
>>> >> >>
>>> >> >> > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>>> >> >>
>>> >> >> ---------------------------------------------------------------------
>>> >> >>--- --- -----
>>> >> >>
>>> >> >> > _______________________________________________
>>> >> >> > Csound-devel mailing list
>>> >> >> > Csound-devel@lists.sourceforge.net
>>> >> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >> >>
>>> >> >> ---------------------------------------------------------------------
>>> >> >>--- --- --- Register Now & Save for Velocity, the Web Performance &
>>> >> >> Operations Conference from O'Reilly Media. Velocity features a full
>>> >>
>>> >> day
>>> >>
>>> >> >> of expert-led, hands-on workshops and two days of sessions from
>>> >>
>>> >> industry
>>> >>
>>> >> >> leaders in dedicated Performance & Operations tracks. Use code
>>> >>
>>> >> vel09scf
>>> >>
>>> >> >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>>> >> >> _______________________________________________
>>> >> >> Csound-devel mailing list
>>> >> >> Csound-devel@lists.sourceforge.net
>>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >> >
>>> >> > Saludos,
>>> >> > Felipe Sateler
>>> >> >
>>> >> > ----------------------------------------------------------------------
>>> >> >--- ----- The NEW KODAK i700 Series Scanners deliver under ANY
>>> >>
>>> >> circumstances!
>>> >>
>>> >> > Your production scanning environment may not be a perfect world - but
>>> >> > thanks to Kodak, there's a perfect scanner to get the job done! With
>>> >>
>>> >> the
>>> >>
>>> >> > NEW KODAK i700
>>> >> > Series Scanner you'll get full speed at 300 dpi even with all image
>>> >> > processing features enabled. http://p.sf.net/sfu/kodak-com
>>> >> > _______________________________________________
>>> >> > Csound-devel mailing list
>>> >> > Csound-devel@lists.sourceforge.net
>>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >>
>>> >> ------------------------------------------------------------------------
>>> >>--- --- The NEW KODAK i700 Series Scanners deliver under ANY
>>> >> circumstances! Your
>>> >> production scanning environment may not be a perfect world - but thanks
>>> >> to
>>> >> Kodak, there's a perfect scanner to get the job done! With the NEW
>>> >> KODAK
>>> >> i700 Series Scanner you'll get full speed at 300 dpi even with all
>>> >> image
>>> >> processing features enabled. http://p.sf.net/sfu/kodak-com
>>> >> _______________________________________________
>>> >> Csound-devel mailing list
>>> >> Csound-devel@lists.sourceforge.net
>>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >
>>> > Saludos,
>>> > Felipe Sateler
>>> >
>>> > -------------------------------------------------------------------------
>>> >----- The NEW KODAK i700 Series Scanners deliver under ANY circumstances!
>>> > Your production scanning environment may not be a perfect world - but
>>> > thanks to Kodak, there's a perfect scanner to get the job done! With the
>>> > NEW KODAK i700
>>> > Series Scanner you'll get full speed at 300 dpi even with all image
>>> > processing features enabled. http://p.sf.net/sfu/kodak-com
>>> > _______________________________________________
>>> > Csound-devel mailing list
>>> > Csound-devel@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>> ---------------------------------------------------------------------------
>>>--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances!
>>> Your
>>> production scanning environment may not be a perfect world - but thanks to
>>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>>> i700 Series Scanner you'll get full speed at 300 dpi even with all image
>>> processing features enabled. http://p.sf.net/sfu/kodak-com
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>> Saludos,
>> Felipe Sateler
>>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://li