Kernel update: Slow initial hard drive write after boot

I have two internal hard drives with an EXT4 partition on one of them and two on the other one. All of them are mounted automatically on startup, as set in /etc/fstab.

LABEL=KIS	/media/kis	ext4	defaults,noatime	0	2
LABEL=NAGY	/media/nagy	ext4	defaults,noatime	0	2
LABEL=EXT4PART	/media/ext4part	ext4	defaults,noatime	0	2

On the 5.4 LTS kernel, everything works fine. However, on the 5.10 kernel, the first write to one of these partitions after boot are very slow. For example, if I open a 0.5 MB Markdown file in Neovim, edit it and save the changes, Neovim becomes unresponsive for about 2-3 seconds while the HDD light is on. All consequent writes are fast as expected.

Another example is playing a game from 2001 that periodically updates its save profile. On the first such update (five minutes into the game), the game freezes for 2-3 seconds, then continues without any problems until I quit and reboot.

I first noticed this pattern last year when I was using kernel 5.8, but I didn’t think much of it at first, and when it finally started to bother me, it became EOL anyway, so I went back to 5.4.

Any help is appreciated.

❯ inxi --admin --verbosity=7 --filter --no-host --width
System:
  Kernel: 5.10.18-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64
  root=UUID=c4b63cd3-e01f-4485-82fe-887f3239c45b rw
  resume=UUID=0c8c9ceb-786f-40ff-9283-546d6d75bf62
  Desktop: i3 4.19.1 info: polybar dm: SDDM Distro: Manjaro Linux
Machine:
  Type: Desktop Mobo: ASRock model: B75 Pro3-M serial: <filter>
  BIOS: American Megatrends v: P1.60 date: 12/11/2012
Memory:
  RAM: total: 3.78 GiB used: 2.05 GiB (54.3%)
  RAM Report: missing: Required program dmidecode not available
CPU:
  Info: Dual Core model: Intel Celeron G1610 bits: 64 type: MCP
  arch: Ivy Bridge family: 6 model-id: 3A (58) stepping: 9 microcode: 21
  L2 cache: 2 MiB bogomips: 10381
  Speed: 2378 MHz min/max: 1600/2600 MHz Core speeds (MHz): 1: 2378 2: 2478
  Flags: acpi aperfmperf apic arat arch_perfmon bts clflush cmov constant_tsc
  cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept erms est
  flexpriority flush_l1d fpu fsgsbase fxsr ht ibpb ibrs lahf_lm lm mca mce
  md_clear mmx monitor msr mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq
  pdcm pebs pge pln pni popcnt pse pse36 pti pts rdtscp rep_good sep smep ss
  ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc
  tsc_deadline_timer vme vmx vnmi vpid xsave xsaveopt xtopology xtpr
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
  mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
  mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
  IBRS_FW, STIBP: disabled, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Turks XT [Radeon HD 6670/7670] vendor: PC Partner Limited
  driver: radeon v: kernel bus ID: 01:00.0 chip ID: 1002:6758 class ID: 0300
  Display: x11 server: X.org 1.20.10 driver: loaded: radeon
  resolution: <missing: xdpyinfo>
  OpenGL: renderer: AMD TURKS (DRM 2.50.0 / 5.10.18-1-MANJARO LLVM 11.1.0)
  v: 3.3 Mesa 20.3.4 compat-v: 3.1 direct render: Yes
Audio:
  Device-1: AMD Turks HDMI Audio [Radeon HD 6500/6600 / 6700M Series]
  vendor: PC Partner Limited driver: snd_hda_intel v: kernel bus ID: 01:00.1
  chip ID: 1002:aa90 class ID: 0403
  Device-2: Creative Labs CA0106/CA0111 [SB Live!/Audigy/X-Fi Series]
  driver: snd_ca0106 v: kernel bus ID: 05:02.0 chip ID: 1102:0007
  class ID: 0401
  Sound Server: ALSA v: k5.10.18-1-MANJARO
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
  vendor: ASRock driver: r8168 v: 8.048.03-NAPI modules: r8169 port: c000
  bus ID: 04:00.0 chip ID: 10ec:8168 class ID: 0200
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
  broadcast: <filter>
  IP v4: <filter> type: secondary noprefixroute scope: global
  broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Microsoft Xbox 360 Wireless Adapter type: USB driver: xpad
  bus ID: 2-1.6:3 chip ID: 045e:0719 class ID: ff00 serial: <filter>
  WAN IP: <filter>
Bluetooth:
  Device-1: ASUSTek Broadcom BCM20702A0 Bluetooth type: USB driver: btusb
  v: 0.8 bus ID: 1-1.1:3 chip ID: 0b05:17cb class ID: fe01 serial: <filter>
  Message: Required tool hciconfig not installed. Check --recommends
RAID:
  Message: No RAID data was found.
Drives:
  Local Storage: total: 1.93 TiB used: 1.59 TiB (82.6%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 850 EVO 120GB
  size: 111.79 GiB block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
  rotation: SSD serial: <filter> rev: 1B6Q scheme: MBR
  ID-2: /dev/sdb maj-min: 8:16 vendor: Samsung model: HD502IJ size: 465.76 GiB
  block size: physical: 512 B logical: 512 B speed: 3.0 Gb/s serial: <filter>
  rev: 1110 scheme: MBR
  ID-3: /dev/sdc maj-min: 8:32 vendor: Western Digital model: WD15EARS-32MVWB0
  size: 1.36 TiB block size: physical: 512 B logical: 512 B speed: 3.0 Gb/s
  serial: <filter> rev: AB51 scheme: MBR
  Optical-1: /dev/sr0 vendor: ASUS model: DRW-24F1ST a rev: 1.00
  dev-links: cdrom
  Features: speed: 48 multisession: yes audio: yes dvd: yes
  rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition:
  ID-1: / raw size: 109.79 GiB size: 107.94 GiB (98.32%)
  used: 75.98 GiB (70.4%) fs: ext4 dev: /dev/sda1 maj-min: 8:1 label: N/A
  uuid: c4b63cd3-e01f-4485-82fe-887f3239c45b
  ID-2: /media/ext4part raw size: 47.34 GiB size: 46.47 GiB (98.17%)
  used: 35.75 GiB (76.9%) fs: ext4 dev: /dev/sdc2 maj-min: 8:34
  label: EXT4PART uuid: 8b8b257f-a18a-4610-bfdc-99c854f13940
  ID-3: /media/kis raw size: 319.51 GiB size: 314.37 GiB (98.39%)
  used: 294.24 GiB (93.6%) fs: ext4 dev: /dev/sdb2 maj-min: 8:18 label: KIS
  uuid: 71edfcf5-86b0-4c49-9394-32da02ab2681
  ID-4: /media/nagy raw size: 1.32 TiB size: 1.3 TiB (98.42%)
  used: 1.2 TiB (92.3%) fs: ext4 dev: /dev/sdc5 maj-min: 8:37 label: NAGY
  uuid: 1c6fe2d6-f977-4860-8f94-2c8cb2c5364c
Swap:
  Kernel: swappiness: 1 (default 60) cache pressure: 100 (default)
  ID-1: swap-1 type: partition size: 2 GiB used: 6 MiB (0.3%) priority: -2
  dev: /dev/sda2 maj-min: 8:2 label: N/A
  uuid: 0c8c9ceb-786f-40ff-9283-546d6d75bf62
Unmounted:
  ID-1: /dev/sdb1 maj-min: 8:17 size: 146.25 GiB fs: ntfs label: N/A
  uuid: 523FC5A42B02C83F
  ID-2: /dev/sdc1 maj-min: 8:33 size: 1 KiB fs: <superuser required>
  label: N/A uuid: N/A
  ID-3: /dev/sdc3 maj-min: 8:35 size: 1.49 GiB fs: swap label: N/A
  uuid: c851e58e-6d97-42f8-810c-2616089504f7
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0
  speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900
  Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0
  speed: 480 Mb/s chip ID: 8087:0024 class ID: 0900
  Device-1: 1-1.1:3 info: ASUSTek Broadcom BCM20702A0 Bluetooth
  type: Bluetooth driver: btusb interfaces: 4 rev: 2.0 speed: 12 Mb/s
  chip ID: 0b05:17cb class ID: fe01 serial: <filter>
  Device-2: 1-1.5:4 info: Logitech G203 Gaming Mouse type: Mouse,HID
  driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s
  chip ID: 046d:c084 class ID: 0300 serial: <filter>
  Device-3: 1-1.6:5 info: Cooler Master MK730 type: Keyboard,HID
  driver: hid-generic,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s
  chip ID: 2516:008f class ID: 0300
  Hub-3: 2-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0
  speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900
  Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0
  speed: 480 Mb/s chip ID: 8087:0024 class ID: 0900
  Device-1: 2-1.6:3 info: Microsoft Xbox 360 Wireless Adapter
  type: <vendor specific> driver: xpad interfaces: 8 rev: 2.0 speed: 12 Mb/s
  chip ID: 045e:0719 class ID: ff00 serial: <filter>
  Hub-5: 3-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0
  speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900
  Hub-6: 4-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.0 speed: 5 Gb/s
  chip ID: 1d6b:0003 class ID: 0900
Sensors:
  System Temperatures: cpu: 37.0 C mobo: N/A gpu: radeon temp: 38.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 196 Uptime: 35m wakeups: 0 Init: systemd v: 247 Compilers:
  gcc: 10.2.0 clang: 11.1.0 Packages: pacman: 2041 lib: 490 Shell: Zsh v: 5.8
  running in: alacritty inxi: 3.3.01