Two notices: 1, a process has only one main thread which is itself. 2, a process has many threads.
Solution 1: Please use taskstats  related interfaces, and send TASKSTATS_TYPE_PID and TASKSTATS_TYPE_TGID commands to kernel to get a process’s ‘blkio_delay_total’ parameter for a process with one main thread and a process with threads separately.
Solution 2: instrument kernel to get process’s I/O utilization percentage. See  for details.