• 4 Posts
  • 452 Comments
Joined 2 years ago
cake
Cake day: June 21st, 2023

help-circle
  • I hadn’t restarted my serial logger after I rebooted my laptop, leaving me with no clue about what caused the crash.

    Probably way too late now, but if it was a proper kernel panic, it should’ve saved the dmesg in the kernel’s pstore which saves to either ACPI or EFI storage (depending on BIOS or UEFI), which systemd then extracts to /var/lib/systemd/pstore/ on next reboot.





  • Unless you are moving gigabits of data, you won’t notice the difference the smaller header payload of ipv6 offers.

    IPv6 headers are usually bigger anyway1, so the only advantage is more efficient routing (so infinitesimally better latency), but in my experience most routers only support IPv4 hw offload and not IPv6, so it’s only more efficient in theory.

    I just like IPv6 because I get a whole /56 prefix to play with, and devices often randomise their host portion through the privacy extensions, meaning they use a new address each day or so.

    1 IPv4 is usually ~20 bytes, but it can be up to 60 bytes if you stack a lot of options, IPv6 is only 40 bytes AFAIK.















  • I couldn’t find a hard answer to whether this supports EPYC only, or Ryzen too; so I put together this script to read the CPUID to detect for INVLPGB support according to the AMD64 Programmer’s Manual, and my 7800X3D does not support INVLPGB.

    (Let me know if I’ve made an error though!)

    Code
    #include <stdio.h>
    #include <stdint.h>
    
    int main() {
        uint32_t eax, ebx, ecx, edx;
    
        eax = 0x80000008;
    
        __asm__ __volatile__ (
            "cpuid"
            : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
            : "a" (eax)
        );
    
        printf("EBX: 0x%x\n", ebx);
    
        if (ebx & (1 << 3)) {
            printf("CPU supports INVLPGB\n");
        } else {
            printf("CPU does not support INVLPGB\n");
        }
    
        return 0;
    }