GNU bug report logs - #46978
27.1; Shell mode performs extremely poorly in Linux-libre 5.10.20

Previous Next

Package: emacs;

Reported by: Mark H Weaver <mhw <at> netris.org>

Date: Sat, 6 Mar 2021 23:57:01 UTC

Severity: normal

Found in version 27.1

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mark H Weaver <mhw <at> netris.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 46978 <at> debbugs.gnu.org
Subject: bug#46978: 27.1; Shell mode performs extremely poorly in Linux-libre 5.10.20
Date: Sun, 07 Mar 2021 03:50:15 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Mark H Weaver <mhw <at> netris.org>
>> Date: Sat, 06 Mar 2021 21:39:54 -0500
>> 
>> Mark H Weaver <mhw <at> netris.org> writes:
>> 
>> > 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
>> > <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.20&id=41c6f6b926d0e712d0321f8a8f6511fea748e814>
>> >
>> > tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer
>> > <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.20&id=279e54536ddbb4dbd337fca74926b68651160043>
>> >
>> > 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.
>> 
>> Reverting the two commits cited above fixes the problem.
>
> So does this mean this isn't an Emacs issue, but the issue with that
> kernel?

That's not clear to me.  What I know is that these changes to Linux's
TTY subsystem, authored by Linus Torvalds himself and recently included
in upstream Linux 5.11.3 and 5.10.20, have lead to this regression in
Emacs.  This might simply be a kernel bug, or it could be that Emacs is
making an improper assumption about how the kernel behaves.

> Or is there still something you'd like us to look into on the
> Emacs side?

I would suggest investigating to find out what's going wrong here, and
then:

(1) if it can reasonably be considered a kernel regression, submit a bug
    report to the Linux developers, and

(2) if Emacs is found to behave suboptimally in its interactions with
    the kernel, or if the Linux developers do not soon deploy their own
    fix, modify Emacs as needed to avoid the problem.

What do you think?

    Thanks,
      Mark




This bug report was last modified 4 years and 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.