Re: [systemd-devel] Ordering cycle when trying to use BindToDevice socket option

2023-03-31 Thread Andrei Borzenkov
On 01.04.2023 01:12, Dmitri Kourennyi wrote: The message seems to imply that systemd-networkd depends on sockets.target, which in turn depends on the tinyssh socket, but that in turn needs systemd-networkd to run to create the target device. I Socket units have implicit Before=sockets.target

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Michael Chapman
On Sat, 1 Apr 2023, Uoti Urpala wrote: > On Sat, 2023-04-01 at 06:16 +1100, Michael Chapman wrote: > > On Fri, 31 Mar 2023, Lennart Poettering wrote: > > [...] > > > Presumably your system mmaps ELF binaries, VM images, and similar > > > stuff into memory. if you don't allow anonymous memory to

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Uoti Urpala
On Sat, 2023-04-01 at 06:16 +1100, Michael Chapman wrote: > On Fri, 31 Mar 2023, Lennart Poettering wrote: > [...] > > Presumably your system mmaps ELF binaries, VM images, and similar > > stuff into memory. if you don't allow anonymous memory to backed out > > onto swap, then you basically

[systemd-devel] Ordering cycle when trying to use BindToDevice socket option

2023-03-31 Thread Dmitri Kourennyi
I have a homebrew router that includes multiple independent network devices. I manage these devices using systemd-networkd, which ultimately ends up with a `wan` device, and a `brlan` bridge that covers all the lan connections (possibly of importance, I use .link files so systemd-networkd

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Michael Chapman
On Fri, 31 Mar 2023, Lennart Poettering wrote: [...] > Presumably your system mmaps ELF binaries, VM images, and similar > stuff into memory. if you don't allow anonymous memory to backed out > onto swap, then you basically telling the kernel "please page out > my program code out instead". Which

Re: [systemd-devel] How to make vtable entry as SD_BUS_VTABLE_UNPRIVILEGED

2023-03-31 Thread Lal, Arun
Hi Lennart, Thanks for the reply  I had seen SD_BUS_METHOD function. But my doubt was bit different. check_access function get the variable v as shown below /* Then, look for a known method */ vtable_key.path = (char*) p; vtable_key.interface = m->interface;

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Richard Purdie
On Fri, 2023-03-31 at 12:50 +0200, Lennart Poettering wrote: > On Do, 30.03.23 13:16, Phillip Susi (ph...@thesusis.net) wrote: > > > > > Lennart Poettering writes: > > > > > oomd/PSI looks at memory allocation latencies to determine memory > > > pressure. Since you disallow anonymous memory to

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Lennart Poettering
On Fr, 31.03.23 21:54, Michael Chapman (m...@very.puzzling.org) wrote: > > because otherwise you just remove the latencies from anonymous memory > > but you amplify the latencies on file-backed memory. Which is overall > > worse, not better. > > The host isn't doing much IO. Just a bit of logging

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Christoph Anton Mitterer
Hey. Just for better understanding: AFAIU, the main idea of having swap despite enough memory was the following: Unless when processes explicitly release memory (or get stopped), the kernel can mostly reclaim only cached memory,... but if swap is available it can also reclaim anonymous memory.

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Michael Chapman
On Fri, 31 Mar 2023, Lennart Poettering wrote: > On Fr, 31.03.23 07:57, Michael Chapman (m...@very.puzzling.org) wrote: > > > On Fri, 31 Mar 2023, Luca Boccassi wrote: > > [...] > > > No, it does not make "little difference", there are entire subsystems > > > which are much worse off, if not

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Michael Chapman
On Fri, 31 Mar 2023, Lennart Poettering wrote: > On Fr, 31.03.23 18:24, Michael Chapman (m...@very.puzzling.org) wrote: > > > On Fri, 31 Mar 2023, Barry wrote: > > [...] > > > If you want to run in ram only then you must turn off the kernel > > > overcommit. > > > Have you done that? If not then

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Lennart Poettering
On Do, 30.03.23 13:16, Phillip Susi (ph...@thesusis.net) wrote: > > Lennart Poettering writes: > > > oomd/PSI looks at memory allocation latencies to determine memory > > pressure. Since you disallow anonymous memory to be paged out and thus > > increase IO on file backed memory you increase the

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Lennart Poettering
On Fr, 31.03.23 07:57, Michael Chapman (m...@very.puzzling.org) wrote: > On Fri, 31 Mar 2023, Luca Boccassi wrote: > [...] > > No, it does not make "little difference", there are entire subsystems > > which are much worse off, if not completely useless, without swap. > > Post-cgroupsv2 memory

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Lennart Poettering
On Fr, 31.03.23 18:24, Michael Chapman (m...@very.puzzling.org) wrote: > On Fri, 31 Mar 2023, Barry wrote: > [...] > > If you want to run in ram only then you must turn off the kernel overcommit. > > Have you done that? If not then you risk processes getting SEGV signals. > > Seriously. It's

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Michael Chapman
On Fri, 31 Mar 2023, Lennart Poettering wrote: > On Do, 30.03.23 18:56, Michael Chapman (m...@very.puzzling.org) wrote: > > > On Thu, 30 Mar 2023, Lennart Poettering wrote: > > > On Mi, 29.03.23 13:53, Christoph Anton Mitterer (cales...@scientia.org) > > > wrote: > > > > > > > > > That's a bad

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Lennart Poettering
On Do, 30.03.23 18:56, Michael Chapman (m...@very.puzzling.org) wrote: > On Thu, 30 Mar 2023, Lennart Poettering wrote: > > On Mi, 29.03.23 13:53, Christoph Anton Mitterer (cales...@scientia.org) > > wrote: > > > > > > > That's a bad idea btw. I'd advise you not to do that: on modern > > > > >

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Lennart Poettering
On Do, 30.03.23 01:39, Christoph Anton Mitterer (cales...@scientia.org) wrote: > Well that's clear, it's just that on my systems (both servers and > workstations) I've never really run into the need to reclaim lots of > anonymous memory. It's the Linux kernel that reclaims memory for you. You

Re: [systemd-devel] How to make vtable entry as SD_BUS_VTABLE_UNPRIVILEGED

2023-03-31 Thread Lennart Poettering
On Fr, 31.03.23 05:32, Lal, Arun (arun@intel.com) wrote: > Hi All, > > In file systemd\src\libsystemd\sd-bus\bus-objects.c function check_access has > the following check: > > /* If the member is marked UNPRIVILEGED let's grant access */ > if (c->vtable->flags &

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Michael Chapman
On Fri, 31 Mar 2023, Tomasz Torcz wrote: > On Fri, Mar 31, 2023 at 06:24:09PM +1100, Michael Chapman wrote: > > On Fri, 31 Mar 2023, Barry wrote: > > [...] > > > If you want to run in ram only then you must turn off the kernel > > > overcommit. > > > Have you done that? If not then you risk

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Tomasz Torcz
On Fri, Mar 31, 2023 at 06:24:09PM +1100, Michael Chapman wrote: > On Fri, 31 Mar 2023, Barry wrote: > [...] > > If you want to run in ram only then you must turn off the kernel overcommit. > > Have you done that? If not then you risk processes getting SEGV signals. > > Seriously. It's almost as

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Michael Chapman
On Fri, 31 Mar 2023, Barry wrote: [...] > If you want to run in ram only then you must turn off the kernel overcommit. > Have you done that? If not then you risk processes getting SEGV signals. Seriously. It's almost as if nobody here is actually reading anything of what I've written!

Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Barry
> On 31 Mar 2023, at 00:51, Michael Chapman wrote: > > On Fri, 31 Mar 2023, Phillip Susi wrote: >> >> Michael Chapman writes: >> >>> What specifically is the difference between: >>> >>> * swap does not exist at all; >>> * swap is full of data that will not be swapped in for weeks or