-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow polling single-device md devices #488
allow polling single-device md devices #488
Conversation
Linux is weird. LVM devices can present themselves as md devices with a single underlying device. That device may be polled (but ones with more than a single underlying device can't). Right now, if a device is md, we opt out of polling entirely, even though polling is allowed under that edge-case. This commit changes the logic to disable polling only if an md device has more than a single device underneath it.
I got this error with this patch
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 99.4M 1 loop /snap/core/11993
loop1 7:1 0 99.5M 1 loop /snap/core/11798
loop2 7:2 0 55.5M 1 loop /snap/core18/2253
loop3 7:3 0 55.5M 1 loop /snap/core18/2246
loop4 7:4 0 995.2M 1 loop /snap/intellij-idea-ultimate/338
loop5 7:5 0 987.3M 1 loop /snap/intellij-idea-ultimate/333
nvme0n1 259:0 0 953.9G 0 disk
├─nvme0n1p1 259:1 0 498M 0 part /boot/efi
├─nvme0n1p2 259:2 0 4G 0 part /recovery
├─nvme0n1p3 259:3 0 945.4G 0 part
│ └─cryptdata 253:0 0 945.4G 0 crypt
│ └─data-root 253:1 0 945.4G 0 lvm /
└─nvme0n1p4 259:4 0 4G 0 part
└─cryptswap 253:2 0 4G 0 crypt
$ ll /sys/dev/block/ | grep '253:0'
lrwxrwxrwx 0 root 31 12月 2021 253:0 -> ../../devices/virtual/block/dm-0
$ ls /sys/devices/virtual/block/dm-1/slaves
dm-0 |
Thanks for reporting @youjiali1995! Can you confirm that "/home/youjiali1995/Program/hackathon/2021/glommio/tmp/benchfiles/benchfile-dio-1" is hosted on a nvme device formatted with ext4 or xfs? Did you try to drop the commit from this PR? Did it work afterward? |
Yes.
Yes. |
Hum, this is curious. Here's my computer where this patch works as expected.
The storage example works in both |
@HippoBaro we should revert this , and keep investigating in parallel. |
This reverts commit 16d9166.
Linux is weird. LVM devices can present themselves as md devices with a
single underlying device. That device may be polled (but ones with
more than a single underlying device can't). Right now, if a
device is md, we opt out of polling entirely, even though polling is
allowed under that edge-case.
This commit changes the logic to disable polling only if an md device
has more than a single device underneath it.