• 33 Posts
  • 624 Comments
Joined 2 years ago
cake
Cake day: June 5th, 2023

help-circle
  • MEM% for each NetworkManager process is 0.4 % of 3.28 G ≈ 13.1 M. Additionally, almost certainly most of this will be shared between these processes, as well as other processes, so you cannot just add them together.

    The virtual size (315M) is the virtual memory. Quite clearly only 13.1 M of this are actually in use. The rest will only start getting backed by real physical memory if it is being written to.

    The way this works is that the process will get interrupted if it writes to a non-physical memory location (by the memory management unit (MMU); this is known as a page fault), and executions jumps to the kernel which will allocate physical memory and alter the virtual memory table, and then proceed with the execution of the write operation.

    Many programs or library functions like to get way larger virtual memory buffers than they will actually use in practice, because that way the kernel does all this in the background if more memory is needed, and the program doesn’t need to do anything. I.e. it simplifies the code.


  • gnuhaut@lemmy.mltoLinux@lemmy.mlResigning as Asahi Linux project lead
    link
    fedilink
    arrow-up
    14
    arrow-down
    1
    ·
    edit-2
    3 days ago

    I’m not just talking about the US police. I’ve never been to the US, and I assure you the police is shit here too. Ts’o is American, and that “thin blue line” saying seems especially American or Anglo. I’ve never heard that over here. So I’m not sure how that’s even relevant to the discussion.


  • I fail to see how anyone could interpret what can only refer to holding the line as not a heroic act and a military metaphor. And that’s how it’s used, and that’s what it means, and that’s where it comes from.

    And Ts’o clearly knows this as well, since it he appropriately uses it as a metaphor for keeping chaos at bay and out of the kernel.


  • gnuhaut@lemmy.mltoLinux@lemmy.mlResigning as Asahi Linux project lead
    link
    fedilink
    arrow-up
    31
    arrow-down
    6
    ·
    edit-2
    3 days ago

    I usually see “thin blue line” (and the flag) used by reactionaries, racists, and white nationalists. Especially since BLM. Don’t know what sort of politics Ts’o has, other than he’s probably not an anarchist (ACAB!), but I guess (benefit of the doubt and all) he could be some ignorant lib with a head full of copaganda, so getting out the code of conduct for racist dogwhistles might be a bit premature.

    It comes from The Thin Red Line, which is about some Scottish regiment standing up to a Russian cavalry charge. Even if you don’t know that, it seems quite obviously a military metaphor, and that indicates a militaristic view of what policing should be like, veneration of the police as heroes, and total ignorance about what the police actually are and do.



  • This Fehr guy has all the same talking points I’ve seen German politicians use as well. And that’s essentially across all relevant political parties.

    For example, Interior minister Faeser called the Palästina-Kongress, which they shut down last year, and which was organized by secular left-wing groups and a Jewish group, “Islamist”. And the press loves to just repeat this stuff. And it’s great propaganda. The average German is afraid of Islamists, hates Muslims in general, and will applaud when the authorities suppress anyone labeled as such, and never look into if it’s actually true.

    Foreign minister Baerbock claimed she personally saw, on video, evidence of rape on Oct 7, even though actual investigations by the UN and others have found no footage like that. She was being heckled at the time by pro-Palestine activists and just made that up, so it looks to an misinformed audience like they’re booing rape victims. And people believe this because the press never pushes back on these false claims.

    Just straight up inventing blatant lies to cover for the genocide they’re committing. How tf can these people sleep at night?


  • Yeah sorry then. It would be good to not use ls in your example though, someone who doesn’t know about that might read this discussion and think that’s reasonable.

    As for your original question, doing the foreach as a personal alias is fine. I wouldn’t use it in any script, since if anyone else reads that, they probably already know about xargs. So using your foreach would be more confusing to any potential reader I think.


  • Don’t use ls if you want to get filenames, it does a bunch of stuff to them. Use a shell glob or find.

    Also, because filenames can have newlines, if you want to loop over them, it’s best to use one these:

    for x in *; do do_stuff "$x"; done # can be any shell glob, not just *
    find . -exec do_stuff {} \;
    find . -print0 | xargs -0 do_stuff # not POSIX but widely supported
    find . -print0 | xargs -0 -n1 do_stuff # same, but for single arg command
    

    When reading newline-delimited stuff with while read, you want to use:

    cat filenames.txt | while IFS= read -r x; do_stuff "$x"; done
    

    The IFS= prevents trimming of whitespace, and -r prevents interpretation of backslashes.


  • SDL3 has a new “GPU” API, which is some kind abstraction over Vulkan/DirectX12/Metal. I imagine it hides a bunch of boilerplate as well. With this, I think, one could do a 3D render engine without having to directly use the Vulkan API (or OpenGL, …). However, the shaders need to be in whatever format the backend expects it seems.






  • Edit: You are right. I looked it up:

    There seems to be an actual technical difference, in the kernel, between an initrd and an initramfs. An initrd is apparently mounted like a normal file system, it’s just in RAM instead of a backed by a block device. An initramfs is a tmpfs into which a (usually cpio) archive is extracted into. The initramfs apparently would be preferable generally, because the kernel understands that it’s a ramdisk, whereas with an initrd it would go through the block device layer, which would mean it would use more ram: If you read a file from an initrd, the kernel would copy the file to ram (unnecessarily, since it’s already in ram) like it would for a filesystem on disk, but for a tmpfs/initramfs, it understands it doesn’t need to do that.

    From a user’s perspective there is no significant functional difference I don’t think, and I don’t think this relevant to OP’s question, that probably has more to do with the userspace tools.


  • Since it doesn’t happen on Windows, it’s probably a driver issue. You can try a newer (or older) kernel, and you can try to report this to your distro or upstream (probably the Linux kernel mailing list, in this case). Both have a low probability of helping you. You could try and debug this, but that likely requires some advanced skills.


  • So, firstly, about the nomenclature: initrd (initial ram disk) and initramfs (initial ram file system) are usually used interchangeably as far as I know. For example, even though my Debian uses initramfs-tools, the generated images are called /boot/initrd.img-*. (Edit: There is a technical difference but an initramfs may be referred to as an initrd (like in this case) due to how similar they are.)

    For example, when installing a kernel, apt shows this output on my Debian machine:

    linux-image-6.12.6-amd64 (6.12.6-1) wird eingerichtet ...
    /etc/kernel/postinst.d/initramfs-tools:
    update-initramfs: Generating /boot/initrd.img-6.12.6-amd64
    

    What you’re talking about is probably the software used to generate this initial ramdisk, which on Debian is done using initramfs-tools (which contains the mkinitramfs command), while on other distros dracut (command: mkinitrd) might be used.

    I will say it strikes me as weird that Devuan doesn’t use initramfs-tools since it’s a Debian derivative. Maybe you are mistaken about this? Possibly no initrd/initramfs is used at all on this specific Pi version of Devuan? IDK.

    Edit: See my other comment. I’m wrong. There is an actual technical difference between initrd and initramfs, but I don’t think that’s actually relevant in this situation. Or rather, both are functionally the same, so it doesn’t really matter from the perspective of the user or distro that there’s a difference. I will keep the rest of the comment as is, since I do reckon OP’s problem is unrelated to this difference, and that probably something else is tripping up OP.



  • whole lot of annoyance over so-called anti-establishmentarianists who rather talk Linux for months on end with no actual plan of moving even though they talk as if they have one, that fucking ticks me off, and I feel as if it’s everywhere because people wanna fit in

    Yeah you’re keeping it real, fucking posers amiright? You’re sooo mad at all these phonies just trying to fit in.

    I seriously hope you’re just a teenager because that means you’re going to grow out of this phase, otherwise this is just sad.