public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/26994] New: Performance regression with raise()
@ 2020-12-01 16:20 su-lifan at linux dot alibaba.com
2020-12-01 17:07 ` [Bug libc/26994] " adhemerval.zanella at linaro dot org
0 siblings, 1 reply; 2+ messages in thread
From: su-lifan at linux dot alibaba.com @ 2020-12-01 16:20 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26994
Bug ID: 26994
Summary: Performance regression with raise()
Product: glibc
Version: 2.24
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: su-lifan at linux dot alibaba.com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
With the following commit introduced in glibc-2.24:
```
commit 2ac88eecc57ff00e0b5ff803ebcc3465d2d640dd
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Fri Apr 22 09:25:20 2016 -0300
Refactor Linux raise implementation (BZ#15368)
This patch changes both the nptl and libc Linux raise implementation
to avoid the issues described in BZ#15368. The strategy used is
summarized in bug report first comment:
1. Block all signals (including internal NPTL ones);
2. Get pid and tid directly from syscall (not relying on cached
values);
3. Call tgkill;
4. Restore old signal mask.
Tested on x86_64 and i686.
```
This causes performance regression (around 20%) of will-it-scale/signal1_thread
with 1 worker. I examined the perf and confirmed the extra rt_sigprocmask
syscalls performed by raise().
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libc/26994] Performance regression with raise()
2020-12-01 16:20 [Bug libc/26994] New: Performance regression with raise() su-lifan at linux dot alibaba.com
@ 2020-12-01 17:07 ` adhemerval.zanella at linaro dot org
0 siblings, 0 replies; 2+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2020-12-01 17:07 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26994
Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |NOTABUG
CC| |adhemerval.zanella at linaro dot o
| |rg
--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
POSIX specifies raise to be async-signal-safe, and NPTL's raise() is
implemented as a call to pthread_kill(pthread_self(), sig) and this sequence is
is not async-signal-safe. If a signal handler forks during raise, the the
thread in the parent could receive the signal twice, once from itself and once
from the child.
The signal blocking is required to make obtaining the tid/pid atomically.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-01 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 16:20 [Bug libc/26994] New: Performance regression with raise() su-lifan at linux dot alibaba.com
2020-12-01 17:07 ` [Bug libc/26994] " adhemerval.zanella at linaro dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).