From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=15.233.44.25; helo=g2t2352.austin.hpe.com; envelope-from=brian.johnson@hpe.com; receiver=edk2-devel@lists.01.org Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6F0B821C913D4 for ; Wed, 8 Nov 2017 07:57:15 -0800 (PST) Received: from G1W8106.americas.hpqcorp.net (g1w8106.austin.hp.com [16.193.72.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2352.austin.hpe.com (Postfix) with ESMTPS id 51132DC; Wed, 8 Nov 2017 16:01:15 +0000 (UTC) Received: from G4W9326.americas.hpqcorp.net (16.208.32.96) by G1W8106.americas.hpqcorp.net (16.193.72.61) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 8 Nov 2017 16:01:07 +0000 Received: from G9W9209.americas.hpqcorp.net (2002:10dc:429c::10dc:429c) by G4W9326.americas.hpqcorp.net (2002:10d0:2060::10d0:2060) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 8 Nov 2017 16:01:07 +0000 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (15.241.52.10) by G9W9209.americas.hpqcorp.net (16.220.66.156) with Microsoft SMTP Server (TLS) id 15.0.1178.4 via Frontend Transport; Wed, 8 Nov 2017 16:01:06 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brian.johnson@hpe.com; Received: from [10.0.2.15] (192.48.192.5) by TU4PR8401MB0416.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:770a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.218.12; Wed, 8 Nov 2017 16:01:01 +0000 To: Heyi Guo , Gerd Hoffmann CC: "Ni, Ruiyu" , "edk2-devel@lists.01.org" , "Dong, Eric" , "Zeng, Star" References: <1958e840-f0fe-6d8e-44d1-03ff9c9dde7b@linaro.org> <0C09AFA07DD0434D9E2A0C6AEB0483103B9B3162@shsmsx102.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5BAB6CB0@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5BAB6F41@SHSMSX104.ccr.corp.intel.com> <20171108090713.5hof77t5l3gikpwk@sirius.home.kraxel.org> <7c7d448c-bd00-954a-dcf4-8f83f98f43d6@linaro.org> From: "Brian J. Johnson" Message-ID: <6eed14fe-31e7-f0ab-3e80-6fa9847e10e4@hpe.com> Date: Wed, 8 Nov 2017 10:00:52 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <7c7d448c-bd00-954a-dcf4-8f83f98f43d6@linaro.org> X-Originating-IP: [192.48.192.5] X-ClientProxiedBy: MWHPR19CA0022.namprd19.prod.outlook.com (2603:10b6:300:d4::32) To TU4PR8401MB0416.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:770a::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ee128ca-4f0c-4ca0-bd4c-08d526c1eb3d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:TU4PR8401MB0416; X-Microsoft-Exchange-Diagnostics: 1; TU4PR8401MB0416; 3:nPYWEEELKeBiIjvTptqRiNe764APUFxwCrGtBzash3D/gGh1HOQ0tAgec3Di2tvi6XGLiRlzYMZFRlCrKxfyZkeqr7uBIPCSellkPqGxE2Mkrxnq+hEpMgSqsskatW6tjZDF5v/qmxFtogt2disqX39+DGqmKHdHZDrq6c2D5FI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FLNde9x63aVOkvaSWKNU0KFo1drVnpbJHUpoXoMdaYj+Jl+ZBEhHqu0fRhqGU3QoYnANuYoLpnmv0o9dCaoxEflO8JFfuczbrZiQT+stdMUZiOfovL5h0UJ123kXXz/qDzY3pmPYK11RJ7tAZ2ZOWYiN6SoMKXaVHW5Ks5bu/JwaMfGqENcYhvUpSOkEYCS; 4:dHAeBMyur31bnFm2xp1hIHK3z/3VzaKpiMK1uPnKvVNLgoPeHsu9E/EWf/jg8XoMybrtubTNFC5hz3GxOnaczfILMys5bhswkuof/rEI2TcpZqudD5/UylWr/fOZDf8IpbiekpHNfLtGhh4P5wDvQH8Pm8TrKqVWDF54F0rAKRVc3LvacVHJmbgz+gRmk7ttGNktGs9a+VSU56C4iesN3/2U1sQp/oeM4JRJCYPGnOiAKkwBXjPQr3jYXCMHNIxY88651AdKGCEN6FP1a91DDQ== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(3231021)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123562025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:TU4PR8401MB0416; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:TU4PR8401MB0416; X-Forefront-PRVS: 0485417665 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(6049001)(376002)(39860400002)(346002)(199003)(24454002)(189002)(54906003)(86362001)(47776003)(110136005)(2906002)(65806001)(36756003)(229853002)(53546010)(66066001)(6246003)(65956001)(6486002)(77096006)(31696002)(50466002)(25786009)(68736007)(2870700001)(83506002)(67846002)(23676003)(93886005)(97736004)(316002)(478600001)(16576012)(3846002)(6116002)(50986999)(81156014)(54356999)(6666003)(58126008)(8676002)(2950100002)(64126003)(5660300001)(101416001)(65826007)(81166006)(31686004)(4326008)(16526018)(33646002)(76176999)(8936002)(106356001)(53936002)(189998001)(305945005)(7736002)(105586002); DIR:OUT; SFP:1102; SCL:1; SRVR:TU4PR8401MB0416; H:[10.0.2.15]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtUVTRQUjg0MDFNQjA0MTY7MjM6YTBJQ2dXOXpNLytQSFNBM2FaTkhSRG9L?= =?utf-8?B?cDlRTEtUUDhGd3FVcFZ5VHVOemNMMlVmL2ZzYVN0Rmh1YnplNXgyZ0dZbmFU?= =?utf-8?B?MWh0WnB0SlE1RkswUEVmVVk4ck5zbDllbW1kVlo3Vjl0OEV6dXlhM3VFZHV0?= =?utf-8?B?QTVCVlIxN3R0WUJsRDY1OC9tQ1FBK25GYTg3ZXBOVlVvVlBxWEc0MkpZMmJk?= =?utf-8?B?MVhtUGNTMHRCZEs5NmNSVnR1RS82U0R3SlVTSnVWRnNZMThkTXpZTVJvZWhh?= =?utf-8?B?RExQd1FCVzA1bmJ1Y25PcmV2ZjYxWklIdVZpV3gyTWJnZFNIdHRic2VtSkg5?= =?utf-8?B?WTdpcUlqOFpiY0l1UkIvb2RCU0lvUWNWZ2JsTGIxZ3VQNUNkbFJIQmJwUU1a?= =?utf-8?B?K0VVM21oS3RiUHNWK0xkZXZsOXFoQk5VNmp5T29ndWJzS1RUem16ckRRV3Iy?= =?utf-8?B?Y1doS2o2Mm1OV2twOVY5VUZXaTkvZURCbnV3NUI4YmVHWmE0aW53b1JBaXJU?= =?utf-8?B?NWVtK1J6NEtYYWxndHBpT2F5dG1MRFdNSlB6ajd1ZjZRb0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Kmf1mHoMCKT0=; 24:X6F/GWSZchqUOVJfmH29HhaWZ61cwQob8PXQpDsGG2hLliW28z7W+X80UKKIAvWWcOYKnW+C7uVjxpPHUfyVsHTkxww9WKLWe+KpAyOYC60=; 7:zRG7RmbiqE8SKzipjjXdoM1+y6kEkoAkv+yxagdfi7s5HPF4sUekPxKwG0WKHT0B1Af8kMvjOfljHyxdV18x6YvvELp6CbkxfUtnY84Cp1rL9Sfs8D6Bot2AmBUANdzW3K8cNZ+Ke7oJk/VTVxRZyQXGq2HHAmfyGZw3GbyuxVSes2ae9g0Vu2xAbh3khSjSwqiuHASLkHZqvr+OMILDB/rV48yBitW9dE3vpIDES9bEXQ+OxXILFoXfoSSbrdwX SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2017 16:01:01.1434 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1ee128ca-4f0c-4ca0-bd4c-08d526c1eb3d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: TU4PR8401MB0416 X-OriginatorOrg: hpe.com Subject: Re: [MdeModulePkg/TerminalDxe] Why do we delay 2s for ESC being pressed? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Nov 2017 15:57:15 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit On 11/08/2017 07:34 AM, Heyi Guo wrote: > > > On 11/08/2017 05:07 PM, Gerd Hoffmann wrote: >> On Wed, Nov 08, 2017 at 04:44:37PM +0800, Heyi Guo wrote: >>> >>> 在 11/8/2017 4:34 PM, Ni, Ruiyu 写道: >>>> No. >>>> Even a terminal tool can recognize F10, it still needs to translate >>>> it into "ESC [ V" >>>> and send the three bytes to firmware. >>> Got it. But the 2 seconds timeout is not for this situation, right? If >>> terminal tool could translate and send the key sequence, I think it can >>> complete 3 bytes transfer in a very short time, isn't it? E.g. 9600 >>> baud / 8 >>> = 1200 Bytes/s (ignore control bits). >>> >>> So 2 seconds timeout is still for user to enter the sequence "ESC [ V" >>> manually? >> No.  Alot of software has this kind of delay because it is recommended >> in some classic unix documentation to avoid mis-interpreting incomplete >> terminal control sequences coming from slow terminals. >> >> Where a "slow terminal" which actually would need such a long delay is a >> physical terminal from the 70ies of the last century, or a virtual >> terminal hooked up over a *really* slow network connection. >> >> Reducing the delay from 2 seconds to roughly 0.2 seconds should be >> pretty safe, things are not that slow any more these days :) > That will be great if we can make such change :) > You'd be surprised how much delay you can get with a few layers of firewalls, VPNs, and cross-country (or intercontinental) WAN links. That's the advantage of serial: you can tunnel it anywhere. Here's a quick workaround: if you start typing other text after the ESC, the terminal driver will see the new keystrokes and resolve the ESC immediately, without the delay. For instance, at the shell prompt, type something, press ESC to clear the line, then just start typing new text without waiting for the timeout. The line will be cleared and the new text will appear correctly, without delay. On setup screens, I usually hit escape to return to the previous screen, then hit one of the arrow keys to cause the ESC to be processed without the timeout. That works pretty well in practice. I'd think a PCD to control this delay would be appropriate, though. -- Brian J. Johnson Enterprise X86 Lab Hewlett Packard Enterprise