Skip to contentSkip to conversation

Why fio triggers reading of device serial number

DISCUSSION Asias He 2 participants 3 messages May 18, 2012 1 message not in the archive

lore
Share & tools
lore

Asias He

author
#1 lore raw
In reply to a message not in the archive

Hi, List

I noticed that fio triggers reading of device serial number when fio starts (one read) and stops (lots of read). I was wondering if fio was reading the sysfs attribute directly in fio's code, e.g./sys/block/vda/serial, or it triggered something which make udevd to read it.

trace-cmd shows it seems udevd is reading:

udevd-6856 [006] xxx: function: dev_attr_show
udevd-6856 [006] xxx: function: virtblk_serial_show

Any ideas? Thanks.

UDEV RULES
---------------
/lib/udev/rules.d/60-persistent-storage.rules

KERNEL=="vd*[!0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}"

KERNEL=="vd*[0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}-part%n"

FIO Config
-------------
[global]
bs=512
size=100G
direct=1
#ioengine=libaio
ioengine=sync
numjobs=256
filename=/dev/vda
thread
[seq-read-write]
rw=rw

Signature · 1 line
Asias
#2 lore raw
Quoted 8 lines · Asias He

Hi, List

I noticed that fio triggers reading of device serial number when fio starts (one read) and stops (lots of read). I was wondering if fio was reading the sysfs attribute directly in fio's code, e.g./sys/block/vda/serial, or it triggered something which make udevd to read it.

Quoted 6 lines

trace-cmd shows it seems udevd is reading:

udevd-6856 [006] xxx: function: dev_attr_show
udevd-6856 [006] xxx: function: virtblk_serial_show

Any ideas? Thanks.

Probably mtime changing of the special file inode, causing some udev rule to attempt to re-read the id/serial. Fio doesn't read the serial number.

Signature · 1 line
Jens Axboe
author
#3 lore raw
Quoted 11 lines · Jens Axboe
Quoted 10 lines · Asias He

Hi, List

I noticed that fio triggers reading of device serial number when fio starts (one read) and stops (lots of read). I was wondering if fio was reading the sysfs attribute directly in fio's code, e.g./sys/block/vda/serial, or it triggered something which make udevd to read it.

trace-cmd shows it seems udevd is reading:

Quoted 8 lines
Quoted 4 lines

udevd-6856 [006] xxx: function: dev_attr_show
udevd-6856 [006] xxx: function: virtblk_serial_show

Any ideas? Thanks.

Probably mtime changing of the special file inode, causing some udev rule to attempt to re-read the id/serial. Fio doesn't read the serial number.

OK. Thanks, Jens.

Signature · 1 line
Asias