* [PATCH] elf: Use new dependency sorting algorithm by default
@ 2021-12-14 11:53 Florian Weimer
2021-12-14 12:10 ` Adhemerval Zanella
0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2021-12-14 11:53 UTC (permalink / raw)
To: libc-alpha
The default has to change eventually, and there are no known failures
that require a delay.
Tested on i686-linux-gnu and x86_64-linux-gnu.
---
NEWS | 7 ++++---
elf/dl-tunables.list | 2 +-
elf/tst-rtld-list-tunables.exp | 2 +-
manual/tunables.texi | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/NEWS b/NEWS
index b53f230cca..2aaece42f5 100644
--- a/NEWS
+++ b/NEWS
@@ -60,9 +60,10 @@ Major new features:
of the existing sorting algorithm when encountering particular circular
object dependency cases.
-* A new tunable, glibc.rtld.dynamic_sort, can be used to select between the two
- DSO sorting algorithms. The default setting of '1' uses the current existing
- algorithm, while a value of '2' selects the new DFS-based algorithm.
+* A new tunable, glibc.rtld.dynamic_sort, can be used to select between
+ the two DSO sorting algorithms. The default setting of '2' uses the
+ new DFS-based algorithm. The setting '1' switches to the old
+ algorithm used in glibc 2.33 and earlier.
* ABI support for a new function '__memcmpeq'. '__memcmpeq' is meant
to be used by compilers for optimizing usage of 'memcmp' when its
diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list
index 46ffb23784..ffcd7f18d4 100644
--- a/elf/dl-tunables.list
+++ b/elf/dl-tunables.list
@@ -162,7 +162,7 @@ glibc {
type: INT_32
minval: 1
maxval: 2
- default: 1
+ default: 2
}
}
}
diff --git a/elf/tst-rtld-list-tunables.exp b/elf/tst-rtld-list-tunables.exp
index 9bf572715f..44e4834cfb 100644
--- a/elf/tst-rtld-list-tunables.exp
+++ b/elf/tst-rtld-list-tunables.exp
@@ -10,6 +10,6 @@ glibc.malloc.tcache_max: 0x0 (min: 0x0, max: 0x[f]+)
glibc.malloc.tcache_unsorted_limit: 0x0 (min: 0x0, max: 0x[f]+)
glibc.malloc.top_pad: 0x0 (min: 0x0, max: 0x[f]+)
glibc.malloc.trim_threshold: 0x0 (min: 0x0, max: 0x[f]+)
-glibc.rtld.dynamic_sort: 1 (min: 1, max: 2)
+glibc.rtld.dynamic_sort: 2 (min: 1, max: 2)
glibc.rtld.nns: 0x4 (min: 0x1, max: 0x10)
glibc.rtld.optional_static_tls: 0x200 (min: 0x0, max: 0x[f]+)
diff --git a/manual/tunables.texi b/manual/tunables.texi
index 5d50b90f64..28ff502990 100644
--- a/manual/tunables.texi
+++ b/manual/tunables.texi
@@ -318,7 +318,7 @@ value of @samp{2}, a different algorithm is used, which implements a
topological sort through depth-first search, and does not exhibit the
performance issues of @samp{1}.
-The default value of this tunable is @samp{1}.
+The default value of this tunable is @samp{2}.
@end deftp
@node Elision Tunables
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] elf: Use new dependency sorting algorithm by default
2021-12-14 11:53 [PATCH] elf: Use new dependency sorting algorithm by default Florian Weimer
@ 2021-12-14 12:10 ` Adhemerval Zanella
0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella @ 2021-12-14 12:10 UTC (permalink / raw)
To: Florian Weimer, libc-alpha
On 14/12/2021 08:53, Florian Weimer wrote:
> The default has to change eventually, and there are no known failures
> that require a delay.
>
> Tested on i686-linux-gnu and x86_64-linux-gnu.
>
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> NEWS | 7 ++++---
> elf/dl-tunables.list | 2 +-
> elf/tst-rtld-list-tunables.exp | 2 +-
> manual/tunables.texi | 2 +-
> 4 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index b53f230cca..2aaece42f5 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -60,9 +60,10 @@ Major new features:
> of the existing sorting algorithm when encountering particular circular
> object dependency cases.
>
> -* A new tunable, glibc.rtld.dynamic_sort, can be used to select between the two
> - DSO sorting algorithms. The default setting of '1' uses the current existing
> - algorithm, while a value of '2' selects the new DFS-based algorithm.
> +* A new tunable, glibc.rtld.dynamic_sort, can be used to select between
> + the two DSO sorting algorithms. The default setting of '2' uses the
> + new DFS-based algorithm. The setting '1' switches to the old
> + algorithm used in glibc 2.33 and earlier.
>
> * ABI support for a new function '__memcmpeq'. '__memcmpeq' is meant
> to be used by compilers for optimizing usage of 'memcmp' when its
> diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list
> index 46ffb23784..ffcd7f18d4 100644
> --- a/elf/dl-tunables.list
> +++ b/elf/dl-tunables.list
> @@ -162,7 +162,7 @@ glibc {
> type: INT_32
> minval: 1
> maxval: 2
> - default: 1
> + default: 2
> }
> }
> }
> diff --git a/elf/tst-rtld-list-tunables.exp b/elf/tst-rtld-list-tunables.exp
> index 9bf572715f..44e4834cfb 100644
> --- a/elf/tst-rtld-list-tunables.exp
> +++ b/elf/tst-rtld-list-tunables.exp
> @@ -10,6 +10,6 @@ glibc.malloc.tcache_max: 0x0 (min: 0x0, max: 0x[f]+)
> glibc.malloc.tcache_unsorted_limit: 0x0 (min: 0x0, max: 0x[f]+)
> glibc.malloc.top_pad: 0x0 (min: 0x0, max: 0x[f]+)
> glibc.malloc.trim_threshold: 0x0 (min: 0x0, max: 0x[f]+)
> -glibc.rtld.dynamic_sort: 1 (min: 1, max: 2)
> +glibc.rtld.dynamic_sort: 2 (min: 1, max: 2)
> glibc.rtld.nns: 0x4 (min: 0x1, max: 0x10)
> glibc.rtld.optional_static_tls: 0x200 (min: 0x0, max: 0x[f]+)
> diff --git a/manual/tunables.texi b/manual/tunables.texi
> index 5d50b90f64..28ff502990 100644
> --- a/manual/tunables.texi
> +++ b/manual/tunables.texi
> @@ -318,7 +318,7 @@ value of @samp{2}, a different algorithm is used, which implements a
> topological sort through depth-first search, and does not exhibit the
> performance issues of @samp{1}.
>
> -The default value of this tunable is @samp{1}.
> +The default value of this tunable is @samp{2}.
> @end deftp
>
> @node Elision Tunables
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-14 12:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 11:53 [PATCH] elf: Use new dependency sorting algorithm by default Florian Weimer
2021-12-14 12:10 ` Adhemerval Zanella
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).