diff --git a/pkg/arvo/sys/arvo.hoon b/pkg/arvo/sys/arvo.hoon index 159a7c781..9615ec55f 100644 --- a/pkg/arvo/sys/arvo.hoon +++ b/pkg/arvo/sys/arvo.hoon @@ -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 +>.$] diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index c382fb051..250db3be8 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -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 diff --git a/pkg/arvo/sys/vane/behn.hoon b/pkg/arvo/sys/vane/behn.hoon index 1521daff9..f6a00c0e8 100644 --- a/pkg/arvo/sys/vane/behn.hoon +++ b/pkg/arvo/sys/vane/behn.hoon @@ -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=~) diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index 78c7f02e2..75b61115f 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -4314,6 +4314,8 @@ =/ den ((de our now ski hen ruf) our des.req) abet:(perm:den pax.req rit.req) [mos ..^$] + :: + %trim [~ ..^$] :: %vega [~ ..^$] :: diff --git a/pkg/arvo/sys/vane/dill.hoon b/pkg/arvo/sys/vane/dill.hoon index e660e83de..a0779174d 100644 --- a/pkg/arvo/sys/vane/dill.hoon +++ b/pkg/arvo/sys/vane/dill.hoon @@ -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) diff --git a/pkg/arvo/sys/vane/eyre.hoon b/pkg/arvo/sys/vane/eyre.hoon index f92b04b51..12ff7efef 100755 --- a/pkg/arvo/sys/vane/eyre.hoon +++ b/pkg/arvo/sys/vane/eyre.hoon @@ -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) diff --git a/pkg/arvo/sys/vane/ford.hoon b/pkg/arvo/sys/vane/ford.hoon index e425d7cfe..3ab519b50 100644 --- a/pkg/arvo/sys/vane/ford.hoon +++ b/pkg/arvo/sys/vane/ford.hoon @@ -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 :: diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index b1523af99..7f9f623f9 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -2476,6 +2476,9 @@ %init =/ payload gall-payload(system-duct.agents.state duct) [~ payload] + :: + %trim + [~ gall-payload] :: %vega [~ gall-payload] diff --git a/pkg/arvo/sys/vane/iris.hoon b/pkg/arvo/sys/vane/iris.hoon index aa6f4ddf6..758b6ddfd 100644 --- a/pkg/arvo/sys/vane/iris.hoon +++ b/pkg/arvo/sys/vane/iris.hoon @@ -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) diff --git a/pkg/arvo/sys/vane/jael.hoon b/pkg/arvo/sys/vane/jael.hoon index b2e601401..34f107b07 100644 --- a/pkg/arvo/sys/vane/jael.hoon +++ b/pkg/arvo/sys/vane/jael.hoon @@ -456,6 +456,11 @@ :: [%vega ~] :: %vega + +>.$:: + :: in response to memory pressure + :: [%trim p=@ud] + :: + %trim +>.$ :: :: watch private keys diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index 882b3da42..3a5a3d9d7 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -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