From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756143AbeARPFP (ORCPT ); Thu, 18 Jan 2018 10:05:15 -0500 Received: from merlin.infradead.org ([205.233.59.134]:47012 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756146AbeARPFL (ORCPT ); Thu, 18 Jan 2018 10:05:11 -0500 Date: Thu, 18 Jan 2018 16:05:05 +0100 From: Peter Zijlstra To: Thomas Gleixner Cc: Yang Shi , longman@redhat.com, LKML Subject: Re: [PATCH 2/2 v3] lib: debugobjects: touch watchdog to avoid softlockup when !CONFIG_PREEMPT Message-ID: <20180118150505.GD2249@hirez.programming.kicks-ass.net> References: <1515023802-54196-1-git-send-email-yang.s@alibaba-inc.com> <1515023802-54196-2-git-send-email-yang.s@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 18, 2018 at 10:02:25AM +0100, Thomas Gleixner wrote: > > > 2) We can do a cond_resched() if not in atomic context and interrupts are > > > enabled. > > > > I did try this before I went with touching softlockup watchdog approach. The > > problem is in_atomic() can't tell if it is in atomic context on non-preempt > > kernel. For preempt kernel, it is easy. > > Peter, can we do anything about that? Not really :/ Take for instance a spinlock on !PREEMPT, only the lock variable is touched, preempt_count isn't. So we cannot know.