[PATCH] elf: Simplify software TM implementation in _dl_find_object
Szabolcs Nagy
szabolcs.nagy@arm.com
Mon Jan 10 12:29:35 GMT 2022
The 01/10/2022 11:10, Florian Weimer wrote:
> With the current set of fences, the version update at the start
> of the TM write operation is redundant, and the version update
> at the end does not need to use an atomic read-modify-write
> operation.
>
> Also use relaxed MO stores during the dlclose update, and skip any
> version changes there.
>
> Suggested-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
>
> ---
> v2: Use __atomic_wide_counter_add_relaxed.
>
> This has been running over the weekend without any failures. The
> reasoning for only one version update (it becomes visible before
> subsequent updates to the data that has been read) makes sense to me.
>
> elf/dl-find_object.c | 56 +++++++++++++++++++---------------------------------
> 1 file changed, 20 insertions(+), 36 deletions(-)
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
More information about the Libc-alpha
mailing list