From: David Mozes <david.mozes@silk.us>
To: Florian Weimer <fweimer@redhat.com>
Cc: "libc-help@sourceware.org" <libc-help@sourceware.org>
Subject: RE: rwlock different behavior on glibc 2.28 then on previous versions
Date: Sun, 13 Mar 2022 10:23:13 +0000 [thread overview]
Message-ID: <AM9PR04MB8291941BF31D25634702DBDAF10E9@AM9PR04MB8291.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <87czis1tgk.fsf@oldenburg.str.redhat.com>
Thx Florin,
-----Original Message-----
From: Florian Weimer <fweimer@redhat.com>
Sent: Friday, March 11, 2022 3:59 PM
To: David Mozes <david.mozes@silk.us>
Cc: libc-help@sourceware.org
Subject: Re: rwlock different behavior on glibc 2.28 then on previous versions
* David Mozes:
> On the previous version of Glibc (before the commit) We could release
> write lock with different thread as the one that owned the lock (If we
> like) .
Sorry, this misuse of the API has always been undefined according to
POSIX (“Results are undefined if the read-write lock rwlock is not held
by the calling thread.”).
>> Correct, but practically we can do it on the user's responsibility.
>>Do you know if this "if" solved some synchronization issue or just enforced the undefined API?
> This is help very much for async program that has a many threads that
> communicate with some target. And we like to define a call back
> function instead of blocking on aio thread that send the data in order
> to release the rwlock.this improves the performance dramatically .
Could you use a different synchronization object (perhaps a condition
variable)?
>> If we use a different synchronization object like semaphores, condition variable (by the way they use mutex under the same API agreement), we will need to write self rwlock , which has less performance than other undefined states.
>>If we like to keep the API agreement, why not define the different async programming unlock functions?
Thanks
Florian
Thx
David
next prev parent reply other threads:[~2022-03-13 10:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 20:13 David Mozes
2022-03-11 13:58 ` Florian Weimer
2022-03-13 10:23 ` David Mozes [this message]
2022-03-20 16:44 ` David Mozes
2022-03-21 6:19 ` Christian Hoff
2022-03-21 14:01 ` David Mozes
2022-03-21 17:01 ` Adhemerval Zanella
2022-03-21 19:46 ` David Mozes
2022-03-21 20:19 ` Adhemerval Zanella
2022-03-24 15:41 ` David Mozes
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=AM9PR04MB8291941BF31D25634702DBDAF10E9@AM9PR04MB8291.eurprd04.prod.outlook.com \
--to=david.mozes@silk.us \
--cc=fweimer@redhat.com \
--cc=libc-help@sourceware.org \
/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).