changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: bcm64: use exclusive monitor on nrdy to wake up idlehands()

changeset 7226: c3a4ca2a4715
parent 7225: ff0bb3db55f7
child 7227: 9cf755535d58
author: cinap_lenrek@felloff.net
date: Fri, 10 May 2019 14:05:04 +0200
files: sys/src/9/bcm64/l.s
description: bcm64: use exclusive monitor on nrdy to wake up idlehands()

when the exclusive monitor is cleared, a event is generated
which we can use to wake up idlehands. that way we do not
need to wait for the next timer interrupt until a cpu takes
work from the run queue.
     1.1--- a/sys/src/9/bcm64/l.s
     1.2+++ b/sys/src/9/bcm64/l.s
     1.3@@ -293,10 +293,13 @@ TEXT splx(SB), 1, $-4
     1.4 
     1.5 TEXT idlehands(SB), 1, $-4
     1.6 	DMB	$ISH
     1.7-	MOVW	nrdy(SB), R0
     1.8-	CBNZ	R0, _ready
     1.9-	WFI
    1.10-_ready:
    1.11+	MOV	$nrdy(SB), R1
    1.12+	LDXRW	(R1), R0
    1.13+	CBZ	R0, _goodnight
    1.14+	CLREX
    1.15+	SEVL
    1.16+_goodnight:
    1.17+	WFE
    1.18 	RETURN
    1.19 
    1.20 TEXT cycles(SB), 1, $-4