[systemd-devel] Question about sd-event memory pressue + glib.
Kate Hsuan
hpa at redhat.com
Tue Dec 3 06:37:37 UTC 2024
Hi,
I tried to use the example [1] to use sd-event memory pressure and hit
some problems.
First, I wrote the code to use sd_event_loop and the memory pressure
event was correctly captured and the callback ran. Then, I used the
example [1] to use glib to poll the event. I found sd_event_wait()
always returned 0 when G_IO_IN|G_IO_PRI was found. It didn't move to
dispatch status to call sd_event_disaptch to call the callback.
I did another attempt to receive network IO through sd-event
(sd_event_add_io()). The IO event worked fine and it can go to the
dispatch status to call sd_event_dispatch() to receive the packet.
This attempt showed the glib + sd-event works fine but memory
pressure.
Could someone resolve my issue? Or, if it is a bug, I can file an issue for it.
Thank you ;)
[1] https://www.freedesktop.org/software/systemd/man/252/sd_event_get_fd.html
--
BR,
Kate
More information about the systemd-devel
mailing list