arvo: wires up %trim memory-pressure event stubs

This commit is contained in:
Joe Bryan 2019-09-27 13:00:37 -07:00
parent 7a62373308
commit 3dd9bd7111
11 changed files with 64 additions and 2 deletions

View File

@ -778,6 +778,17 @@
?: ?=(?(%veer %verb %wack %warn) -.q.ovo)
[[ovo ~] +>.$]
::
:: These external events (currently only %trim) are global
:: notifications, spammed to every vane
::
?: ?=(%trim -.q.ovo)
=> .(ovo ;;((pair wire [%trim @ud]) ovo))
=^ zef vanes
(~(spam (is our vil eny bud vanes) now) lac ovo)
[zef +>.$]
::
:: Normal events are routed to a single vane
::
=^ zef vanes
(~(hurl (is our vil eny bud vanes) now) lac ovo)
[zef +>.$]

View File

@ -1596,6 +1596,9 @@
fox(bad (~(del in bad.fox) p.kyz))
~& [%block p.kyz]
fox(bad (~(put in bad.fox) p.kyz))
::
%trim
[~ fox]
::
%vega
:: re-initialize our cryptosuite B cores

View File

@ -93,6 +93,9 @@
:: if we errored, drop it
event-core
event-core(moves [duct %give %meta drip]~)
:: +trim: in response to memory pressue
::
++ trim [moves state]
:: +vega: learn of a kernel upgrade
::
++ vega [moves state]
@ -251,6 +254,7 @@
%crud (crud:event-core [p q]:task)
%rest (rest:event-core date=p.task)
%drip (drip:event-core move=p.task)
%trim trim:event-core
%vega vega:event-core
%wait (wait:event-core date=p.task)
%wake (wake:event-core error=~)

View File

@ -4314,6 +4314,8 @@
=/ den ((de our now ski hen ruf) our des.req)
abet:(perm:den pax.req rit.req)
[mos ..^$]
::
%trim [~ ..^$]
::
%vega [~ ..^$]
::

View File

@ -553,9 +553,9 @@
=? p.task ?=([%crud %hax-heft ~] p.task) [%heft ~]
::
$(hen u.hey.all, wrapped-task p.task)
:: a %vega notification on kernel upgrade comes in on an unfamiliar duct
:: %vega and %trim notifications come in on an unfamiliar duct
::
?: ?=(%vega -.task)
?: ?=(?(%trim %vega) -.task)
[~ ..^$]
::
=/ nus (ax hen)

View File

@ -1908,6 +1908,10 @@
[[~ /~/channel] duct [%channel ~]]
==
[~ http-server-gate]
:: %trim: in response to memory pressure
::
?: ?=(%trim -.task)
[~ http-server-gate]
:: %vega: notifies us of a completed kernel upgrade
::
?: ?=(%vega -.task)

View File

@ -6168,6 +6168,14 @@
=^ moves state.ax cancel:this-event
::
[moves ford-gate]
::
:: %trim: in response to memory pressure
::
:: XX clear cache
::
%trim
::
[~ ford-gate]
::
:: %vega: learn of kernel upgrade
::

View File

@ -2476,6 +2476,9 @@
%init
=/ payload gall-payload(system-duct.agents.state duct)
[~ payload]
::
%trim
[~ gall-payload]
::
%vega
[~ gall-payload]

View File

@ -317,6 +317,10 @@
=/ moves=(list move)
[[duct %slip %d %flog task] ~]
[moves light-gate]
:: %trim: in response to memory pressure
::
?: ?=(%trim -.task)
[~ light-gate]
:: %vega: notifies us of a completed kernel upgrade
::
?: ?=(%vega -.task)

View File

@ -456,6 +456,11 @@
:: [%vega ~]
::
%vega
+>.$::
:: in response to memory pressure
:: [%trim p=@ud]
::
%trim
+>.$
::
:: watch private keys

View File

@ -203,6 +203,9 @@
:: boot completed (XX legacy)
::
[%init p=ship]
:: trim state (in response to memory pressure)
::
[%trim p=@ud]
:: kernel upgraded
::
[%vega ~]
@ -390,6 +393,7 @@
$>(%init vane-task) :: report install
{$kick p/@da} :: wake up
{$nuke p/@p} :: toggle auto-block
$>(%trim vane-task) :: trim state
$>(%vega vane-task) :: report upgrade
{$wake ~} :: timer activate
$>(%wegh vane-task) :: report memory
@ -571,6 +575,7 @@
$>(%crud vane-task) :: error with trace
[%rest p=@da] :: cancel alarm
[%drip p=vase] :: give in next event
$>(%trim vane-task) :: trim state
$>(%vega vane-task) :: report upgrade
[%wait p=@da] :: set alarm
[%wake ~] :: timer activate
@ -624,6 +629,7 @@
{$dirk des/desk} :: mark mount dirty
{$ogre pot/$@(desk beam)} :: delete mount point
{$perm des/desk pax/path rit/rite} :: change permissions
$>(%trim vane-task) :: trim state
$>(%vega vane-task) :: report upgrade
{$warp wer/ship rif/riff} :: internal file req
{$werp who/ship wer/ship rif/riff} :: external file req
@ -793,6 +799,7 @@
{$talk p/tank} ::
{$text p/tape} ::
{$veer p/@ta q/path r/@t} :: install vane
$>(%trim vane-task) :: trim state
$>(%vega vane-task) :: report upgrade
{$verb ~} :: verbose mode
== ::
@ -896,6 +903,9 @@
:: new unix process
::
$>(%born vane-task)
:: trim state (in response to memory pressure)
::
$>(%trim vane-task)
:: report upgrade
::
$>(%vega vane-task)
@ -1176,6 +1186,9 @@
:: %kill: stop a build; send on same duct as original %build request
::
[%kill ~]
:: trim state (in response to memory pressure)
::
$>(%trim vane-task)
:: %vega: report kernel upgrade
::
$>(%vega vane-task)
@ -1870,6 +1883,7 @@
$% {$conf p/dock q/dock} :: configure app
$>(%init vane-task) :: set owner
{$deal p/sock q/internal-task} :: full transmission
$>(%trim vane-task) :: trim state
$>(%vega vane-task) :: report upgrade
$>(%west vane-task) :: network request
[%wash ~] :: clear caches
@ -1956,6 +1970,9 @@
:: system started up; reset open connections
::
$>(%born vane-task)
:: trim state (in response to memory pressure)
::
$>(%trim vane-task)
:: report upgrade
::
$>(%vega vane-task)
@ -2075,6 +2092,7 @@
[%private-keys ~] :: sub to privates
[%public-keys ships=(set ship)] :: sub to publics
[%rekey =life =ring] :: update private keys
$>(%trim vane-task) :: trim state
[%turf ~] :: view domains
$>(%vega vane-task) :: report upgrade
$>(%wegh vane-task) :: memory usage request