From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.emacs.bugs Subject: bug#46978: 27.1; Shell mode performs extremely poorly in Linux-libre 5.10.20 Date: Sat, 06 Mar 2021 18:54:48 -0500 Message-ID: <878s6z25y4.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29603"; mail-complaints-to="usenet@ciao.gmane.io" To: 46978@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 07 00:57:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lIgnG-0007ZH-3B for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Mar 2021 00:57:10 +0100 Original-Received: from localhost ([::1]:41384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIgnE-00066G-LM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Mar 2021 18:57:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIgn8-00065q-0W for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 18:57:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55224) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIgn7-0002Ia-PO for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 18:57:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lIgn7-0006VX-Mr for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 18:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Mar 2021 23:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46978 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161507498124963 (code B ref -1); Sat, 06 Mar 2021 23:57:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Mar 2021 23:56:21 +0000 Original-Received: from localhost ([127.0.0.1]:38537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIgmS-0006UZ-Px for submit@debbugs.gnu.org; Sat, 06 Mar 2021 18:56:21 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:42912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIgmR-0006UR-4Y for submit@debbugs.gnu.org; Sat, 06 Mar 2021 18:56:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIgmQ-00061J-SD for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 18:56:18 -0500 Original-Received: from world.peace.net ([64.112.178.59]:35414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIgmO-0002CQ-EP for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 18:56:18 -0500 Original-Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lIgmM-0005fA-0h; Sat, 06 Mar 2021 18:56:14 -0500 Received-SPF: pass client-ip=64.112.178.59; envelope-from=mhw@netris.org; helo=world.peace.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201700 Archived-At: On a GNU Guix system, after upgrading my kernel from Linux-libre 5.10.19 to 5.10.20, Emacs Shell mode now performs extremely poorly, specifically when displaying the output from commands. For example, using "cat" to print a 14 kilobyte text file on a Thinkpad X200, Emacs Shell mode now requires approximately 11 seconds to display the output. That's ~1200 characters per second. It appears to me that Emacs might now be performing a display update for each character received from the pseudo-tty, instead of processing larger blocks at a time, as it has previously done. Other programs I've tried that use pseudo-ttys don't seem to have this problem with the new kernel. For example, the performance of GNU Screen 4.8.0 is not noticeably affected. Ditto for GNOME Terminal 3.34.2, based on VTE 0.60.3. The problem is reproducible using "emacs -Q", and does not seem to depend on the windowing system. It happens both within X using an Emacs built with --with-x-toolkit=no (the "emacs-no-x-toolkit" package in Guix), and also within a Linux text console using an Emacs built without X support at all (the "emacs-no-x" package in Guix). I've skimmed the list of changes between Linux 5.10.19 and 5.10.20, and found these two commits that might be relevant: tty: implement read_iter tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer These changes are also included in Linux-libre 5.11.3 (the newest release), but I haven't yet tried that version. I'm currently building a variant of Linux-libre 5.10.20 with these two commits reverted, to see if that makes the problem go away, and I will report back when I have those results. See below for some details generated by M-x report-emacs-bug. I could provide further details, including the full build log of the Emacs binary I'm using, or instructions for how to build precisely the same Emacs binary using GNU Guix, but I suspect that this bug is insensitive to such details. Mark In GNU Emacs 27.1 (build 1, x86_64-unknown-linux-gnu) Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure CONFIG_SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash --prefix=/gnu/store/ack6blyzqgwx3cfsxk0drgj61xghri0x-emacs-no-x-27.1 --enable-fast-install --build=x86_64-unknown-linux-gnu --with-modules --disable-build-details' Configured features: SOUND NOTIFY INOTIFY ACL GNUTLS LIBXML2 ZLIB MODULES THREADS JSON PDUMPER GMP Important settings: value of $EMACSLOADPATH: /root/.guix-profile/share/emacs/site-lisp:/root/.guix-profile/share/emacs/27.1/lisp value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: gpm-mouse-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow regexp-opt sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail tool-bar rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils t-mouse term/linux disp-table tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads inotify multi-tty make-network-process emacs) Memory information: ((conses 16 42993 4300) (symbols 48 5872 1) (strings 32 16278 1702) (string-bytes 1 528232) (vectors 16 6851) (vector-slots 8 82979 4968) (floats 8 17 248) (intervals 56 175 0) (buffers 1000 11))