Disable IO accounting inheritance in the Linux kernel

From: Artem S. Tashkinov
Date: Wed Jul 05 2023 - 19:04:40 EST


Hi everyone,

The Linux kernel does IO accounting, it calculates how many pages of
data the process has read and written (IO_READ/IO_WRITE).

Here's the issue: when an application launches another application which
does IO and the latter application exits, the former application
inherits (adds) the exited application IO read/write stats.

This could make sense for multiprocess applications like e.g. Chrome or
Firefox.

However it doesn't make any sense for e.g. your desktop environment.

Here's an example: I'm under XFCE. I launch an application from my
desktop. It exits. Now the xfce-session process has added all the IO
stats of the exited application. I do not want that or I want to have an
option of enabling this behavior only for certain applications.


Artem