From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26157 invoked from network); 5 Nov 2023 01:35:15 -0000 Received: from tb-ob20.topicbox.com (173.228.157.66) by inbox.vuxu.org with ESMTPUTF8; 5 Nov 2023 01:35:15 -0000 Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob20.topicbox.com (Postfix) with ESMTP id D2C0329F82 for ; Sat, 4 Nov 2023 21:35:12 -0400 (EDT) (envelope-from bounce.mMeba86a2cee63818883e31403.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id AB7B329700B; Sat, 4 Nov 2023 21:35:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=to :message-id:date:mime-version:content-type :content-transfer-encoding:list-help:list-id:list-post :list-subscribe:reply-to:subject:from:list-unsubscribe; s= dkim-1; t=1699148112; x=1699234512; bh=gVVoNmL0CSy7BZzU7uy4T8c/Y zsF76OoGaWMmHGm44M=; b=N9o0g3fEHFm/183G+QXDh+FP0svegb27EHhg8E3Ti JAfZExEj27ZkQeYXFM74bQBj69OVwr0S53NUXrpKGX+EFdLW7cs7XFoVhJWuoNWI fwxEYTz3UmtdsMKwS/kMXH/fyf9sMJlavzsbfb04r5KvqRDbrsJmKFeC02pL9Jo8 TM= To: 9fans <9fans@9fans.net> Message-Id: <16991481040.88FDBb.122754@composer.9fans.topicbox.com> Date: Sat, 4 Nov 2023 21:35:04 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=16991481041.9c7850a.122754 Content-Transfer-Encoding: 7bit Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 8b467c48-7b7b-11ee-9496-1783232d11b0 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UN2E1YmIzY2RlNTBhOGE5YS1NZWJhODZhMmNlZTYzODE4ODgzZTMx?= =?UTF-8?B?NDAzPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Subject: [9fans] odd rwakeup qunlock behaviour in 9vx From: "ibrahim via 9fans" <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Meba86a2cee63818883e31403:1:i0StFay1i9rlTqjBKvCeJIS54IEUAOB7lxHuQmLAcYw --16991481041.9c7850a.122754 Date: Sat, 4 Nov 2023 21:35:04 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 cras= hes. 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 w= ith a real kernel to find out if this is only a 9vx problem. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T7a5bb3cde50a8a9a-Meba86= a2cee63818883e31403 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --16991481041.9c7850a.122754 Date: Sat, 4 Nov 2023 21:35:04 -0400 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have a function chan_send in which :
chan_send (...) {
qlock()
rwakeup(= ...)
qunlock()
}

If two such chan_send functions are called without a "task-swit= ch" 9vx crashes. A work around for this problem is to place a sleep(0)= after qunlock to enforce a task-switch

ch= an_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.



= --16991481041.9c7850a.122754--