From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753166AbdK0SSj convert rfc822-to-8bit (ORCPT ); Mon, 27 Nov 2017 13:18:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34368 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752694AbdK0SSh (ORCPT ); Mon, 27 Nov 2017 13:18:37 -0500 Subject: Re: [RFC PATCH 2/2] lib: debugobjects: touch watchdog to avoid softlockup when !CONFIG_PREEMPT To: Yang Shi , tglx@linutronix.de Cc: linux-kernel@vger.kernel.org References: <1510947833-116482-1-git-send-email-yang.s@alibaba-inc.com> <1510947833-116482-2-git-send-email-yang.s@alibaba-inc.com> <553877ed-843e-a59d-3a76-2e90ce192ab1@alibaba-inc.com> From: Waiman Long Organization: Red Hat Message-ID: <1a6f92f5-2c12-1276-916b-fd2848899e5c@redhat.com> Date: Mon, 27 Nov 2017 13:18:36 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <553877ed-843e-a59d-3a76-2e90ce192ab1@alibaba-inc.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 27 Nov 2017 18:18:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/27/2017 12:54 PM, Yang Shi wrote: > Hi Waiman, > > The second patch of this series. > > Thanks, > Yang > > > On 11/17/17 11:43 AM, Yang Shi wrote: >> There are nested loops on debug objects free path, sometimes it may take >> over hundred thousands of loops, then cause soft lockup with >> !CONFIG_PREEMPT >> occasionally, like below: >> >> ... >> >> The code path might be called in either atomic or non-atomic context, >> so touching softlockup watchdog instead of calling cond_resched() which >> might fall asleep. However, it is unnecessary to touch the watchdog >> every loop, so just touch the watchdog at every 10000 (best estimate) >> loops. >> >> Signed-off-by: Yang Shi I do have some concern about suppressing the soft lockup warning entirely. If the system feels unresponsive for a certain period of time (e.g. 22s), most users would like to know what is going on. It can be a custom message with less scary warning. Alternatively, some opt-out mechanism can be added to explicitly disable soft lookup warning for debugobjs is OK as long as it is not the default. Cheers, Longman