Michael Catanzaro wrote:
nohang has experimented with PSI, but it actually isn't using
PSI
metrics by default because they've proven to be less effective than
hoped for. In theory, using an interactivity measure like PSI should
provide for the best results, but in practice it just hasn't worked out
well.
I think this really needs to be handled entirely in the kernel to be
effective, because if the interactivity is already down the drain, your
userspace PSI monitor will not get to run at all in a reasonable timeframe.
I think that to ensure interactivity, the kernel needs to synchronously
check the interactivity metrics each and every time it gets a swap-in
request, and fail the request (and kill the process, most likely) if the
requesting process is known to hurt interactivity too much with its previous
requests. Anything asynchronous will just not work, because asynchronous
event handlers stop working when the interactivity is too poor.
Kevin Kofler