All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Kosuke Tatsukawa <tatsu@ab.jp.nec.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] tty: fix stall caused by missing memory barrier in drivers/tty/n_tty.c
Date: Fri, 9 Oct 2015 16:22:55 -0400	[thread overview]
Message-ID: <5618221F.9060205@hurleysoftware.com> (raw)
In-Reply-To: <5617F93F.9060408@hurleysoftware.com>

On 10/09/2015 01:28 PM, Peter Hurley wrote:
> Tatsukawa-san,
> 
> I would still like to root-cause the reported stall; is the reported
> stall resolved if smp_mb() is added before the waitqueue_active()
> in __receive_buf()?

Nevermind, I see it now.

The store to commit_head is deferred until after the load of read_wait->next;
a full memory barrier would properly order the store before the load but,
since that is roughly equivalent to taking the spin lock for the wake up anyway,
it makes sense to just always do the wakeup.

Thanks again.

Regards,
Peter Hurley

  reply	other threads:[~2015-10-09 20:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02  8:27 [PATCH v2] tty: fix stall caused by missing memory barrier in drivers/tty/n_tty.c Kosuke Tatsukawa
2015-10-09 17:28 ` Peter Hurley
2015-10-09 20:22   ` Peter Hurley [this message]
2015-10-10  5:04     ` Kosuke Tatsukawa
2015-10-09 20:08 ` Peter Hurley

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=5618221F.9060205@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tatsu@ab.jp.nec.com \
    /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.