libnvme(2)

๐Ÿ’– libnvme โ€” struct nvme_id_psd ๐Ÿ’–

okay bestie, so this is a page from the API Manual for libnvme, manual section 2 (that's the syscall/library-functions girlies ๐Ÿซถ). We're talking about one very specific little struct today and honestly? It's giving power management. Let's get into it. โœจ


๐ŸŒธ NAME ๐ŸŒธ

struct nvme_id_psd โ€” the Power Management data structure. that's her. that's the whole vibe. ๐Ÿ’…


โœจ SYNOPSIS โœจ

here's the shape of her, no cap, character for character:

struct nvme_id_psd {
    __le16 mp;
    __u8 rsvd2;
    __u8 flags;
    __le32 enlat;
    __le32 exlat;
    __u8 rrt;
    __u8 rrl;
    __u8 rwt;
    __u8 rwl;
    __le16 idlp;
    __u8 ips;
    __u8 rsvd19;
    __le16 actp;
    __u8 apws;
    __u8 epfrt;
    __u8 fqvt;
    __u8 epfvt;
    __u8 epfr_fqv_ts;
    __u8 epfvts;
    __u8 rsvd28[4];
 };

๐Ÿ‘‘ Members ๐Ÿ‘‘

okay so here's the full roster, every single one, we do NOT skip anyone in this house ๐Ÿ :

  • mp โ€” Maximum Power. It's the sustained maximum power the NVM subsystem eats up in this power state. To get actual Watts you take the value in this field and multiply it by the scale that the Max Power Scale bit gives you (peep enum nvme_psd_flags). If it's 0, that means Maximum Power just... isn't reported. ๐Ÿคทโ™€๏ธ
  • rsvd2 โ€” Reserved. nothing to see here bestie, move along ๐Ÿšถโ™€๏ธ
  • flags โ€” extra decoding flags, go look at enum nvme_psd_flags. ๐Ÿšฉ
  • enlat โ€” Entry Latency. The max latency, in microseconds, that comes with entering this power state. 0 means Entry Latency is not reported. ๐Ÿšช
  • exlat โ€” Exit Latency. The max latency, in microseconds, that comes with exiting this power state. 0 means Exit Latency is not reported. ๐Ÿƒโ™€๏ธ
  • rrt โ€” Relative Read Throughput. The read throughput rank of this power state compared to the others. The value in here is less than the number of supported power states. ๐Ÿ“–
  • rrl โ€” Relative Read Latency. The read latency rank of this power state compared to the others. Value here is less than the number of supported power states. โฑ๏ธ
  • rwt โ€” Relative Write Throughput. The write throughput rank of this power state compared to the others. Value here is less than the number of supported power states. โœ๏ธ
  • rwl โ€” Relative Write Latency. The write latency rank of this power state compared to the others. Value here is less than the number of supported power states. โŒ›
  • idlp โ€” Idle Power. The typical power the NVM subsystem consumes over 30 seconds in this power state while it's just chilling, idle. ๐Ÿ˜ด
  • ips โ€” Idle Power Scale. It's the scale for struct nvme_id_psd.idlp โ€” check enum nvme_psd_ps to decode this field. ๐Ÿ“
  • rsvd19 โ€” Reserved. again. yes. ๐Ÿซฅ
  • actp โ€” Active Power. The largest average power the NVM subsystem consumes over a 10 second period in this power state, with whatever workload is named in the Active Power Workload field. ๐Ÿ”ฅ
  • apws โ€” Bits 7-6: Active Power Scale (APS) โ€” the scale for struct nvme_id_psd.actp, see enum nvme_psd_ps for decoding this value. Bits 2-0: Active Power Workload (APW) โ€” the workload used to calculate maximum power for this power state, see enum nvme_psd_workload for decoding this field. ๐Ÿงฎ
  • epfrt โ€” Emergency power fail recovery time. ๐Ÿšจ
  • fqvt โ€” Forced quiescence vault time. ๐Ÿคซ
  • epfvt โ€” Emergency power fail vault time. ๐Ÿ”
  • epfr_fqv_ts โ€” Bits 7-4: Forced quiescence vault time scale. Bits 3-0: Emergency power fail recovery time scale. ๐ŸŽš๏ธ
  • epfvts โ€” Bits 3-0: Emergency power fail vault time scale. ๐ŸŽ›๏ธ
  • rsvd28 โ€” Reserved. bestie the reserved fields are EVERYWHERE and honestly? iconic of them. ๐Ÿ’€
no warnings, no bugs, no exit statuses on this one โ€” it's just a struct and all her little fields. pure vibes, pure data. ๐ŸŒˆ

and that's the whole page, bestie!! every field, every enum, every "less than the number of supported power states", all of it. you now know struct nvme_id_psd better than she knows herself. periodt. ๐Ÿ’–

this lil legend came from the struct nvme_id_psd page in the libnvme manual, section 2, dated July 2026. take care of her, she's fragile (she's a struct with a bunch of Reserved fields and she's doing her best). ๐ŸŽ€โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from