Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp96653rdg; Tue, 10 Oct 2023 05:27:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfb/UTP1YYJe4T5lLX7SR6OEnHvGcDztMNQVX+xXkgg9GPBnQmV4B8QI4IEWPOreaxim9P X-Received: by 2002:a05:6a20:1585:b0:14c:84e6:1ab4 with SMTP id h5-20020a056a20158500b0014c84e61ab4mr17722225pzj.33.1696940847423; Tue, 10 Oct 2023 05:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696940847; cv=none; d=google.com; s=arc-20160816; b=ZqjuCPRfomsrYNk7/HeO6MMRBMJs6h20mujNG6Z8NP+dyY1yy9LhxOUxJf+jDiOqUi t9AsGQSA4Gp/l+QEEfxLh10+/YVAQc5fIObEPEWbGD3pRQRBkxUcYPzKxPwUA06lNkUX uaMH2P3NM0zLeHB1flFN7/uY4RlMzc9y9/2vrZ8pEQdr3CqsHvh+uTJSw8lFbeFAEOi7 LRouclsb2lSm4bl+ejuKeOo8QoObA+G3C70tLi5/4RAQQIZGcRplZfe3A3V6AIBUjB+L gs/sIFQEY9MCY5bCP2zLNu++i7zEuA1OccuWZMfnbm2H9BjCG+3uopxKtGt2m/O3Iqfl MvEA== 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=woj9XhL8JgSgE6+vruavLKNx3l7zR2+zaW86usKMxog=; fh=L++hz3HPl7V2lqjPmBwXmHzivafBucTwDwg5qvubEck=; b=EojvwtccfIdKl4XJMy1Hdb3Jd41siNE2sA3QxsOjmO2zgCw0l9TU4X5wMGLGd+z0nO GkAhJX/HgARhayp0qH8g+3p67f28utXNiW958lbpiEOI2gs9w4ADkTjg9tn73rRyFxFt WDRb5era7SX2AO2Nai12w/iXFaJOIb8fbelLd3GP2ntiiHZUFM6s/MnpXvv74A1UzGR/ UbJFwqnHY21rI6xeXGLOmjnVOtPGpHVDCsFFjmyOYHDS+y7J/9WYtzRIBcOv1LWk2Rq+ rNxI2qANZUn418DnvS8u16yypO4zgxR27moX++WT0pfKGeVKsJ25M/BAY3twj6v0fBBr lAdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YjTJClzL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id c12-20020a170902aa4c00b001c88fc3c5a1si570947plr.461.2023.10.10.05.27.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 05:27:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YjTJClzL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id EE3438075291; Tue, 10 Oct 2023 05:27:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231854AbjJJM1G (ORCPT + 99 others); Tue, 10 Oct 2023 08:27:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231462AbjJJM1F (ORCPT ); Tue, 10 Oct 2023 08:27:05 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37AA3E1 for ; Tue, 10 Oct 2023 05:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696940770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=woj9XhL8JgSgE6+vruavLKNx3l7zR2+zaW86usKMxog=; b=YjTJClzLKd8fTrdZ80oWPM1ASitQCczrN8Fq+aA29zAmynnwLa74rhQAsks+Y4O38tlp0l 7c7DPMOiGGP23bW1VuoZS71rcbfXhRpxXoia/o7Q7l83nCQDoOTOZIGAwZLKqBeEZz9lHk tpfDAflexK1hSW10AYzX41w8QN3aVS0= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-21-I4Uj0AoKNgWcPY_mO7i75w-1; Tue, 10 Oct 2023 08:26:04 -0400 X-MC-Unique: I4Uj0AoKNgWcPY_mO7i75w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3B0A41C09A42; Tue, 10 Oct 2023 12:26:04 +0000 (UTC) Received: from lorien.usersys.redhat.com (unknown [10.22.16.254]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3A78F9CC; Tue, 10 Oct 2023 12:26:03 +0000 (UTC) Date: Tue, 10 Oct 2023 08:26:00 -0400 From: Phil Auld To: Peter Zijlstra Cc: Chen Yu , Ingo Molnar , Juri Lelli , Vincent Guittot , 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: <20231010122600.GA477540@lorien.usersys.redhat.com> References: <20231010032541.339606-1-yu.c.chen@intel.com> <20231010075928.GA377@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010075928.GA377@noisy.programming.kicks-ass.net> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Tue, 10 Oct 2023 05:27:25 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 09:59:28AM +0200 Peter Zijlstra wrote: > 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. Chen: I was not actually suggesting you make this change, just answering your question about printk/rq lock. You don't need to put that line in there. > > No.. I detest printk_deferred with a passion. This is effectively a WARN > and we don't do silly buggers for them either. > Sure, printk_deferred is not ideal, but is getting this message in the right order worth locking up people's machines? Not sure you get the message at all when that happens. I have to dig the code location out of the crash dump to find which sched warning fired and took down the (usually virtual) machine. Cheers, Phil --