From: Andreas Larsson <andreas@gaisler.com>
To: Torvald Riegel <triegel@redhat.com>, David Miller <davem@davemloft.net>
Cc: libc-alpha@sourceware.org, adhemerval.zanella@linaro.org,
carlos@redhat.com, software@gaisler.com
Subject: Re: [RFC][PATCH 0/2] Make sparcv8 work again on cas enabled hardware
Date: Wed, 02 Nov 2016 11:29:00 -0000 [thread overview]
Message-ID: <5819CE00.5020308@gaisler.com> (raw)
In-Reply-To: <1478081121.7146.673.camel@localhost.localdomain>
On 2016-11-02 11:05, Torvald Riegel wrote:
> On Tue, 2016-11-01 at 12:51 -0400, David Miller wrote:
>> From: Torvald Riegel <triegel@redhat.com>
>> Date: Tue, 01 Nov 2016 17:46:41 +0100
>>
>>> On Tue, 2016-11-01 at 12:09 -0400, David Miller wrote:
>>>> From: Torvald Riegel <triegel@redhat.com>
>>>> Date: Tue, 01 Nov 2016 16:59:44 +0100
>>>>
>>>>> On Tue, 2016-11-01 at 16:07 +0100, Andreas Larsson wrote:
>>>>>> Any comments are most welcome. The spin lock based sparcv8 semaphore
>>>>>> implementation is currently unchanged by this patchset, but I would say
>>>>>> that that should go as well.
>>>>>
>>>>> Agreed.
>>>>
>>>> I think tossing out all of the ldstub based v8 code is not wise.
>>>>
>>>> I was envisioning adding code to use ldstub on v8 when CAS is not
>>>> available in order to maintain the status quo of what worked and
>>>> was functional before the changes which introduced this problem
>>>> for v8 in the first place.
>>>>
>>>> Having that in place until the kernel-side atomics could be
>>>> implemented, propagated, and supported in glibc would be a nice
>>>> intermediate state compared to what we have now.
>>>
>>> How do you intend to make the synchronization primitives work whose
>>> implementation requires a CAS and for which nobody has provided an
>>> alternative implementation that does not require CAS?
>>
>> The pure userland version will do what has been done for decades,
>> by using a spinlock that protects the word we want to do atomic
>> operations upon. A hash table of spinlocks is another option.
>
> I know about the available techniques; my question was rather aimed at
> who's going to do the work, in which rough stages, and when.
>
> An external table of locks does not work for process-shared
> synchronization. Do you plan to not support that, and abort() when
> someone tries to create a process-shared condvar, for example?
>
> Or do you intend to write sparc-specific versions of all the concurrent
> data structures that are process-shared? Note that in the new condvar,
> for example, there's no unused space in pthread_cond_t that could be
> used for a spinlock. So you'd have to reorganize quite a bit.
>
> If you want sparc-specific versions, who's going to implement them, and
> when? What do we do in the meantime?
[resent due to failure on my part to remove standard signature]
Linux kernel commit 8b30ca73b7cc7f2177cfc4e8274d2ebdba328cd5 added
sys_sendmsg and sys_recvmsg to the sys_call_table in
arch/sparc/kernel/systbls_32.S. So sparc32 kernels prior to Linux 4.4 do
not support them as straight up system calls.
Best regards,
Andreas Larsson
next prev parent reply other threads:[~2016-11-02 11:29 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 15:08 Andreas Larsson
2016-11-01 15:08 ` [RFC][PATCH 2/2] sparc32: Use cas for atomic_* operations and use general pthread_barrier_wait Andreas Larsson
2016-11-04 18:37 ` David Miller
2016-11-04 18:44 ` David Miller
2016-11-01 15:08 ` [RFC][PATCH 1/2] sparc32: Mark sendmsg and recvmsg system calls as unsupported Andreas Larsson
2016-11-01 17:28 ` Adhemerval Zanella
2016-11-02 11:38 ` Andreas Larsson
2016-11-02 12:49 ` Adhemerval Zanella
2016-11-04 18:36 ` David Miller
2016-11-01 16:00 ` [RFC][PATCH 0/2] Make sparcv8 work again on cas enabled hardware Torvald Riegel
2016-11-01 16:09 ` David Miller
2016-11-01 16:46 ` Torvald Riegel
2016-11-01 16:51 ` David Miller
2016-11-02 10:05 ` Torvald Riegel
2016-11-02 11:29 ` Andreas Larsson [this message]
2016-11-02 15:32 ` David Miller
2016-11-02 22:33 ` Torvald Riegel
2016-11-03 2:52 ` David Miller
2016-11-03 15:39 ` Torvald Riegel
2016-11-03 17:22 ` David Miller
2016-11-03 18:41 ` Adhemerval Zanella
2016-11-03 20:33 ` David Miller
2016-11-03 21:29 ` Adhemerval Zanella
2016-11-03 22:25 ` Torvald Riegel
2016-11-04 10:28 ` Andreas Larsson
2016-11-04 15:23 ` David Miller
2016-11-04 13:55 ` Richard Henderson
2016-11-04 15:31 ` David Miller
2016-11-04 16:10 ` Richard Henderson
2016-11-04 14:04 ` Richard Henderson
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=5819CE00.5020308@gaisler.com \
--to=andreas@gaisler.com \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=davem@davemloft.net \
--cc=libc-alpha@sourceware.org \
--cc=software@gaisler.com \
--cc=triegel@redhat.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).