Re: [Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2017-05-20 Thread Timothy Arceri
On 20/05/17 19:21, Timothy Arceri wrote: On 26/10/16 02:53, Daniel Vetter wrote: On Wed, Oct 19, 2016 at 03:34:12PM -0700, Ian Romanick wrote: On 10/19/2016 12:58 PM, Matt Turner wrote: On Wed, Oct 19, 2016 at 12:06 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: This patch removes locks aro

Re: [Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2017-05-20 Thread Timothy Arceri
On 26/10/16 02:53, Daniel Vetter wrote: On Wed, Oct 19, 2016 at 03:34:12PM -0700, Ian Romanick wrote: On 10/19/2016 12:58 PM, Matt Turner wrote: On Wed, Oct 19, 2016 at 12:06 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: This patch removes locks around reference counts in favor of atomic in

Re: [Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-25 Thread Daniel Vetter
On Wed, Oct 19, 2016 at 03:34:12PM -0700, Ian Romanick wrote: > On 10/19/2016 12:58 PM, Matt Turner wrote: > > On Wed, Oct 19, 2016 at 12:06 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: > >> This patch removes locks around reference counts in favor of atomic inc/dec > >> operations on the refcoun

Re: [Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-20 Thread Jan Ziak
On Thu, Oct 20, 2016 at 12:22 AM, Matt Turner wrote: > On Wed, Oct 19, 2016 at 1:58 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> The current git code and the patched code are fully equivalent to each >> other. In the unpatched code RefCount is always protected by a mutex >> and the RefCount a

Re: [Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-19 Thread Ian Romanick
On 10/19/2016 12:58 PM, Matt Turner wrote: > On Wed, Oct 19, 2016 at 12:06 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> This patch removes locks around reference counts in favor of atomic inc/dec >> operations on the refcounts. This makes the refcount adjustments much faster. > > I had the sa

Re: [Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-19 Thread Matt Turner
On Wed, Oct 19, 2016 at 1:58 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: > The current git code and the patched code are fully equivalent to each > other. In the unpatched code RefCount is always protected by a mutex > and the RefCount adjustment region protects just the RefCount (it > doesn't p

[Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-19 Thread Jan Ziak
This patch removes locks around reference counts in favor of atomic inc/dec operations on the refcounts. This makes the refcount adjustments much faster. The set of GL objects benefiting from this patch corresponds to the names of the patched files. The new code benefits applications in which the

Re: [Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-19 Thread Jan Ziak
The current git code and the patched code are fully equivalent to each other. In the unpatched code RefCount is always protected by a mutex and the RefCount adjustment region protects just the RefCount (it doesn't protect anything else) - in the patched code RefCount is always adjusted via p_atomic

Re: [Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-19 Thread Matt Turner
On Wed, Oct 19, 2016 at 12:06 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: > This patch removes locks around reference counts in favor of atomic inc/dec > operations on the refcounts. This makes the refcount adjustments much faster. I had the same idea last year and sent a patch series ([PATCH 0

[Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-19 Thread Jan Ziak
This patch removes locks around reference counts in favor of atomic inc/dec operations on the refcounts. This makes the refcount adjustments much faster. The set of GL objects benefiting from this patch corresponds to the names of the patched files. The new code benefits applications in which the