linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Carlos O'Donell" <carlos@systemhalted.org>
To: "Randolph Chung" <randolph@tausq.org>
Cc: parisc-linux <parisc-linux@lists.parisc-linux.org>
Subject: Re: [parisc-linux] [RFC] vdso for parisc-linux
Date: Wed, 1 Nov 2006 10:19:42 -0500	[thread overview]
Message-ID: <119aab440611010719v3a7d0358jcd7be64afb769b8a@mail.gmail.com> (raw)
In-Reply-To: <4546E861.9050909@tausq.org>

On 10/31/06, Randolph Chung <randolph@tausq.org> wrote:
> > atomic ops are *not* prime candidates for vDSO's, I was wrong about
> > this. There are special requirements for the atomic operations which
> > require access to kernel locks, no scheduling, and no signals.  All of
> > these are impossible to do if gdb can write to code, thus we put the
> > atomic ops on the gateway page (which has the aforementioned special
> > properties).
>
> i can't quite see how lws disables scheduling... maybe you can enlighten
> me :)

LWS doesn't disable scheduling. See arch/parisc/kernel/syscall.S

arch/parisc/kernel/syscall.S
547 /* NOTES:
548 This all works becuse intr_do_signal
549 and schedule both check the return iasq
550 and see that we are on the kernel page
551 so this process is never scheduled off
552 or is ever sent any signal of any sort,
553 thus it is wholly atomic from usrspaces
554 perspective
555 */

Checks like this:
arch/parisc/kernel/entry.S
1023 intr_do_resched:
1024 /* Only call schedule on return to userspace. If we're returning
1025 * to kernel space, we may schedule if CONFIG_PREEMPT, otherwise
1026 * we jump back to intr_restore.
1027 */
1028 LDREG PT_IASQ0(%r16), %r20
1029 CMPIB= 0, %r20, intr_do_preempt
1030 nop

Mean that if we take an interrupt while on the gateway page, the
PT_IASQ0 should be zero and prevent intr_do_preempt, or
intr_do_signal, or any other protected intr_* action.

Scheduling isn't a bit problem, but signals cause deadlocks.

Cheers,
Carlos.
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

      parent reply	other threads:[~2006-11-01 15:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-29 12:49 [parisc-linux] [RFC] vdso for parisc-linux Randolph Chung
2006-10-30 16:25 ` Carlos O'Donell
2006-10-31  6:08   ` Randolph Chung
2006-11-01 15:04     ` Carlos O'Donell
2006-11-02 15:03       ` Randolph Chung
2006-11-01 15:19     ` Carlos O'Donell [this message]

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=119aab440611010719v3a7d0358jcd7be64afb769b8a@mail.gmail.com \
    --to=carlos@systemhalted.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=randolph@tausq.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 NNTP newsgroup(s).