public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Lukasz Majewski <lukma@denx.de>
Cc: Joseph Myers <joseph@codesourcery.com>,
	Paul Eggert <eggert@cs.ucla.edu>,
	 Alistair Francis <alistair23@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Alistair Francis <alistair.francis@wdc.com>,
	GNU C Library <libc-alpha@sourceware.org>,
	Florian Weimer <fweimer@redhat.com>,
	Carlos O'Donell <carlos@redhat.com>,
	Stepan Golosunov <stepan@golosunov.pp.ru>,
	Andreas Schwab <schwab@suse.de>, Zack Weinberg <zackw@panix.com>,
	Jeff Law <law@redhat.com>
Subject: Re: [PATCH v2 3/3] y2038: nptl: Convert pthread_rwlock_{clock|timed}{rd|wr}lock to support 64 bit time
Date: Fri, 2 Oct 2020 10:51:51 -0300	[thread overview]
Message-ID: <162999e3-97c4-4dda-bac3-51a25068b0c5@linaro.org> (raw)
In-Reply-To: <20201002141508.23f06238@jawa>



On 02/10/2020 09:15, Lukasz Majewski wrote:
> Hi Adhemerval,
> 
>> On 30/09/2020 10:12, Lukasz Majewski wrote:
>>>>> diff --git a/nptl/pthread_rwlock_rdlock.c
>>>>> b/nptl/pthread_rwlock_rdlock.c index 04cecad395..2b8509a49c 100644
>>>>> --- a/nptl/pthread_rwlock_rdlock.c
>>>>> +++ b/nptl/pthread_rwlock_rdlock.c
>>>>> @@ -24,7 +24,7 @@ __pthread_rwlock_rdlock (pthread_rwlock_t
>>>>> *rwlock) {
>>>>>    LIBC_PROBE (rdlock_entry, 1, rwlock);    
>>>>
>>>> We need to move the systemtap probe to the 64-bit variant, so the
>>>> 64-bit time will still trigger it.  
>>>
>>> Those are syscalls, which don't require timespec time.  
>>
>> These are in fact systemtap markers [1] and they are not related to 
>> syscalls.
> 
> Ok. Thanks for the info (and link).
> 
>>
>>>
>>> The LIBC_PROBE() macros were there before, so I left them as is and
>>> only changed __pthread_rwlock_rdlock_full() to
>>> __pthread_rwlock_rdlock_full64().
>>>
>>>
>>> On the other hand - for example:
>>> __pthread_rwlock_clockwrlock() and __pthread_rwlock_clockwrlock64()
>>> are only calling __pthread_rwlock_wrlock_full64(), and there were no
>>> LIBC_PROBE() macros before.
>>>
>>> Do I understand correctly that you propose to add LIBC_PROBE()
>>> macros to e.g. __pthread_rwlock_clockwrlock64() ?  
>>
>> The idea of the LIBC_PROBE is to trigger an systemtap even when the
>> function is called so systemtap can act accordingly (and the markers
>> are enable only if --enable-systemtap is used on configure).
>>
> 
> Ok.
> 
>> Without moving the LIBC_PROBE, 64-bit time architectures won't see
>> the probes anymore since they will call the 64-bit time version
>> instead.
> 
> Please correct me if I'm wrong, but it seems to me that you are
> concerned if 
> 
> - __pthread_rwlock_rdlock_full64 
> - __pthread_rwlock_wrlock_full64
> 
> would be called as aliased (for e.g. x86-64) and redirected (for e.g.
> arm)?
> 
> This is not the case as above functions are local (i.e. helpers) ones
> defined in ./nptl/pthread_rwlock_common.c (and are not exported).
> 
> For them, the only change was to add '64' suffix.
> 
> The LIBC_PROBE() calls have been left untouched, surrounding them, so I
> think that we don't need to move them.
> 
> 
> Or maybe I do miss something important here? Thanks in advance for your
> help and explanation.

In fact this is a wrong assumption from my part, there is no LIBC_PROBE
on the timed variant rwlocks. The patch looks ok in this regard (sorry
for the noise).



  reply	other threads:[~2020-10-02 13:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-19 13:07 [PATCH v2 1/3] nptl: futex: Move __NR_futex_time64 alias to beginning of futex-internal.h Lukasz Majewski
2020-09-19 13:07 ` [PATCH v2 2/3] Y2038: nptl: Provide futex_abstimed_wait64 supporting 64 bit time Lukasz Majewski
2020-09-21 17:00   ` Alistair Francis
2020-09-29 16:55   ` Lukasz Majewski
2020-09-30 11:52   ` Adhemerval Zanella
2020-09-30 12:47     ` Lukasz Majewski
2020-09-30 12:58       ` Andreas Schwab
2020-09-30 13:17         ` Lukasz Majewski
2020-09-30 13:14       ` Adhemerval Zanella
2020-09-30 13:39         ` Lukasz Majewski
2020-09-30 14:06           ` Lukasz Majewski
2020-09-19 13:07 ` [PATCH v2 3/3] y2038: nptl: Convert pthread_rwlock_{clock|timed}{rd|wr}lock to support " Lukasz Majewski
2020-09-29 16:56   ` Lukasz Majewski
2020-09-30 11:59   ` Adhemerval Zanella
2020-09-30 13:12     ` Lukasz Majewski
2020-09-30 13:19       ` Adhemerval Zanella
2020-10-02 12:15         ` Lukasz Majewski
2020-10-02 13:51           ` Adhemerval Zanella [this message]
2020-09-29 16:55 ` [PATCH v2 1/3] nptl: futex: Move __NR_futex_time64 alias to beginning of futex-internal.h Lukasz Majewski
2020-09-29 18:12 ` Adhemerval Zanella

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=162999e3-97c4-4dda-bac3-51a25068b0c5@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=arnd@arndb.de \
    --cc=carlos@redhat.com \
    --cc=eggert@cs.ucla.edu \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=law@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=lukma@denx.de \
    --cc=schwab@suse.de \
    --cc=stepan@golosunov.pp.ru \
    --cc=zackw@panix.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).