Bug 230903 - remount root readonly slow on Alix
Summary: remount root readonly slow on Alix
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.2-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-26 05:09 UTC by Stanislaw Halik
Modified: 2021-01-28 21:52 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislaw Halik 2018-08-26 05:09:25 UTC
Hey,

On this Alix machine, mounting root readonly after mounting it read-write is slow, as in:

% mount -w /
% time mount -r / # 15-20 seconds

A workaround is to mount the partition async in which case the remount is almost instant. My typical workflow is to mount read-write, break something, then remount read-only for the sake of fsck(8).

The original Alix series use a Compact Flash -> ATA controller. I've observed this behavior with multiple CF cards. Typical WCHAN is `biowr', `wdrain' or both. This behavior persists since at least FreeBSD 10 series.

Note, the CF storage isn't that slow, see:
  cat /usr/lib/* > /dev/null  0.10s user 1.21s system 46% cpu 2.821 total
  cat /usr/bin/* > /dev/null  0.12s user 3.09s system 67% cpu 4.756 total

There are some nasty things in KERNCONF, only to reduce logspam and save time otherwise spent probing for nonexistent controllers. The Alix series have none of these controllers:

-->--
include GENERIC
[trivia]

nooptions   SMP
nooptions   APIC_IO
nodevice    acpi

nodevice    xenpci # fix build
nooptions   XENHVM # idem
nodevice    hyperv # idem
--<--

I can attach various config files (sysctl.conf, rc.conf, dmesg.boot, fstab, KERNCONF) if necessary but they look sane other than the aforementioned KERNCONF.

cheers,
sh