From: "Theodore Ts'o" <tytso@mit.edu>
To: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
linux-serial@vger.kernel.org,
Russell King <rmk+kernel@armlinux.org.uk>
Subject: Re: [PATCH] serial/8250: remove comment about schedule_timeout
Date: Thu, 5 Jan 2017 16:59:40 -0500 [thread overview]
Message-ID: <20170105215940.nzezqi5qmubaw56x@thunk.org> (raw)
In-Reply-To: <20170105171744.qgax752sxcwqod2w@calabresa>
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
prev parent reply other threads:[~2017-01-05 22:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-05 15:48 Thadeu Lima de Souza Cascardo
2017-01-05 16:40 ` One Thousand Gnomes
2017-01-05 17:17 ` Thadeu Lima de Souza Cascardo
2017-01-05 21:59 ` Theodore Ts'o [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170105215940.nzezqi5qmubaw56x@thunk.org \
--to=tytso@mit.edu \
--cc=cascardo@canonical.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®