Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753902AbcLTIOp (ORCPT ); Tue, 20 Dec 2016 03:14:45 -0500 Received: from mail-wj0-f179.google.com ([209.85.210.179]:34666 "EHLO mail-wj0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346AbcLTIOn (ORCPT ); Tue, 20 Dec 2016 03:14:43 -0500 MIME-Version: 1.0 In-Reply-To: <1481640325-7076-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> References: <1481640325-7076-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> From: Vegard Nossum Date: Tue, 20 Dec 2016 09:14:40 +0100 Message-ID: Subject: Re: [PATCH] locking/hung_task: Defer showing held locks To: Tetsuo Handa Cc: LKML , Vegard Nossum , Andrew Morton , Linus Torvalds , Mandeep Singh Baines , "Paul E. McKenney" , Peter Zijlstra , Thomas Gleixner , Ingo Molnar Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1018 Lines: 29 On 13 December 2016 at 15:45, Tetsuo Handa wrote: > When I was running my testcase which may block hundreds of threads > on fs locks, I got lockup due to output from debug_show_all_locks() > added by commit b2d4c2edb2e4f89a ("locking/hung_task: Show all locks"). > > I think we don't need to call debug_show_all_locks() on each blocked > thread. Let's defer calling debug_show_all_locks() till before panic() > or leaving for_each_process_thread() loop. First of all, sorry for not answering earlier. I'm not sure I fully understand the problem, you say the "output from debug_show_all_locks()" caused a lockup, but was the problem simply that the amount of output caused it to stall for a long time? Could we instead 1) move the debug_show_all_locks() into the if (sysctl_hung_task_panic) bit unconditionally 2) call something (touch_nmi_watchdog()?) inside debug_show_all_locks() 3) in another way make debug_show_all_locks() more robust so it doesn't "lockup" ? Vegard