Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-14465

ThreadLocal gcc optimization

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Fix
    • Minor
    • feature-backlog
    • 3.0.1
    • couchbase-bucket
    • Security Level: Public
    • None

    Description

      https://github.com/couchbase/ep-engine/blob/3.0.1/src/threadlocal.h

      has only two options, win32 and posix.

      while on linux on gcc we have __thread keyword, which is known to be implemented much more efficient than posix approach.

      under x86 32/64 access to tls variable is gs: selector indexed and offset in that selector is set by runtime-linker.
      so no pthread_getspecific is required at all.
      no call, no hash tables jumps, no nothing.

      please consider to use it.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chiyoung Chiyoung Seo (Inactive)
            paf Alexander Petrossian (PAF)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty