Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2353450rdb; Tue, 10 Oct 2023 01:00:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrPaJFX608/bHCm0cM1im409U5Ro93jnHSfZUtAVQBug0ZnxwTm2m+VcmiLWWClMSqcnCh X-Received: by 2002:a67:ebd3:0:b0:452:86db:8b22 with SMTP id y19-20020a67ebd3000000b0045286db8b22mr15827145vso.10.1696924810110; Tue, 10 Oct 2023 01:00:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696924810; cv=none; d=google.com; s=arc-20160816; b=d/eDqIw8EyciOXKtoxt2yWd6LUPAq5NQR3yLjUsLvzQH32hO2hFZBZ/BIX1G323Z24 AH+PiIL+IHS8INdT5KJDk8iw5HL73lLC+tWntJ7X+v/L8fY67ZePegrnhV9Iv+WKKFqB 0oiB1XjuXPK9nr3FtzQyfS8pLjLsgEYlIFF6MstRXpGQF1W5USeToxserah75gfFhnC0 oU4UzmGfc4rnBDUshDbn+rxbXyfGj/3KQ2lyeVzGRc/Z0DjVwA5H5sMJNeT2l7yghGM/ erm1RJlYfOw3wbYUGQWWJCsuHl/6Yk1WbU11w6bv4mBLhBOu7fmqIoh2aE32ADXBDnjw 8Cxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2Nj9L8S16JaIWgV0JAYOYMZ2qHAOcfxJsWPV6+o/Mys=; fh=dkyPozYlQWJT67BEqodkCQuVZKD/zoo3J33lQJRvOcY=; b=oxV12Y+IZneJmyM31aRUIHNVsfRVZoS2q9jOR+R2jR+8PDky8C+6nI/C3pnKNP32H+ G1yos2Y3rgejBbMQ9RRcw+pLLLTLb8vWOy3OS2He0UB/o3vFB8zEMgGMubM7NCP4riQE FcMmKcCtksIpScMztR5SSpV2ob2Uy3g/q1wVJIyJYeG3ql4jHMmZ1tLotsg+KlEMCITk mlV2/89yDpW+Cd1JCna7p9jZEOaJgrpSqkzu7CAgg4LFsziiKk7S4AK5viu1yc5pwfxH u0v6vqM/l2bPBemXwSd4/aXfocJO+kLeTzUdxLrLlYRMPjUrCPpgCp3WqdWDS/LMXtaR IYLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kGlwxKji; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id by9-20020a056a02058900b00584af3ee495si13129379pgb.623.2023.10.10.01.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 01:00:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kGlwxKji; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2E48682C2DB9; Tue, 10 Oct 2023 01:00:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442561AbjJJH7y (ORCPT + 99 others); Tue, 10 Oct 2023 03:59:54 -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> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 10 Oct 2023 01:00:05 -0700 (PDT) X-Spam-Level: ** 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.