STRUCT UM_TIMETRAVEL_MSG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct um_timetravel_msg(9)

okay bestie, welcome to the Kernel API Manual section for struct um_timetravel_msg β€” yes we're literally studying time travel today, no big deal πŸ•°οΈβœ¨


✨ NAME ✨

struct um_timetravel_msg β€” the UM time travel message, aka the little packet that makes user-mode Linux do scheduling gymnastics 🩰


🌸 SYNOPSIS 🌸

struct um_timetravel_msg {
    __u32 op;
    __u32 seq;
    __u64 time;
 };

look at her, three fields, zero notes, absolute main character energy πŸ‘‘


πŸŽ€ Members πŸŽ€

  • op β€” the operation value, and it comes straight from enum um_timetravel_ops. that's the "what are we doing" of it all πŸ’«
  • seq β€” the sequence number for the message. it shall be reflected in the ACK response, and you should check it while processing the response to see if it matches. yes, this is the vibe check β€” mismatch means something's wrong πŸ™ˆ
  • time β€” time in nanoseconds. tiny units, big consequences ⏱️

πŸ¦‹ Description πŸ¦‹

So this is the basic message type, and it goes in both directions β€” it's bidirectional, it's giving equal partnership, we love a two-way street 🫢

This is the message passed between the host (the user-mode Linux instance) and the calendar (the application on the other side of the socket) in order to implement common scheduling. host and calendar, communicating over a socket, scheduling together β€” teamwork besties fr fr 🀝

Whenever UML has an event it will request runtime for it from the calendar, and then wait for its turn until it can run, etc. it's the "asking permission then waiting" pipeline 😭

not me about to tell you the most important bit: it will only ever request the single next runtime, i.e. multiple REQUEST messages override each other. so don't go queuing up forty requests thinking you're slick β€” the latest one just eats the previous ones πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./include/uapi/linux/um_timetravel.h enum
  • um_timetravel_shared_mem_fds(9)
  • enum um_timetravel_start_ack(9)
  • enum um_timetravel_ops(9)
  • enum um_timetravel_schedshm_cap(9)
  • enum um_timetravel_schedshm_flags(9)
  • Time travel shared memory overview(9)
  • union um_timetravel_schedshm_client(9)
  • struct um_timetravel_schedshm(9)

the whole time-travel cinematic universe is linked above, go binge it πŸΏπŸ‘‘


πŸ“¦ where this page comes from