From: Florian Weimer <fweimer@redhat.com>
To: Szabolcs Nagy <szabolcs.nagy@arm.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] elf: Simplify software TM implementation in _dl_find_object
Date: Fri, 07 Jan 2022 17:29:02 +0100 [thread overview]
Message-ID: <87bl0n33xt.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20220107160854.GU3294453@arm.com> (Szabolcs Nagy's message of "Fri, 7 Jan 2022 16:08:54 +0000")
* Szabolcs Nagy:
> The 01/07/2022 16:56, Florian Weimer wrote:
>> * Szabolcs Nagy:
>>
>> > The 01/07/2022 14:41, Florian Weimer wrote:
>> >> With the current set of fences, the version update at the start
>> >> of the TM write operation is redundant. Also use relaxed MO stores
>> >> during the dlclose update, and skip any version changes there.
>> >>
>> >> Suggested-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
>> >>
>> >> ---
>> >> Initial testing looks good, but I'll keep the aarch64 and powerpc64le
>> >> tests running in a loop for a while.
>> >
>> > looks good to me except
>> >
>> >> @@ -282,15 +279,6 @@ _dlfo_mappings_end_update (void)
>> >> atomic_thread_fence_release ();
>> >> __atomic_wide_counter_fetch_add_relaxed (&_dlfo_loaded_mappings_version, 1);
>> >> }
>> >
>> > i think the v += 1 does not have to be atomic so
>> >
>> > start_version = load_relaxed (&ver);
>> > store_relaxed (&ver, start_version + 1);
>> >
>> > or if we can change the api to pass start_version
>> > that may be clearer.
>>
>> The 32-bit wide counter needs to be atomic. We can't use a straight
>> store in that case.
>>
>> Should I break abstraction and write through for the 64-bit case?
>
> i didn't think about that.
>
> but it seems there is a
>
> __atomic_wide_counter_add_relaxed
>
> which seems to do the right thing.
Good point. I'll restart my tests with that.
Thanks,
Flroian
next prev parent reply other threads:[~2022-01-07 16:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 13:41 Florian Weimer
2022-01-07 15:49 ` Szabolcs Nagy
2022-01-07 15:56 ` Florian Weimer
2022-01-07 16:08 ` Szabolcs Nagy
2022-01-07 16:29 ` Florian Weimer [this message]
2022-01-10 10:10 Florian Weimer
2022-01-10 12:29 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bl0n33xt.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=szabolcs.nagy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).