about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* Add a configure option to enable lock elision and disable by defaultAndi Kleen2013-07-028-0/+50
| | | | Can be enabled with --enable-lock-elision=yes at configure time.
* Disable elision for any pthread_mutexattr_settype callAndi Kleen2013-07-022-0/+10
| | | | | | | | | | PTHREAD_MUTEX_NORMAL requires deadlock for nesting, DEFAULT does not. Since glibc uses the same value (0) disable elision for any call to pthread_mutexattr_settype() with a 0 value. This implies that a program can disable elision by doing pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL) Based on a original proposal by Rich Felker.
* Add elision to pthread_mutex_{try,timed,un}lockAndi Kleen2013-07-0214-24/+267
| | | | | | | | | | | | | | | | | | | | | | | Add elision paths to the basic mutex locks. The normal path has a check for RTM and upgrades the lock to RTM when available. Trylocks cannot automatically upgrade, so they check for elision every time. We use a 4 byte value in the mutex to store the lock elision adaptation state. This is separate from the adaptive spin state and uses a separate field. Condition variables currently do not support elision. Recursive mutexes and condition variables may be supported at some point, but are not in the current implementation. Also "trylock" will not automatically enable elision unless some other lock call has been already called on the lock. This version does not use IFUNC, so it means every lock has one additional check for elision. Benchmarking showed the overhead to be negligible.
* Add minimal test suite changes for elision enabled kernelsAndi Kleen2013-07-023-1/+28
| | | | | | tst-mutex5 and 8 test some behaviour not required by POSIX, that elision changes. This changes these tests to not check this when elision is enabled at configure time.
* Add new internal mutex type flags for elision.Andi Kleen2013-07-023-9/+43
| | | | | | | | | | Add Enable/disable flags used internally Extend the mutex initializers to have the fields needed for elision. The layout stays the same, and this is not visible to programs. These changes are not exposed outside pthread
* Add the low level infrastructure for pthreads lock elision with TSXAndi Kleen2013-07-0212-0/+502
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lock elision using TSX is a technique to optimize lock scaling It allows to run locks in parallel using hardware support for a transactional execution mode in 4th generation Intel Core CPUs. See http://www.intel.com/software/tsx for more Information. This patch implements a simple adaptive lock elision algorithm based on RTM. It enables elision for the pthread mutexes and rwlocks. The algorithm keeps track whether a mutex successfully elides or not, and stops eliding for some time when it is not. When the CPU supports RTM the elision path is automatically tried, otherwise any elision is disabled. The adaptation algorithm and its tuning is currently preliminary. The code adds some checks to the lock fast paths. Micro-benchmarks show little to no difference without RTM. This patch implements the low level "lll_" code for lock elision. Followon patches hook this into the pthread implementation Changes with the RTM mutexes: ----------------------------- Lock elision in pthreads is generally compatible with existing programs. There are some obscure exceptions, which are expected to be uncommon. See the manual for more details. - A broken program that unlocks a free lock will crash. There are ways around this with some tradeoffs (more code in hot paths) I'm still undecided on what approach to take here; have to wait for testing reports. - pthread_mutex_destroy of a lock mutex will not return EBUSY but 0. - There's also a similar situation with trylock outside the mutex, "knowing" that the mutex must be held due to some other condition. In this case an assert failure cannot be recovered. This situation is usually an existing bug in the program. - Same applies to the rwlocks. Some of the return values changes (for example there is no EDEADLK for an elided lock, unless it aborts. However when elided it will also never deadlock of course) - Timing changes, so broken programs that make assumptions about specific timing may expose already existing latent problems. Note that these broken programs will break in other situations too (loaded system, new faster hardware, compiler optimizations etc.) - Programs with non recursive mutexes that take them recursively in a thread and which would always deadlock without elision may not always see a deadlock. The deadlock will only happen on an early or delayed abort (which typically happens at some point) This only happens for mutexes not explicitely set to PTHREAD_MUTEX_NORMAL or PTHREAD_MUTEX_ADAPTIVE_NP. PTHREAD_MUTEX_NORMAL mutexes do not elide. The elision default can be set at configure time. This patch implements the basic infrastructure for elision.
* Enable static 32-bit SSE4.2 strcasecmp/strncasecmpH.J. Lu2013-07-023-6/+6
|
* Implement fma in soft-fp.Joseph Myers2013-07-0221-109/+681
|
* ARM: Pass dl_hwcap to IFUNC resolver functions.Will Newton2013-07-022-1/+6
|
* Support no-FPU ColdFire in sysdeps/m68k/dl-trampoline.S and refactor code.Joseph Myers2013-06-302-24/+27
|
* tile: switch to using <fenv.h> fallback functionsChris Metcalf2013-06-307-165/+9
| | | | | Now that the fallback functions match the desired semantics for tile functions, just switch to using them.
* Add more NEWS items for 2.18.Joseph Myers2013-06-281-0/+15
|
* Skip SSE4.2 versions on Intel SilvermontLiubov Dmitrieva2013-06-286-15/+51
| | | | SSE2/SSSE3 versions are faster than SSE4.2 versions on Intel Silvermont.
* PowerPC: Define AT_HWCAP2 bits and AT_HWCAP2 handling for POWER8.Ryan S. Arnold2013-06-286-22/+85
|
* Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type.Ryan S. Arnold2013-06-2818-13/+89
|
* Consistently use page_shift in sysdeps/unix/sysv/linux/mmap64.c.Joseph Myers2013-06-282-1/+6
|
* Test for mprotect failure in dl-load.c (bug 12492).Pierre Ynard2013-06-283-13/+23
|
* Mark packed structure element used with atomic operation aligned.Nathan Froyd2013-06-282-1/+18
|
* Fix sysdeps/m68k/fpu_control.h preprocessor indentation.Joseph Myers2013-06-282-32/+36
|
* Support no-FPU ColdFire in sysdeps/m68k/fpu_control.h.Nathan Sidwell2013-06-282-3/+23
|
* Add a dlopen/getpagesize static executable test.Maciej W. Rozycki2013-06-284-3/+117
|
* [BZ #15022] Correct global-scope dlopen issues in static executables.Maciej W. Rozycki2013-06-289-42/+610
| | | | | | | | This change creates a link map in static executables to serve as the global search list for dlopen. It fixes a problem with the inability to access the global symbol object and a crash on an attempt to map a DSO into the global scope. Some code that has become dead after the addition of this link map is removed too and test cases are provided.
* [AArch64] Adjust elf_machine_dynamic to find _DYNAMIC via _GLOBAL_OFFSET_TABLE_Marcus Shawcroft2013-06-282-2/+7
|
* [AArch64] Simplify getcontext pstate initialization.Marcus Shawcroft2013-06-282-2/+6
|
* _dl_static_init: Remove nested locking.Maciej W. Rozycki2013-06-274-14/+14
| | | | | | | This function is now called from dl_open_worker with the GL(dl_load_lock) lock held and no longer needs local protection. GL(dl_load_lock) also correctly protects _dl_lookup_symbol_x called here that relies on the caller to have serialized access to the data structures it uses.
* Require GCC 4.4 or later to build glibc.Joseph Myers2013-06-265-6/+14
|
* Add a test for BZ #15674H.J. Lu2013-06-262-0/+27
|
* Mention BZ #15674H.J. Lu2013-06-261-1/+1
|
* Fix buffers overrun in x86_64 memcmp-ssse3.SLiubov Dmitrieva2013-06-262-4/+7
|
* [BZ #15022] Avoid repeated calls to DL_STATIC_INIT for the same module.Maciej W. Rozycki2013-06-262-4/+11
|
* Add AT_HWCAP2 as a new auxv_t a_type to elf.h.Ryan S. Arnold2013-06-262-1/+8
|
* drop NEWS mentionMike Frysinger2013-06-251-1/+0
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix missing libc-internal.h include.Richard Henderson2013-06-252-0/+5
| | | | * locale/programs/locarchive.c: Include <libc-internal.h>
* Update texinfo.tex.Joseph Myers2013-06-252-202/+358
|
* m68k: fix bad use of register alias in cfi insnAndreas Schwab2013-06-252-2/+7
|
* [BZ #15666] alpha: Add __sqrt*_finite definitionsRichard Henderson2013-06-249-1/+86
| | | | | With compatibility for ev6 and non-ev6 builds, as the non-ev6 did manage to get definitions emitted for the float and double functions.
* [BZ #10283] localedef: align fixed maps to SHMLBAMike Frysinger2013-06-245-29/+113
| | | | | | | | | | | | Many Linux arches require fixed mmaps to be aligned higher than pagesize, so use the SHMLBA define as it represents this quantity exactly. This fixes spurious errors seen on those arches like: cannot map archive header: Invalid argument URL: http://sourceware.org/bugzilla/show_bug.cgi?id=10283 Reported-by: CHIKAMA Masaki <masaki.chikama@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libc-internal.h: add ALIGN helper macrosMike Frysinger2013-06-242-0/+27
| | | | | | | Rather than open coding the masks, add helper macros to do the magic. This makes code easier to read. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* BZ #12310: pthread_exit in static app. segfaultsVladimir Nikulichev2013-06-243-12/+21
| | | | | | | | | | | | | | | | Static applications that call pthread_exit on the main thread segfault. This is because after a thread terminates __libc_start_main decrements __nptl_nthreads which is only defined in pthread_create. Therefore the right solution is to add a requirement to pthread_create from pthread_exit. ~~~ nptl/ 2013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com> [BZ #12310] * pthread_exit.c: Add reference to pthread_create.
* PowerPC: Enable POWER8 platform sans hwcap bits.Ryan S. Arnold2013-06-247-3/+34
|
* Regenerate INSTALL fileSiddhesh Poyarekar2013-06-242-3/+6
|
* Fix typo in commentSiddhesh Poyarekar2013-06-242-2/+6
|
* alpha: Update libm-test-ulpsRichard Henderson2013-06-232-32/+6392
|
* Include <string.h> in nptl/pthread_setattr_default_np.c.Joseph Myers2013-06-222-0/+5
|
* Include <string.h> in sysdeps/unix/sysv/linux/libc_fatal.c.Joseph Myers2013-06-222-0/+3
|
* Fix soft-fp shadowing between __FP_FRAC_ADD_3 and _FP_MUL_MEAT_2_wide_3mul ↵Joseph Myers2013-06-223-7/+13
| | | | (bug 15667).
* Remove dead DL_DST_REQ_STATIC code.Maciej W. Rozycki2013-06-222-13/+6
|
* Add sh4 implementation of fegetexceptflag (bug 15655).Kaz Kojima2013-06-221-1/+2
|
* Fix bad shift in soft-fp (bug 7006).Joseph Myers2013-06-213-14/+21
|
* dlfcn/Makefile: Avoid repeated $(*-ENV) definitions.Maciej W. Rozycki2013-06-212-1/+6
|