From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C78A71FDA8B for ; Mon, 13 Jan 2025 13:12:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736773975; cv=none; b=N8ANw0LHkTa5WpcRezcpbeHHYI9JaQnIUhoEtQevM6I6wkyS+TD2c1FRKKmxjx1oo7QewqRDlOAfajFcyjrT+SL6XvIxenfEYbCycYVsNlH+PTQ/MUZrUZyRhiqkgyt0nJxAWFOJ8VzhkEZrYd6B1hRdxU7vXVclJEgFoN6xMDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736773975; c=relaxed/simple; bh=9ktGGEV0C37oCivc4Q9II018U0zu2hrb0ie/kFzoCGs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GqviBLPxBrAwlGvFO2VtcER+wxFdLueUT3cDcwDtNQkK5pHN+xqbsiA4XXmeR6V9i+xEN78+LINdeKGIAtDYNTq040sfe+zwmZVo8ihD66SG6kK0Xp6be/kwplDgcowaKfhvG4Ie1vikbOqhmOPWtO4kEYwnF/xJ1kC++Gz028A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=ndbBMoGA; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ndbBMoGA" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=9ktGGEV0C37oCivc4Q9II018U0zu2hrb0ie/kFzoCGs=; b=ndbBMoGA/DbAowjyyieCFpiiNJ q0BcQZlMfXGWEB3/Z0uBcLebWCNt5XE3koz+Jfho0j8ybqu28vHi2WMkwQjvKpWDuGiDxuseGTesV ix3QzfFGgVO++BL+axUDGi8K077bpLETehdJMeCYWlVTSIeXxvYkpRNSzugARETj9bBlAQeZiVBwo fygpmuVA8EylVb7RbzkrVYZwMUFRhVLNvcw/eDerPA8KfabfCmtLZcUz76uSPBRMAvolt65e5VR// jOUgItK7i0u5CcaXF3RVoDOBpY6FL2AzXBfZFJINV2szwGkagVfecJBVSkbR7UzGv+eLOue5tfDT5 S5M/WzDA==; Received: from 77-249-17-89.cable.dynamic.v4.ziggo.nl ([77.249.17.89] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tXKFI-00000000k9N-2vhH; Mon, 13 Jan 2025 13:12:44 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id A586830057A; Mon, 13 Jan 2025 14:12:43 +0100 (CET) Date: Mon, 13 Jan 2025 14:12:43 +0100 From: Peter Zijlstra To: Maria Yu Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Ingo Molnar , linux-kernel@vger.kernel.org, kernel@quicinc.com Subject: Re: [PATCH] sched: Use printk_deferred_once() instead of WARN_ONCE() Message-ID: <20250113131243.GA8362@noisy.programming.kicks-ass.net> References: <20241227-sched-use-printk_deferred_once-v1-1-5da85cb38da2@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241227-sched-use-printk_deferred_once-v1-1-5da85cb38da2@quicinc.com> On Fri, Dec 27, 2024 at 05:27:10PM +0800, Maria Yu wrote: > A deadlock is observed when WARN_ONCE() uses printk() inside the scheduler > logic. printk_deferred_once() is a WARN_ONCE() similar special printk > facility for the scheduler to avoid unnecessary deadlocks. No, problem is with printk. Using delayed will make it so that you'll never see the output if it dies. Only use delayed for printk()s that are expected and non fatal.