Skip to content

Instantly share code, notes, and snippets.

View hartmark's full-sized avatar

Markus Hartung hartmark

View GitHub Profile
@hartmark
hartmark / README.md
Created November 19, 2026 12:34
dnsmasq with DNSSEC on Teltonika RUTX11 (RutOS 07.26.2): static cross-build + on-device validation test

dnsmasq with DNSSEC on a Teltonika RUTX11 (RutOS 07.26.2): build + test

RutOS ships dnsmasq built with no-DNSSEC, so the router cannot validate DNSSEC and never sets the AD bit for LAN clients. This gist shows that dnsmasq with DNSSEC builds for the RUTX11 and validates correctly on the device, so enabling it is a build-configuration change.

Device

  • RUTX11, firmware RUTX_R_00.07.26.2, ARMv7 Cortex-A7 (IPQ4019), musl (/lib/ld-musl-armhf.so.1)
  • Stock dnsmasq:
@hartmark
hartmark / README.md
Last active November 12, 2026 15:17
Reproducible MOSS-Image Turbo GGUF quant comparison (Q8_0 / Q8_CR / Q4_CR_L) with face swap for ComfyUI

MOSS-Image Turbo GGUF quant repro (ComfyUI)

moss_quant_repro.py downloads everything it needs, runs one fixed workflow with three prompts and fixed seeds on three GGUF quants of molbal/MOSS-Image-GGUF, and reports wall time, sampling speed and peak VRAM. It is meant for comparing loader changes in ComfyUI-GGUF and the face-swap node on the same hardware, reproducibly.

Workflow: MOSS-Image Turbo (8 steps, euler/simple, CFG 1, AuraFlow shift 5, 1024²), the Comfy-Org Qwen3.5-9B INT8 ConvRot text encoder through the core CLIPLoader, the FLUX.2 VAE, then a face swap with Facefusion_comfyui (hyperswap_1c_256). The source face is an Unsplash stock photo (FOqM6g0K7YU, Unsplash License). Two tiny nodes release ComfyUI's GPU models before the 9B text encoder and before the ONNX face swap, so it fits in 16 GB.

*Variants:

@hartmark
hartmark / README.md
Created October 14, 2026 18:58
ROCm/rocm-systems#12528 / #11170: wait-spin fix (clr kTimeout4Secs), real workloads under memory pressure, HIP vs Vulkan (RADV) under page migration, HSA_USERPTR/SVM_FOR_PAGED_MEM. gfx1101 + gfx1200

ROCm wait/eviction bench: #11170 + clr re-arm, real workloads, HIP vs Vulkan under page migration

Companion to ROCm/rocm-systems#12528 and #11170. Measured on two machines:

  • gfx1101: RX 7800 XT, Ryzen 9 5900X, 62 GB RAM
  • gfx1200: RX 9060 XT, Ryzen 7 2700X, 32 GB RAM

Both run Arch with kernel 7.2 and an in-tree amdgpu.

@hartmark
hartmark / README.md
Created October 12, 2026 11:40
ROCm/rocm-systems#12528: 2 h soak of GPU queue stops from page migration of pinned host memory (gfx1200, gfx1101)

GPU queue stops from page migration of pinned host memory (ROCm/rocm-systems#12528)

A two-hour soak around @briansp2020's compactstall.cpp from ROCm/rocm-systems#12528 (comment). Each run measures the gaps between consecutive tiny kernels; a normal gap is ~5 µs, and a gap of tens of ms or more means the GPU queues were stopped.

Files

  • soak.sh: runs 9 variants in shuffled order per round, 20 s each, for 2 h. Memory pressure comes from hog.py, with compaction every second. Writes one CSV row per run.
  • hog.py: holds RAM until MemAvailable ≈ buffer + 3 GiB and keeps churning it (frees and reallocates a tenth every ~5 s) so reclaim/compaction never settles. It never allocates below 1.5 GiB available.
@hartmark
hartmark / README.md
Last active September 30, 2026 13:44
ROCm stalls under host memory pressure (TheRock#7832): reproducer, measurement harness and clr/ROCr instrumentation

ROCm stalls under host memory pressure: reproducer and instrumentation

Reproducer and measurement harness for the ComfyUI GGUF model-load stall described in ROCm/TheRock#7832. Findings: ROCm/rocm-systems#12528.

The analysis was done with Claude (AI, via Claude Code). The interpretation is by @hartmark, who reviewed the work.

What it does

@hartmark
hartmark / disk-report.sh
Last active September 3, 2026 12:22
btrfs + snapper disk usage report, and recover a clobbered file from snapper snapshots
#!/usr/bin/env bash
# disk-report.sh - where's the space on a btrfs system, and how much is pinned by
# snapper snapshots (deleting a file frees nothing while a snapshot still refers
# to it). Read-only: nothing is deleted or changed.
#
# sudo ./disk-report.sh [mountpoint ...]
#
# With no args it looks at every mounted btrfs. When btrfs quota (qgroups) is
# off, the "space held by snapshots" section launches btdu (sampled, fast) on the
# top-level subvolume so you can see per-path / per-snapshot exclusive space;
Computer Information:
Manufacturer: ASUSTeK COMPUTER INC.
Model: FX705DY
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
CPU Family: 0x17
@hartmark
hartmark / gist:93bcb58e8cafa6ab417dc4ff397ee2c4
Created June 20, 2022 22:11
Extract calling details from NSubstitute
public class CallingTest
{
private readonly ITestOutputHelper testOutputHelper;
private readonly AwesomeService awesomeService;
private readonly IDependantService dependantServiceMock;
public CallingTest(ITestOutputHelper testOutputHelper)
{
this.testOutputHelper = testOutputHelper;
dependantServiceMock = Substitute.For<IDependantService>();