Bug 124723
Summary: | libc.nptl spinlock code is different from kernel? | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Bob Cook <bobcook47> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2 | Keywords: | FutureFeature |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-05-31 14:05:47 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Bob Cook
2004-05-28 20:36:50 UTC
#define spin_lock_string \from kernel -- note decb instead of decl? 47 "\n1:\t" \ 48 "lock ; decb %0\n\t" \ 49 "js 2f\n" \ 50 LOCK_SECTION_START("") \ 51 "2:\t" \ 52 "rep;nop\n\t" \ 53 "cmpb $0,%0\n\t" \ 54 "jle 2b\n\t" \ --note jumps are reversed from library? 55 "jmp 1b\n" \ 56 LOCK_SECTION_END Why does it need to be the same? In the kernel, the code can assume at most 128 CPUs trying to grab the spinlock. glibc cannot make assumptions on how many threads are trying to acquire the spinlock at once (well, it assumes at most 2^31 threads). |