mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	"mingo@kernel.org" <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	Neil Brown <neilb@suse.de>, Michael Shaver <jmshaver@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs
Date: Tue, 9 Aug 2016 11:48:27 -0700	[thread overview]
Message-ID: <3cec7657-caa9-92ca-9f0e-34f073a6ed8c@sandisk.com> (raw)
In-Reply-To: <20160809171459.GA13840@redhat.com>

On 08/09/2016 10:15 AM, Oleg Nesterov wrote:
> On 08/08, Bart Van Assche wrote:
>>
>> No external modules were loaded when I triggered the lockup
> 
> Heh. Could you test the patch below?
> 
> Oleg.
> 
> --- x/kernel/sched/wait.c
> +++ x/kernel/sched/wait.c
> @@ -283,7 +283,7 @@ void abort_exclusive_wait(wait_queue_hea
>  	if (!list_empty(&wait->task_list))
>  		list_del_init(&wait->task_list);
>  	else if (waitqueue_active(q))
> -		__wake_up_locked_key(q, mode, key);
> +		__wake_up_locked_key(q, TASK_NORMAL, key);
>  	spin_unlock_irqrestore(&q->lock, flags);
>  }
>  EXPORT_SYMBOL(abort_exclusive_wait);

Hello Oleg,

That patch looks interesting to me. Unfortunately even with that patch
applied I still see lockups. These are the two lockups I have observed
after I had applied your patch, rebuilt and reinstalled the kernel and
rebooted the test server:

[ 1548.018115] sysrq: SysRq : Show Blocked State
[ 1548.018210]   task                        PC stack   pid father
[ 1548.018677] systemd-udevd   D ffff8803a9f13be8     0 29908    483 0x00000000
[ 1548.018792]  ffff8803a9f13be8 ffffffff82584bd0 00ffffff8252b1b0 ffff88046f0569c0
[ 1548.018961]  ffff88016c98b140 ffff8800757bc9c0 ffff8803a9f14000 ffff88046f0569c0
[ 1548.019131]  7fffffffffffffff ffffffff8161fcf0 ffff8803a9f13d50 ffff8803a9f13c00
[ 1548.019316] Call Trace:
[ 1548.019415]  [<ffffffff8161f567>] schedule+0x37/0x90
[ 1548.019464]  [<ffffffff81623bbf>] schedule_timeout+0x27f/0x470
[ 1548.019758]  [<ffffffff8161e93f>] io_schedule_timeout+0x9f/0x110
[ 1548.019808]  [<ffffffff8161fd06>] bit_wait_io+0x16/0x60
[ 1548.019856]  [<ffffffff8161f996>] __wait_on_bit+0x56/0x80
[ 1548.019906]  [<ffffffff81152e1d>] wait_on_page_bit_killable+0xbd/0xc0
[ 1548.020006]  [<ffffffff81152f50>] generic_file_read_iter+0x130/0x770
[ 1548.020158]  [<ffffffff812134a0>] blkdev_read_iter+0x30/0x40
[ 1548.020209]  [<ffffffff811d266b>] __vfs_read+0xbb/0x130
[ 1548.020258]  [<ffffffff811d2a51>] vfs_read+0x91/0x130
[ 1548.020305]  [<ffffffff811d3dd4>] SyS_read+0x44/0xa0
[ 1548.020354]  [<ffffffff81624fa5>] entry_SYSCALL_64_fastpath+0x18/0xa8

[ 1050.892823] sysrq: SysRq : Show Blocked State
[ 1050.892912]   task                        PC stack   pid father
[ 1050.893333] systemd-udevd   D ffff880449b3f838     0 17240    492 0x00000006
[ 1050.893974] Call Trace:
[ 1050.894119]  [<ffffffff8161f567>] schedule+0x37/0x90
[ 1050.894168]  [<ffffffff81623bcf>] schedule_timeout+0x27f/0x470
[ 1050.894561]  [<ffffffff8161e93f>] io_schedule_timeout+0x9f/0x110
[ 1050.894609]  [<ffffffff8161fd16>] bit_wait_io+0x16/0x60
[ 1050.894657]  [<ffffffff8161fb09>] __wait_on_bit_lock+0x49/0xa0
[ 1050.894705]  [<ffffffff8114fe59>] __lock_page+0xb9/0xc0
[ 1050.894802]  [<ffffffff81165d80>] truncate_inode_pages_range+0x3e0/0x760
[ 1050.895750]  [<ffffffff81166110>] truncate_inode_pages+0x10/0x20
[ 1050.895799]  [<ffffffff81212a10>] kill_bdev+0x30/0x40
[ 1050.895849]  [<ffffffff81213d31>] __blkdev_put+0x71/0x360
[ 1050.895951]  [<ffffffff81214069>] blkdev_put+0x49/0x170
[ 1050.895998]  [<ffffffff812141b0>] blkdev_close+0x20/0x30
[ 1050.896047]  [<ffffffff811d48d8>] __fput+0xe8/0x1f0
[ 1050.896094]  [<ffffffff811d4a19>] ____fput+0x9/0x10
[ 1050.896141]  [<ffffffff810842d3>] task_work_run+0x83/0xb0
[ 1050.896189]  [<ffffffff8106606e>] do_exit+0x3ee/0xc40
[ 1050.896284]  [<ffffffff8106694b>] do_group_exit+0x4b/0xc0
[ 1050.896331]  [<ffffffff81073d9a>] get_signal+0x2ca/0x940
[ 1050.896425]  [<ffffffff8101bf43>] do_signal+0x23/0x660
[ 1050.896626]  [<ffffffff810022b3>] exit_to_usermode_loop+0x73/0xb0
[ 1050.896678]  [<ffffffff81002cb0>] syscall_return_slowpath+0xb0/0xc0
[ 1050.896727]  [<ffffffff81625033>] entry_SYSCALL_64_fastpath+0xa6/0xa8

Bart.

  reply	other threads:[~2016-08-09 18:48 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 16:35 Bart Van Assche
2016-08-03 18:11 ` Peter Zijlstra
2016-08-03 18:56   ` Bart Van Assche
2016-08-03 21:30     ` Oleg Nesterov
2016-08-03 21:51       ` Bart Van Assche
2016-08-04 14:09         ` Peter Zijlstra
2016-08-04 14:31           ` Bart Van Assche
2016-08-05 17:41           ` Bart Van Assche
2016-08-08 10:22             ` Peter Zijlstra
2016-08-08 14:38               ` Bart Van Assche
2016-08-08 16:20                 ` Oleg Nesterov
2016-08-08 18:31                   ` Bart Van Assche
2016-08-09 17:14                     ` Oleg Nesterov
2016-08-09 18:48                       ` Bart Van Assche [this message]
2016-08-09 23:10                         ` Bart Van Assche
2016-08-10 10:45                         ` Oleg Nesterov
2016-08-10 16:01                           ` Bart Van Assche
2016-08-10 16:27                             ` Oleg Nesterov
2016-08-10 19:58                           ` Bart Van Assche
2016-08-11 17:36                             ` Oleg Nesterov
2016-08-12 16:16                               ` Oleg Nesterov
2016-08-12 16:27                                 ` Bart Van Assche
2016-08-12 22:47                                 ` Bart Van Assche
2016-08-13 16:32                                   ` Oleg Nesterov
2016-08-15 23:39                                     ` Bart Van Assche
2016-08-16 13:06                                       ` Oleg Nesterov
2016-08-16 16:54                                         ` Bart Van Assche
2016-08-17 17:30                                           ` Oleg Nesterov
2016-08-13 17:07                                   ` Oleg Nesterov
2016-08-09 23:56                   ` Bart Van Assche
2016-08-10 10:57                     ` Oleg Nesterov
2016-08-10 11:03                       ` Peter Zijlstra
2016-08-04  0:05       ` Bart Van Assche

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=3cec7657-caa9-92ca-9f0e-34f073a6ed8c@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jmshaver@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=neilb@suse.de \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.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

all inboxes | Powered by JetHome®