How to find which kernel options are needed by iotop ? In the man pages :
CONFIG_TASK_DELAY_ACCT and CONFIG_TASK_IO_ACCOUNTING options need to
be enabled in your Linux kernel build configuration, these options
depend on CONFIG_TASKSTATS.
In other words, as part of the make menuconfig menu (of my 5.4), under the CPU/Task time and stats accounting sub-menu, you should check Export task/process statistics through netlink then Enable per-task delay accounting as well as Enable per-task storage I/O accounting
Won't hurt to also check CONFIG_VM_EVENT_COUNTERS (Enable VM event counters for /proc/vmstat in the General menu) Why ? Hah because there is some file named vmstat.c in the iotop package… so… just in case…
Adding that, at the end of the day, if whatever compulsory CONFIG option is missing, iotop should complain at run time.
I cannot tell if this is still valid under newer kernels but, on my 5.4 and probably because of some significant overhead, per-task delay accounting is not automatically activated despite CONFIG_TASK_DELAY_ACCT = y.
In order to actually enable per-task delay accounting, you also need to add delayacct to your kernel command line.
Now for what concerns the display of ?err : I suspect ncurses (the GUI toolkit iotop relies on) for being partly responsible since this lib usually displays as question marks characters that are not defined in your current language settings.
Hence, either you get some mismatches in your locale settings or… the PRIO value is somehow unprintable.
BTW, would you be using threaded IRQ's IOW running SCHED_RR ? I can admit that I hardly can figure out the output of get_ioprio_from_sched function (in ioprio.c) in case of whatever thread scheduled real time. (since, in this case, the nice value is just meaningless (even ps doesn't try displaying it) hence ioprio-nice and incidentally the return value depending on ioprio_nice.)
inline int get_ioprio_from_sched(pid_t pid) {
int scheduler=sched_getscheduler(pid);
int nice=getpriority(PRIO_PROCESS,pid);
int ioprio_nice=(nice+20)/5;
if (scheduler==SCHED_FIFO||scheduler==SCHED_RR)
return (IOPRIO_CLASS_RT<<IOPRIO_CLASS_SHIFT)+ioprio_nice;
if (scheduler==SCHED_IDLE)
return IOPRIO_CLASS_IDLE<<IOPRIO_CLASS_SHIFT;
return (IOPRIO_CLASS_BE<<IOPRIO_CLASS_SHIFT)+ioprio_nice;
}