linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Waiman Long <waiman.long@hpe.com>
To: Ding Tianhong <dingtianhong@huawei.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Peter Zijlstra <peterz@infradead.org>,
	Jason Low <jason.low2@hp.com>, Ingo Molnar <mingo@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"Paul E. McKenney" <paulmck@us.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <Will.Deacon@arm.com>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Waiman Long <Waiman.Long@hp.com>
Subject: Re: [PATCH] locking/mutex: Avoid spinner vs waiter starvation
Date: Fri, 12 Feb 2016 13:33:33 -0500	[thread overview]
Message-ID: <56BE257D.4020608@hpe.com> (raw)
In-Reply-To: <56B2A749.8080400@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

On 02/03/2016 08:20 PM, Ding Tianhong wrote:
> On 2016/2/4 3:24, Davidlohr Bueso wrote:
>> On Wed, 03 Feb 2016, Ding Tianhong wrote:
>>
>>> Agree, but this patch is going to help the waiter in the wait list to get the lock, your scene probability looks more
>>> too low and I don't think it is a problem.
>> Sure, I was in fact implying its not the end of the world,
>> although it will be interesting to see the impact on different
>> (non pathological) workloads, even if it only affects a single
>> waiter. Also, technically this issue can also affect rwsems if
>> only using writers, but that's obviously pretty idiotic, so I
>> wouldn't worry about it.
>>
>> Thanks,
>> Davidlohr
>>
> Hi Davidlohr, Peter:
>
> According Davidlohr's suggestion, I use several VM to test Peter's patch, and sadly I found one VM
> still happen Hung Task for this problem, so I think we still need to think more about this solution.
>
> Thanks.
> Ding

After thinking about it, it may be the case the hung task missed the 
wakeup. If no new task enters the wait queue again, the hung task will 
never get woken up. Would you mind trying out my patch to see if you are 
still seeing hung task or not?

Thanks,
Longman

[-- Attachment #2: longman-mutex-v2-patch.tar.gz --]
[-- Type: application/x-gzip, Size: 5106 bytes --]

  reply	other threads:[~2016-02-12 18:49 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21  9:29 [PATCH RFC] locking/mutexes: don't spin on owner when wait list is not NULL Ding Tianhong
2016-01-21 21:23 ` Tim Chen
2016-01-22  2:41   ` Paul E. McKenney
2016-01-22  2:48     ` Davidlohr Bueso
2016-01-22  3:13       ` Paul E. McKenney
2016-01-21 23:02 ` Waiman Long
2016-01-22  6:09   ` Davidlohr Bueso
2016-01-22 13:38     ` Waiman Long
2016-01-22 16:46       ` Davidlohr Bueso
2016-01-25  2:23         ` [PATCH] locking/mutex: Allow next waiter lockless wakeup Davidlohr Bueso
2016-01-25 23:02           ` Waiman Long
2016-02-29 11:21           ` [tip:locking/core] " tip-bot for Davidlohr Bueso
2016-01-22  8:54   ` [PATCH RFC] locking/mutexes: don't spin on owner when wait list is not NULL Peter Zijlstra
2016-01-22 10:20     ` Jason Low
2016-01-22 10:53       ` Peter Zijlstra
2016-01-22 10:56         ` Peter Zijlstra
2016-01-22 11:06           ` Peter Zijlstra
2016-01-22 13:59             ` Waiman Long
2016-01-24  8:03               ` Ding Tianhong
2016-01-29  9:53                 ` Peter Zijlstra
2016-01-30  1:18                   ` Ding Tianhong
2016-02-01  3:29                     ` huang ying
2016-02-01  3:35                       ` Huang, Ying
2016-02-01 10:08                     ` [PATCH] locking/mutex: Avoid spinner vs waiter starvation Peter Zijlstra
2016-02-02 21:19                       ` Davidlohr Bueso
2016-02-03  7:10                         ` Ding Tianhong
2016-02-03 19:24                           ` Davidlohr Bueso
2016-02-04  1:20                             ` Ding Tianhong
2016-02-12 18:33                               ` Waiman Long [this message]
2016-02-03 22:07                         ` Waiman Long
2016-02-04  1:35                       ` Jason Low
2016-02-04  8:55                         ` huang ying
2016-02-04 22:49                           ` Jason Low
2016-01-22 13:41     ` [PATCH RFC] locking/mutexes: don't spin on owner when wait list is not NULL Waiman Long

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=56BE257D.4020608@hpe.com \
    --to=waiman.long@hpe.com \
    --cc=Waiman.Long@hp.com \
    --cc=Will.Deacon@arm.com \
    --cc=dave@stgolabs.net \
    --cc=dingtianhong@huawei.com \
    --cc=jason.low2@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulmck@us.ibm.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@linux.intel.com \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).