gpu_buddy_assert(9)
π NAME π
okay so bestie, welcome to gpu_buddy_assert(9) β yes that (9) means it lives in the Kernel API Manual section, we love a documented kernel function π β and this one is literally the buddy allocator's little vibe-check button: gpu_buddy_assert β assert a condition in the buddy allocator. That's it, that's the whole job. No cap. β¨
πΈ SYNOPSIS πΈ
gpu_buddy_assert (condition );
that's the whole call, bestie β one argument, in, out, done. π«Ά
π¦ ARGUMENTS π¦
conditionβ the condition you're expecting to be true. that's the entire ask. you hand it a condition, it wants that condition to be true, and if it isn'tβ¦ well, keep reading, because the drama is in DESCRIPTION π
π DESCRIPTION π
so here's the tea, and it depends entirely on whether CONFIG_KUNIT is enabled or not β two whole different eras of this function:
- when
CONFIG_KUNITis enabled β it evaluatescondition, and if that thing comes back false, it triggers aWARN_ONand callskunit_fail_current_test, so that any kunit test currently running gets properly marked as failed. and because debugging without context is giving nothing, the stringifiedconditiongets included in the failure message, so you can identify exactly which check told on you. iconic, honestly. π - when
CONFIG_KUNITis not enabled β it reduces to plainWARN_ON, so production builds keep the exact same warning semantics as before. no new behaviour, no surprises, just the classic warning energy. π₯
lowkey the whole point: the kunit flavour fails your test on purpose, the production flavour just warns like it always did. same warning semantics, different eras. π
π SEE ALSO π
the kernel file in question is ./drivers/gpu/buddy.c, and it comes with a whole friend group of (9) pages β go read them, they're all right there:
gpu_buddy_init(9)gpu_buddy_fini(9)gpu_buddy_reset_clear(9)gpu_buddy_free_block(9)gpu_buddy_allocated_addr_to_block(9)gpu_buddy_free_list(9)gpu_buddy_block_trim(9)gpu_buddy_alloc_blocks(9)gpu_buddy_block_print(9)gpu_buddy_print(9)
aaaand that's the page, bestie!! πβ¨ this little love letter to the buddy allocator came to you straight from the source ./drivers/gpu, dated October 2026, and it's filed under gpu_buddy_assert(9) in the Kernel API Manual β mwah, go assert something true today ππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms