9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: 9fans@9fans.net
Subject: Re: [9fans] odd rwakeup qunlock behaviour in 9vx
Date: Wed, 08 Nov 2023 16:08:31 -0500	[thread overview]
Message-ID: <05DC7BC5698D779E601D2AB8E1882F4B@eigenstate.org> (raw)
In-Reply-To: <16991481040.88FDBb.122754@composer.9fans.topicbox.com>

A complete snippet to reproduce this may be useful. That
said, I have code that uses qlock and rendez heavily with
no sleeps, and have not had any issues on 9front.

Quoth ibrahim via 9fans <9fans@9fans.net>:
> I have a function chan_send in which :
> chan_send (...) {
> qlock()
> rwakeup(...)
> qunlock()
> }
> 
> If two such chan_send functions are called without a "task-switch" 9vx crashes. A work around for this problem is to place a sleep(0) after qunlock to enforce a task-switch
> 
> chan_send(...) {
> qlock()
> rwakeup(...)
> qunlock()
> sleep(0)
> }
> 
> This behaviour isn't documented anywhere. I'll test it next on bare metal with a real kernel to find out if this is only a 9vx problem.
> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T7a5bb3cde50a8a9a-M861c10f8be4b323658622f9a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

  reply	other threads:[~2023-11-08 21:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-05  1:35 ibrahim via 9fans
2023-11-08 21:08 ` ori [this message]
2023-11-08 23:42   ` ibrahim via 9fans
2023-11-09  3:16     ` Lucio De Re
2023-11-10  2:24       ` ibrahim via 9fans
2023-11-10  6:40         ` Lucio De Re

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=05DC7BC5698D779E601D2AB8E1882F4B@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=9fans@9fans.net \
    /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).