You are not logged in.

#1 2020-09-26 09:13:48

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 287

How do inhibit block device polling

Hello,

so device polling means "monitoring device file descriptor to see if I/O operation is possible" (paraphrase of man epoll).

Sometimes it causes side effects like spinning up hard drives or unnecessary HDD led blinks every few seconds.

Some time ago (like 2014) it was possible to inhibit polling of block device using udisks:

/usr/bin/udisks --inhibit-polling /dev/disk/by-id/ata-PIONEER_DVD-RW_DVR-212

Currently

Polling drives does not apply to udisks2 as for a few years now this is done by the kernel itself.

https://bugs.freedesktop.org/show_bug.cgi?id=26508#c12

From the article about "new kernel polling interface" https://lwn.net/Articles/743714/ I found EPOLL(7) man page but it seems there is no userland utility or udev rule to inhibit polling. Udev seems to have no such property:

devadm info -ap /sys/class/block/sr0 |grep -i polling

Before udisks lost this functionality, it was possible to create a rule referring to udisks:

SUBSYSTEM=="block", ENV{ID_VENDOR}=="APPLE*", ENV{ID_MODEL}=="SD Card Reader*", ENV{UDISKS_DISABLE_POLLING}="1" 

https://bbs.archlinux.org/viewtopic.php … 12#p944112

So the question is how to control kernel polling?

Offline

Board footer

Powered by FluxBB