[Expired for linux (Ubuntu) because there has been no activity for 60
** Changed in: linux (Ubuntu)
Status: Incomplete => Expired
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
cfq scheduler can write parts of sequential write in reverse order
Status in linux package in Ubuntu:
I'm opening a raw disk device (like /dev/sdb) with O_DIRECT and then
doing write() calls. The device is actually USB mass storage. Looking
at the USB packets with Wireshark, I see that the write() calls are
being split into multiple SCSI writes. That part is okay I guess. The
problem is that these writes can happen in reverse order. Suppose the
write() call is writing to sectors 100 to 200. The first SCSI write
may write 150 to 200 and the second SCSI write may write 100 to 149.
Correctness does appear to be maintained. I only had a problem with
correctness because I'm abusing the protocol for writing to a hacked
digital photo frame via
The photo frame doesn't fully process the protocol and only looks at
the data as a series of USB packets.
However, this is bad for performance with hard disks. Surely if you
have a sequential write, the optimal way to do that write is
sequentially from start to finish. Since changing the scheduler for
that block device from cfq to noop fixes this problem, I assume it has
to do with the elevator algorithm use to optimize hard disk access.
But surely such optimization only makes sense between contiguous
sequential writes, and not for splitting up one such write.
DistroRelease: Ubuntu 17.10
Package: linux-image-4.13.0-19-generic 4.13.0-19.22
ProcVersionSignature: Ubuntu 4.13.0-19.22-generic 4.13.13
Uname: Linux 4.13.0-19-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version
USER PID ACCESS COMMAND
/dev/snd/controlC0: bgjenero 2116 F.... pulseaudio
Card hw:0 'Intel'/'HDA Intel at 0xfa200000 irq 30'
Mixer name : 'Realtek ALC889A'
Components : 'HDA:10ec0885,1458a002,00100101'
Controls : 63
Simple ctrls : 26
Date: Mon Dec 11 05:23:12 2017
eth0 no wireless extensions.
lo no wireless extensions.
MachineType: Gigabyte Technology Co., Ltd. P35-DS3R
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
UpgradeStatus: Upgraded to artful on 2017-09-30 (71 days ago)
dmi.bios.vendor: Award Software International, Inc.
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
To manage notifications about this bug go to:
Mailing list: https://launchpad.net/~kernel-packages
Post to : firstname.lastname@example.org
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp