public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
@ 2021-01-26 10:29 ` fweimer at redhat dot com
  2021-01-27  1:44 ` cd_songkun at hotmail dot com
                   ` (27 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: fweimer at redhat dot com @ 2021-01-26 10:29 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cd_songkun at hotmail dot com

--- Comment #7 from Florian Weimer <fweimer at redhat dot com> ---
*** Bug 27248 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
  2021-01-26 10:29 ` [Bug dynamic-link/19924] TLS performance degradation after dlopen fweimer at redhat dot com
@ 2021-01-27  1:44 ` cd_songkun at hotmail dot com
  2021-01-27 11:26 ` adhemerval.zanella at linaro dot org
                   ` (26 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-01-27  1:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #8 from ksong <cd_songkun at hotmail dot com> ---

We encountered the same problem. After using this patch, the performance has
improved, but we have seen that this case has not been updated after 2018 and
has not been merged upstream. Can we continue to push forward?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
  2021-01-26 10:29 ` [Bug dynamic-link/19924] TLS performance degradation after dlopen fweimer at redhat dot com
  2021-01-27  1:44 ` cd_songkun at hotmail dot com
@ 2021-01-27 11:26 ` adhemerval.zanella at linaro dot org
  2021-02-02 10:36 ` cd_songkun at hotmail dot com
                   ` (25 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2021-01-27 11:26 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #9 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
We need someone to rebase the previous patch [1], test if it really fixes the
issue, provide a testcase that reproduces the issue.  The last submission [1]
still have the same 'Tilera' common that Chris Metacalf has asked to be removed
and the commit message did not describe the issue not what it is aiming to fix. 

Also, as Szabolcs has added this issues related to the BZ#19329 and he
suggested first track this down to fix the correctness of this issue before
optimizing it.

[1] https://sourceware.org/pipermail/libc-alpha/2018-January/090810.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-01-27 11:26 ` adhemerval.zanella at linaro dot org
@ 2021-02-02 10:36 ` cd_songkun at hotmail dot com
  2021-02-17 19:20 ` rwmacleod at gmail dot com
                   ` (24 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-02-02 10:36 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #10 from ksong <cd_songkun at hotmail dot com> ---

It is difficult to reproduce the problem of providing test cases. Besides, how
can we push this problem forward? Can you give some suggestions and advance it
further?
For "rebase the previous patch",From the historical information, I think we can
continue to rely on "Philipp Trommler".

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-02-02 10:36 ` cd_songkun at hotmail dot com
@ 2021-02-17 19:20 ` rwmacleod at gmail dot com
  2021-02-23  2:26 ` cd_songkun at hotmail dot com
                   ` (23 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: rwmacleod at gmail dot com @ 2021-02-17 19:20 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Randy Macleod <rwmacleod at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rwmacleod at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-02-17 19:20 ` rwmacleod at gmail dot com
@ 2021-02-23  2:26 ` cd_songkun at hotmail dot com
  2021-02-23  2:47 ` carlos at redhat dot com
                   ` (22 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-02-23  2:26 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #11 from ksong <cd_songkun at hotmail dot com> ---
Created attachment 13253
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13253&action=edit
tls performace

Test step:
I clone newest version for glibc and compile it.

export glibc_install="$(pwd)/glibc/build/install"

git clone git://sourceware.org/git/glibc.git
cd glibc
mkdir build
cd build
../configure --prefix "$glibc_install"
make

Download test case and compile it. Generate tls_mini.

$LANG=C /home/ksong/work/package/glibc/build/elf/ld-linux-x86-64.so.2
--library-path
/home/ksong/work/test/tls:/home/ksong/work/package/glibc/build:/home/ksong/work/package/glibc/build/math:/home/ksong/work/package/glibc/build/elf:/home/ksong/work/package/glibc/build/dlfcn:/home/ksong/work/package/glibc/build/nss:/home/ksong/work/package/glibc/build/nis:/home/ksong/work/package/glibc/build/rt:/home/ksong/work/package/glibc/build/resolv:/home/ksong/work/package/glibc/build/crypt:/home/ksong/work/package/glibc/build/mathvec:/home/ksong/work/package/glibc/build/nptl:/lib64
--list ./tls_mini
linux-vdso.so.1 (0x00007ffdf37ce000)
libtls_access.so => /home/ksong/work/test/tls/libtls_access.so
(0x00007f0d812ff000)
libdl.so.2 => /home/ksong/work/package/glibc/build/dlfcn/libdl.so.2
(0x00007f0d810fb000)
libc.so.6 => /home/ksong/work/package/glibc/build/libc.so.6
(0x00007f0d80d3b000)
/lib64/ld-linux-x86-64.so.2 =>
/home/ksong/work/package/glibc/build/elf/ld-linux-x86-64.so.2
(0x00007f0d81704000)

Exec tls_mini.
$LANG=C /home/ksong/work/package/glibc/build/elf/ld-linux-x86-64.so.2
--library-path
/home/ksong/work/test/tls:/home/ksong/work/package/glibc/build:/home/ksong/work/package/glibc/build/math:/home/ksong/work/package/glibc/build/elf:/home/ksong/work/package/glibc/build/dlfcn:/home/ksong/work/package/glibc/build/nss:/home/ksong/work/package/glibc/build/nis:/home/ksong/work/package/glibc/build/rt:/home/ksong/work/package/glibc/build/resolv:/home/ksong/work/package/glibc/build/crypt:/home/ksong/work/package/glibc/build/mathvec:/home/ksong/work/package/glibc/build/nptl:/lib64
./tls_mini
time: 0.510322
time: 1.468314
time: 0.501844


after "git am --reject 0001-Fix-TLS-performance-degradation-after-dlopen.patch"

and recompile glibc.
Exec tls_mini
$LANG=C /home/ksong/work/package/glibc/build/elf/ld-linux-x86-64.so.2
--library-path
/home/ksong/work/test/tls:/home/ksong/work/package/glibc/build:/home/ksong/work/package/glibc/build/math:/home/ksong/work/package/glibc/build/elf:/home/ksong/work/package/glibc/build/dlfcn:/home/ksong/work/package/glibc/build/nss:/home/ksong/work/package/glibc/build/nis:/home/ksong/work/package/glibc/build/rt:/home/ksong/work/package/glibc/build/resolv:/home/ksong/work/package/glibc/build/crypt:/home/ksong/work/package/glibc/build/mathvec:/home/ksong/work/package/glibc/build/nptl:/lib64
./tls_mini
time: 0.585535
time: 0.555755
time: 0.554991

We can see a big change in the performance of dlopen.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2021-02-23  2:26 ` cd_songkun at hotmail dot com
@ 2021-02-23  2:47 ` carlos at redhat dot com
  2021-02-23  2:48 ` carlos at redhat dot com
                   ` (21 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: carlos at redhat dot com @ 2021-02-23  2:47 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com

--- Comment #12 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to ksong from comment #11)
> We can see a big change in the performance of dlopen.

It would be great if you could test Szabolcs series here and see if it has a
positive impact for you:
https://sourceware.org/pipermail/libc-alpha/2021-February/122626.html

My suspicion is that this bug is the same as 19329 or other related TLS races.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2021-02-23  2:47 ` carlos at redhat dot com
@ 2021-02-23  2:48 ` carlos at redhat dot com
  2021-02-23  8:10 ` thomas.perret+glibc at gresille dot org
                   ` (20 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: carlos at redhat dot com @ 2021-02-23  2:48 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=19329

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2021-02-23  2:48 ` carlos at redhat dot com
@ 2021-02-23  8:10 ` thomas.perret+glibc at gresille dot org
  2021-02-25  7:31 ` cd_songkun at hotmail dot com
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: thomas.perret+glibc at gresille dot org @ 2021-02-23  8:10 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Thomas Perret <thomas.perret+glibc at gresille dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thomas.perret+glibc@gresill
                   |                            |e.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2021-02-23  8:10 ` thomas.perret+glibc at gresille dot org
@ 2021-02-25  7:31 ` cd_songkun at hotmail dot com
  2021-02-25  7:33 ` cd_songkun at hotmail dot com
                   ` (18 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-02-25  7:31 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #13 from ksong <cd_songkun at hotmail dot com> ---
Refer 
https://sourceware.org/pipermail/libc-alpha/2021-February/122626.html
https://patchwork.ozlabs.org/project/glibc/list/?submitter=65667&page=4
Try backport patch form Szabolcs Nagy.
https://patchwork.ozlabs.org/project/glibc/patch/583EBBA0.9060709@arm.com/
https://patchwork.ozlabs.org/project/glibc/patch/583EBB99.8040101@arm.com/

Rebuild glibc.
Exec tls_mini test case.
[ctu-ksong-d1:tls]$LANG=C
/home/ksong/work/package/glibc/build/elf/ld-linux-x86-64.so.2 --library-path
/home/ksong/work/test/tls:/home/ksong/work/package/glibc/build:/home/ksong/work/package/glibc/build/math:/home/ksong/work/package/glibc/build/elf:/home/ksong/work/package/glibc/build/dlfcn:/home/ksong/work/package/glibc/build/nss:/home/ksong/work/package/glibc/build/nis:/home/ksong/work/package/glibc/build/rt:/home/ksong/work/package/glibc/build/resolv:/home/ksong/work/package/glibc/build/crypt:/home/ksong/work/package/glibc/build/mathvec:/home/ksong/work/package/glibc/build/nptl:/lib64
./tls_mini
time: 0.583575
time: 1.244377
time: 0.553654

It has some performance improvements, but not as obvious as the previous
solution.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2021-02-25  7:31 ` cd_songkun at hotmail dot com
@ 2021-02-25  7:33 ` cd_songkun at hotmail dot com
  2021-02-25  7:36 ` cd_songkun at hotmail dot com
                   ` (17 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-02-25  7:33 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #14 from ksong <cd_songkun at hotmail dot com> ---
Created attachment 13263
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13263&action=edit
0001-This-fixes-a-subset-of-the-issues-described-in.patch

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2021-02-25  7:33 ` cd_songkun at hotmail dot com
@ 2021-02-25  7:36 ` cd_songkun at hotmail dot com
  2021-02-25  9:54 ` cd_songkun at hotmail dot com
                   ` (16 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-02-25  7:36 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #15 from ksong <cd_songkun at hotmail dot com> ---
Created attachment 13264
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13264&action=edit
0002-This-patch-is-not-necessary-for-the-bug-fix-just-mak.patch

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2021-02-25  7:36 ` cd_songkun at hotmail dot com
@ 2021-02-25  9:54 ` cd_songkun at hotmail dot com
  2021-03-24 12:08 ` cd_songkun at hotmail dot com
                   ` (15 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-02-25  9:54 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #16 from ksong <cd_songkun at hotmail dot com> ---
Refer http://patches-tcwg.linaro.org/patch/49142/
I also try backport these patch.
[01/15] aarch64: free tlsdesc data on dlclose [BZ #27403]
[02/15] elf: Fix data race in _dl_name_match_p [BZ #21349]
[03/15] Add test case for [BZ #19329]
[04/15] Add a DTV setup test [BZ #27136]
[05/15] elf: Fix a DTV setup issue [BZ #27136]
[06/15] elf: Fix comments and logic in _dl_add_to_slotinfo
[07/15] elf: Refactor _dl_update_slotinfo to avoid use after free
[08/15] elf: Fix data races in pthread_create and TLS access [BZ #19329]
[09/15] elf: Use relaxed atomics for racy accesses [BZ #19329]
[10/15] elf: Fix DTV gap reuse logic [BZ #27135] 

and try to rebuild glibc, but for our testcase tls_mini, Performance has not
improved.

For below patch, 
[11/15] x86_64: Avoid lazy relocation of tlsdesc [BZ #27137]
[12/15] i386: Avoid lazy relocation of tlsdesc [BZ #27137]
[13/15] x86_64: Remove lazy tlsdesc relocation related code
[14/15] i386: Remove lazy tlsdesc relocation related code
[15/15] elf: Remove lazy tlsdesc relocation related code 

I backported them,but compile failed.
In file included from dynamic-link.h:92:0,
                 from dl-load.c:60:
../sysdeps/x86_64/dl-machine.h: In function ‘elf_machine_runtime_setup’:
../sysdeps/x86_64/dl-machine.h:132:23: error: ‘_dl_tlsdesc_resolve_rela’
undeclared (first use in this function); did you mean ‘_dl_tlsdesc_return’?
       = (ElfW(Addr)) &_dl_tlsdesc_resolve_rela;
                       ^~~~~~~~~~~~~~~~~~~~~~~~
                       _dl_tlsdesc_return
../sysdeps/x86_64/dl-machine.h:132:23: note: each undeclared identifier is
reported only once for each function it appears in

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2021-02-25  9:54 ` cd_songkun at hotmail dot com
@ 2021-03-24 12:08 ` cd_songkun at hotmail dot com
  2021-03-24 15:19 ` carlos at redhat dot com
                   ` (14 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-03-24 12:08 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #17 from ksong <cd_songkun at hotmail dot com> ---
hi,@all
For the issue, any update?
Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2021-03-24 12:08 ` cd_songkun at hotmail dot com
@ 2021-03-24 15:19 ` carlos at redhat dot com
  2021-05-18  2:57 ` cd_songkun at hotmail dot com
                   ` (13 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: carlos at redhat dot com @ 2021-03-24 15:19 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #18 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to ksong from comment #17)
> hi,@all
> For the issue, any update?
> Thanks!

None made yet. The bigger issue right now is probably reviewing Szabolc Nagy's
(Arm) work to remote data races from the early TLS access in the loader. I feel
like that work is a pre-requisite for even looking at this.
e.g. https://patchwork.sourceware.org/project/glibc/list/?series=1673

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2021-03-24 15:19 ` carlos at redhat dot com
@ 2021-05-18  2:57 ` cd_songkun at hotmail dot com
  2021-05-18 10:12 ` cd_songkun at hotmail dot com
                   ` (12 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-05-18  2:57 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #19 from ksong <cd_songkun at hotmail dot com> ---
Refer https://sourceware.org/bugzilla/show_bug.cgi?id=19329
I have seen some related modifications have been merged.
But based on the latest version, performance problems still have not improved,
some related code is not merged.
Please refer test result:
LANG=C /home/ksong/work/package/glibc/build/elf/ld-linux-x86-64.so.2
--library-path
/home/ksong/work/test/tls:/home/ksong/work/package/glibc/build:/home/ksong/work/package/glibc/build/math:/home/ksong/work/package/glibc/build/elf:/home/ksong/work/package/glibc/build/dlfcn:/home/ksong/work/package/glibc/build/nss:/home/ksong/work/package/glibc/build/nis:/home/ksong/work/package/glibc/build/rt:/home/ksong/work/package/glibc/build/resolv:/home/ksong/work/package/glibc/build/crypt:/home/ksong/work/package/glibc/build/mathvec:/home/ksong/work/package/glibc/build/nptl:/lib64
./tls_mini
time: 0.509420
time: 1.406026
time: 0.493889


I want to know what is next. 
Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2021-05-18  2:57 ` cd_songkun at hotmail dot com
@ 2021-05-18 10:12 ` cd_songkun at hotmail dot com
  2021-05-18 10:13 ` cd_songkun at hotmail dot com
                   ` (11 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-05-18 10:12 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #20 from ksong <cd_songkun at hotmail dot com> ---
Created attachment 13457
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13457&action=edit
Fix-TLS-performance-degradation-after-dlopen

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2021-05-18 10:12 ` cd_songkun at hotmail dot com
@ 2021-05-18 10:13 ` cd_songkun at hotmail dot com
  2021-05-18 13:11 ` adhemerval.zanella at linaro dot org
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-05-18 10:13 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #21 from ksong <cd_songkun at hotmail dot com> ---
Based on the latest version, I made a new patch
And did the same test, and its performance is obviously better. 
LANG=C
/home/ksong/work/package/glibc/build/elf/ld-linux-x86-64.so./ksong/work/test/tls:/home/ksong/work/package/glibc/build:/home/ksong/work/package/glibc/build/math:/home/ksong/wd/elf:/home/ksong/work/package/glibc/build/dlfcn:/home/ksong/work/package/glibc/build/nss:/home/ksong/work/package/ksong/work/package/glibc/build/rt:/home/ksong/work/package/glibc/build/resolv:/home/ksong/work/package/glibc/buwork/package/glibc/build/mathvec:/home/ksong/work/package/glibc/build/nptl:/lib64
./tls_mini
time: 0.583998
time: 0.560171
time: 0.553203

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (17 preceding siblings ...)
  2021-05-18 10:13 ` cd_songkun at hotmail dot com
@ 2021-05-18 13:11 ` adhemerval.zanella at linaro dot org
  2021-05-19  8:07 ` cd_songkun at hotmail dot com
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2021-05-18 13:11 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #22 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
The recent dynamic TLS fixes pushed upstream did not try to fix this issue.
Szabolcs send a RFC fix [1], and it seems to fix this issue.

[1]
https://patchwork.sourceware.org/project/glibc/patch/b116855de71098ef7dd2875dd3237f8f3ecc12c2.1618301209.git.szabolcs.nagy@arm.com/

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (18 preceding siblings ...)
  2021-05-18 13:11 ` adhemerval.zanella at linaro dot org
@ 2021-05-19  8:07 ` cd_songkun at hotmail dot com
  2021-06-22 11:01 ` cd_songkun at hotmail dot com
                   ` (8 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-05-19  8:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #23 from ksong <cd_songkun at hotmail dot com> ---
Thanks
I made new patch base newest version and do same test.
https://patchwork.sourceware.org/project/glibc/patch/b116855de71098ef7dd2875dd3237f8f3ecc12c2.1618301209.git.szabolcs.nagy@arm.com/.

LANG=C /home/ksong/work/package/glibc/build/elf/ld-linux-x86-64.so.2
--library-path
/home/ksong/work/test/tls:/home/ksong/work/package/glibc/build:/home/ksong/work/package/glibc/build/math:/home/ksong/work/package/glibc/build/elf:/home/ksong/work/package/glibc/build/dlfcn:/home/ksong/work/package/glibc/build/nss:/home/ksong/work/package/glibc/build/nis:/home/ksong/work/package/glibc/build/rt:/home/ksong/work/package/glibc/build/resolv:/home/ksong/work/package/glibc/build/crypt:/home/ksong/work/package/glibc/build/mathvec:/home/ksong/work/package/glibc/build/nptl:/lib64
./tls_mini
time: 0.551995
time: 0.545402
time: 0.544759

The performance has been improved.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (19 preceding siblings ...)
  2021-05-19  8:07 ` cd_songkun at hotmail dot com
@ 2021-06-22 11:01 ` cd_songkun at hotmail dot com
  2021-12-08  9:38 ` pgowda.cve at gmail dot com
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cd_songkun at hotmail dot com @ 2021-06-22 11:01 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #24 from ksong <cd_songkun at hotmail dot com> ---
For the patch.
https://patchwork.sourceware.org/project/glibc/patch/b116855de71098ef7dd2875dd3237f8f3ecc12c2.1618301209.git.szabolcs.nagy@arm.com/
When can it be merged into the main branch? 
Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (20 preceding siblings ...)
  2021-06-22 11:01 ` cd_songkun at hotmail dot com
@ 2021-12-08  9:38 ` pgowda.cve at gmail dot com
  2023-01-05 16:09 ` zimmerma+gcc at loria dot fr
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: pgowda.cve at gmail dot com @ 2021-12-08  9:38 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

pgowda <pgowda.cve at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pgowda.cve at gmail dot com

--- Comment #25 from pgowda <pgowda.cve at gmail dot com> ---
> The recent dynamic TLS fixes pushed upstream did not try to fix this issue.
> Szabolcs send a RFC fix [1], and it seems to fix this issue.

> https://patchwork.sourceware.org/project/glibc/patch/
> b116855de71098ef7dd2875dd3237f8f3ecc12c2.1618301209.git.szabolcs.nagy@arm.
> com/

Hi, 

Can anyone please update regarding the above mentioned patch?
Will it be merged upstream as its fixing the issue or should it be
further modified?

Thanks,
pgowda

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (21 preceding siblings ...)
  2021-12-08  9:38 ` pgowda.cve at gmail dot com
@ 2023-01-05 16:09 ` zimmerma+gcc at loria dot fr
  2023-01-06 10:43 ` nsz at gcc dot gnu.org
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2023-01-05 16:09 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Paul Zimmermann <zimmerma+gcc at loria dot fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zimmerma+gcc at loria dot fr

--- Comment #26 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
my advice is to send the patch to the libc-alpha list. This is the usual way
patches are proposed and reviewed:
https://sourceware.org/mailman/listinfo/libc-alpha

Please also include a small example demonstrating why the patch improves
things.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (22 preceding siblings ...)
  2023-01-05 16:09 ` zimmerma+gcc at loria dot fr
@ 2023-01-06 10:43 ` nsz at gcc dot gnu.org
  2023-07-04 13:55 ` gabravier at gmail dot com
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: nsz at gcc dot gnu.org @ 2023-01-06 10:43 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Szabolcs Nagy <nsz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nsz at gcc dot gnu.org

--- Comment #27 from Szabolcs Nagy <nsz at gcc dot gnu.org> ---
affects sage math too
https://trac.sagemath.org/ticket/34850

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (23 preceding siblings ...)
  2023-01-06 10:43 ` nsz at gcc dot gnu.org
@ 2023-07-04 13:55 ` gabravier at gmail dot com
  2023-09-01  7:22 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: gabravier at gmail dot com @ 2023-07-04 13:55 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Gabriel Ravier <gabravier at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gabravier at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (24 preceding siblings ...)
  2023-07-04 13:55 ` gabravier at gmail dot com
@ 2023-09-01  7:22 ` cvs-commit at gcc dot gnu.org
  2023-09-01  9:32 ` sam at gentoo dot org
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 29+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-01  7:22 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

--- Comment #28 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Szabolcs Nagy <nsz@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d2123d68275acc0f061e73d5f86ca504e0d5a344

commit d2123d68275acc0f061e73d5f86ca504e0d5a344
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Tue Feb 16 12:55:13 2021 +0000

    elf: Fix slow tls access after dlopen [BZ #19924]

    In short: __tls_get_addr checks the global generation counter and if
    the current dtv is older then _dl_update_slotinfo updates dtv up to the
    generation of the accessed module. So if the global generation is newer
    than generation of the module then __tls_get_addr keeps hitting the
    slow dtv update path. The dtv update path includes a number of checks
    to see if any update is needed and this already causes measurable tls
    access slow down after dlopen.

    It may be possible to detect up-to-date dtv faster.  But if there are
    many modules loaded (> TLS_SLOTINFO_SURPLUS) then this requires at
    least walking the slotinfo list.

    This patch tries to update the dtv to the global generation instead, so
    after a dlopen the tls access slow path is only hit once.  The modules
    with larger generation than the accessed one were not necessarily
    synchronized before, so additional synchronization is needed.

    This patch uses acquire/release synchronization when accessing the
    generation counter.

    Note: in the x86_64 version of dl-tls.c the generation is only loaded
    once, since relaxed mo is not faster than acquire mo load.

    I have not benchmarked this. Tested by Adhemerval Zanella on aarch64,
    powerpc, sparc, x86 who reported that it fixes the performance issue
    of bug 19924.

    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (25 preceding siblings ...)
  2023-09-01  7:22 ` cvs-commit at gcc dot gnu.org
@ 2023-09-01  9:32 ` sam at gentoo dot org
  2023-09-01  9:32 ` sam at gentoo dot org
  2023-09-04 12:13 ` fweimer at redhat dot com
  28 siblings, 0 replies; 29+ messages in thread
From: sam at gentoo dot org @ 2023-09-01  9:32 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (26 preceding siblings ...)
  2023-09-01  9:32 ` sam at gentoo dot org
@ 2023-09-01  9:32 ` sam at gentoo dot org
  2023-09-04 12:13 ` fweimer at redhat dot com
  28 siblings, 0 replies; 29+ messages in thread
From: sam at gentoo dot org @ 2023-09-01  9:32 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.39

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [Bug dynamic-link/19924] TLS performance degradation after dlopen
       [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
                   ` (27 preceding siblings ...)
  2023-09-01  9:32 ` sam at gentoo dot org
@ 2023-09-04 12:13 ` fweimer at redhat dot com
  28 siblings, 0 replies; 29+ messages in thread
From: fweimer at redhat dot com @ 2023-09-04 12:13 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19924

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #29 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for glibc 2.39.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2023-09-04 12:13 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19924-131@http.sourceware.org/bugzilla/>
2021-01-26 10:29 ` [Bug dynamic-link/19924] TLS performance degradation after dlopen fweimer at redhat dot com
2021-01-27  1:44 ` cd_songkun at hotmail dot com
2021-01-27 11:26 ` adhemerval.zanella at linaro dot org
2021-02-02 10:36 ` cd_songkun at hotmail dot com
2021-02-17 19:20 ` rwmacleod at gmail dot com
2021-02-23  2:26 ` cd_songkun at hotmail dot com
2021-02-23  2:47 ` carlos at redhat dot com
2021-02-23  2:48 ` carlos at redhat dot com
2021-02-23  8:10 ` thomas.perret+glibc at gresille dot org
2021-02-25  7:31 ` cd_songkun at hotmail dot com
2021-02-25  7:33 ` cd_songkun at hotmail dot com
2021-02-25  7:36 ` cd_songkun at hotmail dot com
2021-02-25  9:54 ` cd_songkun at hotmail dot com
2021-03-24 12:08 ` cd_songkun at hotmail dot com
2021-03-24 15:19 ` carlos at redhat dot com
2021-05-18  2:57 ` cd_songkun at hotmail dot com
2021-05-18 10:12 ` cd_songkun at hotmail dot com
2021-05-18 10:13 ` cd_songkun at hotmail dot com
2021-05-18 13:11 ` adhemerval.zanella at linaro dot org
2021-05-19  8:07 ` cd_songkun at hotmail dot com
2021-06-22 11:01 ` cd_songkun at hotmail dot com
2021-12-08  9:38 ` pgowda.cve at gmail dot com
2023-01-05 16:09 ` zimmerma+gcc at loria dot fr
2023-01-06 10:43 ` nsz at gcc dot gnu.org
2023-07-04 13:55 ` gabravier at gmail dot com
2023-09-01  7:22 ` cvs-commit at gcc dot gnu.org
2023-09-01  9:32 ` sam at gentoo dot org
2023-09-01  9:32 ` sam at gentoo dot org
2023-09-04 12:13 ` fweimer at redhat dot com

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).