All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Bombe <andreas.bombe@mytum.de>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Jiri Slaby <jslaby@suse.cz>,
	gregkh@suse.de, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v2 1/6] TTY: serial, remove BTM from wait_until_sent
Date: Thu, 11 Aug 2011 03:06:41 +0200	[thread overview]
Message-ID: <20110811010640.GA4186@amos.fritz.box> (raw)
In-Reply-To: <4E42C998.1050208@gmail.com>

On Wed, Aug 10, 2011 at 08:10:32PM +0200, Jiri Slaby wrote:
> On 08/10/2011 08:07 PM, Andreas Bombe wrote:
> > On Wed, Aug 10, 2011 at 04:43:19PM +0200, Jiri Slaby wrote:
> >> On 08/10/2011 03:09 AM, Andreas Bombe wrote:
> >>> I did my simple test on ttyS0 again: "stty -F /dev/ttyS0 crtscts" then
> >>> "echo >/dev/ttyS0". I attached the gzipped sysrq-t list in case you need
> >>> the complete output. This is just the process while it is trying to
> >>> close the device (bash's internal echo):
> >>
> >> Hmm, perhaps obvious question. What is the port connected with? And with
> >> what cable? Is it null modem cable? Or at least with DTR-CTS connected?
> > 
> > Nothing is connected. After all, the whole point of this exercise is to
> > give the driver data to send which it can't get out so I can see whether
> > it blocks all tty operations system wide while trying to do the flush on
> > close.
> 
> But according to the trace, it waits only in its queue...
> 
> Well, could you turn on lockdep and dump sysrq-d when your echo is
> closing the port?

Ok, it still appears to be holding the big_tty_mutex. I ran /bin/echo so
that it actually shows up as "echo" here:

[  962.365574] SysRq : Show Locks Held
[  962.365580] 
[  962.365581] Showing all locks held in the system:
[  962.365599] 1 lock held by Xorg/1881:
[  962.365601]  #0:  (big_tty_mutex){+.+.+.}, at: [<ffffffff813d0013>] tty_lock+0x12/0x14
[  962.365624] 1 lock held by getty/2732:
[  962.365626]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff81254fff>] n_tty_read+0x188/0x681
[  962.365637] 1 lock held by getty/2733:
[  962.365639]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff81254fff>] n_tty_read+0x188/0x681
[  962.365647] 1 lock held by getty/2734:
[  962.365649]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff81254fff>] n_tty_read+0x188/0x681
[  962.365658] 1 lock held by getty/2735:
[  962.365660]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff81254fff>] n_tty_read+0x188/0x681
[  962.365679] 1 lock held by bash/2994:
[  962.365681]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff81254fff>] n_tty_read+0x188/0x681
[  962.365691] 1 lock held by bash/3326:
[  962.365692]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff81254fff>] n_tty_read+0x188/0x681
[  962.365701] 1 lock held by bash/3444:
[  962.365703]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff81254fff>] n_tty_read+0x188/0x681
[  962.365713] 1 lock held by bash/3793:
[  962.365715]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff81254fff>] n_tty_read+0x188/0x681
[  962.365725] 1 lock held by less/3899:
[  962.365727]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff81254fff>] n_tty_read+0x188/0x681
[  962.365735] 2 locks held by echo/4162:
[  962.365737]  #0:  (big_tty_mutex){+.+.+.}, at: [<ffffffff813d0013>] tty_lock+0x12/0x14
[  962.365746]  #1:  (&port->mutex){+.+.+.}, at: [<ffffffff81268b46>] uart_close+0x6c/0x243
[  962.365754] 
[  962.365756] =============================================
[  962.365757] 


Also, can you not reproduce it? I thought the "enable hardware handshake
on unconnected port and send" dance should be universal enough to work
for everyone. Everyone with a serial port somewhere in the system, that
is.

-- 
Andreas Bombe

      reply	other threads:[~2011-08-11  1:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14 12:35 [PATCH v2 1/6] TTY: serial, remove BTM from wait_until_sent Jiri Slaby
2011-07-14 12:35 ` [PATCH v2 2/6] TTY: msm_serial, remove unneeded console set Jiri Slaby
2011-07-14 12:35 ` [PATCH v2 3/6] TTY: serial, remove tasklet for tty_wakeup Jiri Slaby
2011-07-19 16:34   ` Alan Cox
2011-08-31 14:43     ` Jiri Slaby
2011-07-14 12:35 ` [PATCH v2 4/6] TTY: ami_serial, remove BTM from wait_until_sent Jiri Slaby
2011-07-14 12:35 ` [PATCH v2 5/6] TTY: remove tty_locked Jiri Slaby
2011-07-19 16:35   ` Alan Cox
2011-07-14 12:35 ` [PATCH v2 6/6] TTY: mxser+cyclades remove wait_until_sent debug code Jiri Slaby
2011-07-14 13:24 ` [PATCH v2 1/6] TTY: serial, remove BTM from wait_until_sent Arnd Bergmann
2011-07-19  0:35 ` Andreas Bombe
2011-08-08 13:21   ` Jiri Slaby
2011-08-10  1:09     ` Andreas Bombe
2011-08-10  9:46       ` Jiri Slaby
2011-08-10 12:25         ` Andreas Bombe
2011-08-10 14:43       ` Jiri Slaby
2011-08-10 18:07         ` Andreas Bombe
2011-08-10 18:10           ` Jiri Slaby
2011-08-11  1:06             ` Andreas Bombe [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=20110811010640.GA4186@amos.fritz.box \
    --to=andreas.bombe@mytum.de \
    --cc=alan@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@suse.de \
    --cc=jirislaby@gmail.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.