Files
VIctory-NVIDIA/docs
Lyrnc 697590ad26 Sends: under memory pressure the spares keep what was in use lately, and go on a thread of their own
158d3177 trimmed the submissions' send spares to the 16 MiB hot floor
at every sweep while the host memory is pressured. On a 32 GB PC with
the title at ~31 GB private the pressure never clears (free RAM under
5 GB), and a frame sends ~46 MB (VICTORY_SEND_OWN), so the next frames
made the 8-64 MiB upload buffers again, every second. Walking (RTX 5080,
9800X3D, Series X at 1440p) the trim took ~71 ms of the sweep each
second, single sweeps 79-98 ms on the submitting thread; the card copies
went from 3.4 to 6.6 ms a frame with the fresh buffers counted there,
and page-ins were 2-4 times as many.

- Send memory in use is counted by size class (doubles from 8 MiB):
  how many submissions hold now, and the most at once between sweeps
  (InUse; a Drop on Memory covers a plan given up). Each sweep, under
  pressure or not, send::tick() keeps those peaks for the last
  VICTORY_SEND_KEEP_SECONDS sweeps (10 by default).
- Under ordinary pressure a trim keeps, of each class, as many spares as
  were in use at once in that window, then the smallest others up to
  the 16 MiB hot floor if that keeps more; what no frame of the window
  used goes. At critical commit all go, as before. The small host's cap
  (kept()) is unchanged. VICTORY_SEND_KEEP_SECONDS=0 is the floor alone,
  exactly the rule before (a test replays it).
- What a trim or a give-back past kept() lets go is released outside
  the spares' lock on a thread of its own (victory-send-free), not on
  the submitting thread; in place if that thread cannot be made.
- The sweep says what send memory was made and let go, when any was.

Eight new tests in host::send, among them a model of five seconds of
steady frames under pressure that never clears: nothing is made again
after the first second, against the 32 and 16 MiB buffers made again
every second with the floor alone. Not measured in game on this branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:51:02 +03:00
..
2026-11-28 21:29:11 -08:00
2026-11-28 12:13:58 -08:00
2026-11-28 20:05:05 -08:00