News for hackers. Stuff that matters.
Re:Is RAM wiped before use in another LXC container? by enedil on Wednesday April 05, 2023 @07:43AM (#35452448)
In a sense it does. Page tables would need to be copied.
Re:Is RAM wiped before use in another LXC container? by jacquesm on Wednesday April 05, 2023 @07:50AM (#35452514)
Yes, but they all point to the same pages. The tables take up a small fraction of the memory of the pages themselves.
Re:Is RAM wiped before use in another LXC container? by enedil on Wednesday April 05, 2023 @09:11AM (#35453550)
But large fraction, if all you do afterwards is an exec call. Given 8 bytes per page table entry and 4k pages, it's 1/512 memory wasted. So if your process uses 8GB, it's 16MB. Still takes noticeable time if you spawn often.
Re:Is RAM wiped before use in another LXC container? by jacquesm on Wednesday April 05, 2023 @09:28AM (#35453789)
I've never had the page tables be the cause of out of memory issues. Besides the fact that they are usually pre-allocated to avoid recursive page faults.
Re:Is RAM wiped before use in another LXC container? by lxgr on Wednesday April 05, 2023 @10:37AM (#35455013)
Aren't page tables nested? I don't know if any OS or hardware architecture actually supports it, but I could imagine the parent-level page table being virtual and copy-on-write itself.