From a1b042f79d71a3a444aef1281fa61ccd45064c6a Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Sun, 26 Aug 2018 03:56:54 +0000 Subject: [PATCH] Disable atkbd0 and atkdbc0 in EC2 AMIs. This has the effect of skipping the probing and attaching of the PS/2 mouse (not present on EC2) and keyboard (emulated, but not accessible via EC2). Note that we disable atkbd0 separately even though during device probing it shows up as a child of atkbdc0; this is necessary because the device is also initialized during the early console setup from hammer_time. This change cuts the kernel boot time on an EC2 c5.4xlarge instance from 7259ms down to 4727 ms. Approved by: re (marius) --- release/tools/ec2.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 0ef5a211df1..562647cd702 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -68,6 +68,13 @@ vm_extra_pre_umount() { echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf + # The emulated keyboard attached to EC2 instances is inaccessible to + # users, and there is no mouse attached at all; disable to keyboard + # and the keyboard controller (to which the mouse would attach, if + # one existed) in order to save time in device probing. + echo 'hint.atkbd.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + echo 'hint.atkbdc.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + # EC2 has two consoles: An emulated serial port ("system log"), # which has been present since 2006; and a VGA console ("instance # screenshot") which was introduced in 2016.