From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933646AbcBACMH (ORCPT ); Sun, 31 Jan 2016 21:12:07 -0500 Received: from mail-pa0-f67.google.com ([209.85.220.67]:33969 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933513AbcBACMF (ORCPT ); Sun, 31 Jan 2016 21:12:05 -0500 Date: Mon, 1 Feb 2016 11:13:17 +0900 From: Sergey Senozhatsky To: Byungchul Park Cc: Sergey Senozhatsky , akpm@linux-foundation.org, mingo@kernel.org, linux-kernel@vger.kernel.org, akinobu.mita@gmail.com, jack@suse.cz, peter@hurleysoftware.com, torvalds@linux-foundation.org Subject: Re: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code Message-ID: <20160201021317.GB1033@swordfish> References: <1454071417-20685-1-git-send-email-byungchul.park@lge.com> <20160129125457.GI31266@X58A-UD3R> <20160131124007.GB1306@swordfish> <20160201014536.GA29804@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160201014536.GA29804@X58A-UD3R> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (02/01/16 10:45), Byungchul Park wrote: > But avoiding an unnecessary recursive cycle is better than panic(). What I handled > in this patch is the warning case which causes unnecessary lockup and don't need to > happen. Hello, correct, that was one of the reasons why I proposed to return back to discussion. it's a bit hard to tell if we have any chance to survive a "lockup suspected" spin_dump() recursion; even if we have one, it's a race spin_unlock on CPUA vs. stack overflow on CPUB. we can be more certain with ->magic mismatch, for example, but "lockup suspected" is tricky. -ss