Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1552362

Re: [PATCH] serial/8250: remove comment about schedule_timeout

From Theodore Ts'o <tytso@mit.edu>
Newsgroups linux.kernel
Subject Re: [PATCH] serial/8250: remove comment about schedule_timeout
Date 2017-01-05 23:10 +0100
Message-ID <sWoop-BR-5@gated-at.bofh.it> (permalink)
References <sWisF-4WY-7@gated-at.bofh.it> <sWk1r-63E-3@gated-at.bofh.it> <sWk1r-63E-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jan 05, 2017 at 03:17:45PM -0200, Thadeu Lima de Souza Cascardo wrote:
> Okay. At first, I wanted to simply use msleep there, then realized there
> was the spinlock. I thought I got a good writeup of the history that was
> not in git yet, maybe we should just add a better comment and more
> details in the commit log. How about this as the comment?

Could you look at fixing this, instead?  I was taking a look at the
code, and it so very.... 1990's.  It looks like it was written during
the days before SMP, and then locking was smashed in a very
blunt-force way ---- probably because that's how it happened.  :-)

What we should **really** be doing with autoconfiguration, is instead
of using the spinlock to prevent it from being accessed, is to lock
out any attempt to transmit from the top-half, and remove it from the
linked list of ports to prevent the interrupt handler from accessing
it, make sure that any active interrupt handler has exited (and you
can use the spinlock for the preceeding bits), but then we can safely
do the autoconfiguration without having the deal with the spinlock at
all, afterwards.

It should't be *that* hard to just fix it for real.

Cheers,

						- Ted

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] serial/8250: remove comment about schedule_timeout Thadeu Lima de Souza Cascardo <cascardo@canonical.com> - 2017-01-05 16:50 +0100
  Re: [PATCH] serial/8250: remove comment about schedule_timeout Thadeu Lima de Souza Cascardo <cascardo@canonical.com> - 2017-01-05 18:30 +0100
    Re: [PATCH] serial/8250: remove comment about schedule_timeout Theodore Ts'o <tytso@mit.edu> - 2017-01-05 23:10 +0100
  Re: [PATCH] serial/8250: remove comment about schedule_timeout One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2017-01-05 20:40 +0100

csiph-web