From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2BF2CD68F9 for ; Tue, 10 Oct 2023 07:59:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442553AbjJJH74 (ORCPT ); Tue, 10 Oct 2023 03:59:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442536AbjJJH7w (ORCPT ); Tue, 10 Oct 2023 03:59:52 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF03E91 for ; Tue, 10 Oct 2023 00:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=2Nj9L8S16JaIWgV0JAYOYMZ2qHAOcfxJsWPV6+o/Mys=; b=kGlwxKji2C5uS5qN0p/dVyZYyb XTT0mzW7uw+v7QFq96bdgnXpnubJhSt/RQybxPcjYzRZEWhotvH15UGSIm26ibjuoUesnrVllpeB6 RV/pNpbuG/sfO79cnIj3u7ooxI5eaE2hwtqtVhBPTK9swDGmaPp92e9Bnx7eQKaXSscVGfLShOGTj jJpvLBuC7q64N0jVnQ9quQRnkuKrMltwCapc6U99KcMBoNHXpYvOKUOPklaBbz+e+z5+JXEg1mO0w taosobfGIUFw5wPjTxfajLw8L7Cl8HX4V72+zkrqpvFvpiABYnugB5qEk1mq/OUEotDSnOseuNWKW qooJF30Q==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qq7eJ-00GhCE-0V; Tue, 10 Oct 2023 07:59:30 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 45152300392; Tue, 10 Oct 2023 09:59:28 +0200 (CEST) Date: Tue, 10 Oct 2023 09:59:28 +0200 From: Peter Zijlstra To: Chen Yu Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Phil Auld , Biju Das , Marek Szyprowski , linux-kernel@vger.kernel.org, Tim Chen , Chen Yu Subject: Re: [PATCH] sched/fair: Use printk_deferred instead of printk in pick_eevdf() Message-ID: <20231010075928.GA377@noisy.programming.kicks-ass.net> References: <20231010032541.339606-1-yu.c.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010032541.339606-1-yu.c.chen@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 10, 2023 at 11:25:41AM +0800, Chen Yu wrote: > When no eligible entity is found in pick_eevdf(), it has to pick > the entity with smallest vruntime. This indicates a potential issue > and scheduler will print this error. > > However this printk could introduce possible circular locking issue > because when the code path reaches here with the rq lock held, the > printk could trigger further scheduling which loops back to the > scheduler. > > Use printk_deferred() to defer the console write from current context > to the irq work in the next tick. No.. I detest printk_deferred with a passion. This is effectively a WARN and we don't do silly buggers for them either.