igh latency when writing to files - 4.14-rt1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I observed higher that usual latencies when running:
$ cd /tmp
$ taskset 2 stress -d 1 --hdd-bytes 1M &
$ timeout 5 taskset 8 cyclictest -p80 -i250 -n -q

The maximum latency is 43:
T: 0 (3060) P:80 I:250 C: 39980 Min:   6 Act:  15 Avg:   9 Max:  43

When running stress -m, the maximum latency was about 18, which is
much smaller than 43.

The system is arm64 (Xilinx ZCU102 board) with linux kernel 4.14-rt1.

stress -d performs file writes and calls unlink().

I am curious why the maximum latency is more than doubled with stress -d
and I wonder if there is any way to improve it.

Note that I traced the exectution using ftrace and saw the following call stack:

raw_spin_lock_irqsave
task_rq_lock
migrate_disable_update_cpus_allowed
migrate_disable
pagefault_disable
kmap_atomic
iov_iter_copy_from_user_atomic
generic_perform_write
__generic_file_write_iter
__vfs_write

I guess that raw_spin_lock_irqsave disables interrupts, but I'm not
sure if this is
the cause of the high latency.
ftrace says that migrate_disable takes about 20 microseconds
and migrate_enable another 20 microseconds, but ftrace itself has some overhead.



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux