This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libgomp: Introduce gomp_thread::spare_team


On Mon, Jul 13, 2015 at 08:32:33AM +0200, Sebastian Huber wrote:
> Ping.

Space in gomp_thread is precious, that is a TLS variable, and you want
to only handle the non-nested case only anyway, so why don't you
just try to use
if (thr->thread_pool)
  {
    struct gomp_thread *last_team = thr->thread_pool->last_team;
    if (last_team && last_team->nthreads == nthreads)
      {
	team = last_team;
	thr->thread_pool->last_team = NULL;
      }
  }
?

The move of mutex, barrier and sem inits/destroy is possible (on Linux
likely not measurable due to destroys being nops and inits being very cheap,
but on other OSes it might be).

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]