> pipe flag “PIPE_BUF_FLAG_CAN_MERGE”, which signifies that the data buffer inside the pipe can be merged, i.e, this flag notifies the kernel that the changes which are written to the page cache pointed to by the pipe shall be written back to the file<p>That's not what this flag does. No pipe flag can ever cause writing dirty pages back to disk, because pipes have by definition nothing to do with files.<p>The CAN_MERGE flag tells the kernel that the next write() to the pipe can append data to this pipe buffer until it's full, instead of creating a new pipe buffer for every write().
I stopped reading when it starts explaining what's memory management.<p>In contrast I found the explanation written by the original author an engaging read: <a href="https://dirtypipe.cm4all.com/" rel="nofollow">https://dirtypipe.cm4all.com/</a>