Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1619784rdb; Thu, 7 Dec 2023 04:36:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHI8PW8Q6ZQvIpDXMeVT3sIx1WRaNCuP7Sf/fKIs2IrLhOPmtF+vGLG7W0nzNC+NYFKNdNE X-Received: by 2002:a17:902:8209:b0:1d0:9b2d:566b with SMTP id x9-20020a170902820900b001d09b2d566bmr1761772pln.6.1701952579528; Thu, 07 Dec 2023 04:36:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701952579; cv=none; d=google.com; s=arc-20160816; b=SfkvfSJoG9HsOiyoqcsCHs85N1EVuTmXPNaR3JGmje95qWVAg7TiTOjPuAOeIyesmO 3LlIAV0GsLkyQjY6ThQlVoazCbOpDuw7cPyWOoC7xw85+vQGSxW+EGTvhp7WG1TO9SnJ lwu6UorTfZ2ak8ZAuofkyNTZHapg/d+SqjMs0rDYaGJDl5swW56tOMoLVIpQanqqAZ9G wKUNavmsu4kteRdNBwf+hdgUFNMew5fAj6a/xkB26EwahVYdniRJQsvnpbZeoBVf93sr pseZLlYlaQQ1eEQamcvjL01UoCTPyzTrNcyX6SjYoR9NPNOy924hHPVSRAih5veouIKR JUkQ== 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=Zk/qNVDXNPkzhq+BDiIPBpzhkIjj00RW4XeHZN0fz8s=; fh=ujdcrblL7pwDY5wvfGNm1DgEnYadAAW8zKvIiemKBz4=; b=tnlAF1tO8y80ybdb9f5Xqv6+OIGENanOGQ7FJFkGWdxw1CyxaeJCQHnsrQ0VKxsHEC QqtXFAYqBmBVHED1TAMS//Jt00k380TR7HeTmIVVHTbYWEUnxeIKdfTQX0U3f/eGRIeh WDCdaguKR9r0bdKCqNc63sgJxyZcysVKr2tV+MxLsr28YyWp6H672QW9lllvPiOUvhUo sPH7rpa8JwsBhYSijxIs3eu37qJfSyhv57x1xVrZAuLTjA3GGbRunBZg4lVce2K1wmZA 9A7Et3vmOec8s+tOFP/4ZR1O//qc8nhIxrZmFqdO+JQf1p2QxkWpxieY8I0U1A72xvk2 Twdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=LzxLFDf1; 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 Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id m8-20020a170902bb8800b001d07ebef61csi1044483pls.502.2023.12.07.04.36.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 04:36:19 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=LzxLFDf1; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E77958079C8D; Thu, 7 Dec 2023 04:36:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232583AbjLGMgB (ORCPT + 99 others); Thu, 7 Dec 2023 07:36:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379442AbjLGMfx (ORCPT ); Thu, 7 Dec 2023 07:35:53 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B94A10C9; Thu, 7 Dec 2023 04:35:57 -0800 (PST) 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=Zk/qNVDXNPkzhq+BDiIPBpzhkIjj00RW4XeHZN0fz8s=; b=LzxLFDf1Ey6ie1bZazQ5sel0KV bgSBvaaz1ZqfoFMLihKPgNbhOsndwdBKVK0VdI7qD6BwzXPQ0b4s1GF6jLRCKwSnG8bTX68Q7nf0N Q7blMk18QpO0l3J5NH1QweC19J/dL6wHju4WJ9349VJybv+XZF00MDRdtwDu/EzOPNZYhFTa59Ckb lzyrfvECe46mwwZQuFwqv86BrInyJ+6kwzMRhOOeie3tMv6/dwdMcwoniZJ1Q/o6x4rD53ua0ADL0 dFBNy3Rti+i4YVcZNliXIMSt/q6oUcVjD20aXa3/gXPd6LtIwazv520naVxE7HfTHT4H8bt46Cory JVcfAU/Q==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1rBDbW-003t2L-LG; Thu, 07 Dec 2023 12:35:46 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id B38DE300338; Thu, 7 Dec 2023 13:35:45 +0100 (CET) Date: Thu, 7 Dec 2023 13:35:45 +0100 From: Peter Zijlstra To: Xiaolei Wang Cc: rafael@kernel.org, pavel@ucw.cz, len.brown@intel.com, mingo@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] freezer,sched: Move state information judgment outside task_call_func Message-ID: <20231207123545.GB36716@noisy.programming.kicks-ass.net> References: <20231207111634.667057-1-xiaolei.wang@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231207111634.667057-1-xiaolei.wang@windriver.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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]); Thu, 07 Dec 2023 04:36:17 -0800 (PST) On Thu, Dec 07, 2023 at 07:16:34PM +0800, Xiaolei Wang wrote: > It is dangerous to output warnings in task_call_func, > which may lead to the risk of deadlock. task_call_func > uses p->pi_lock, and the serial port output may call > try_to_wake_up to wake up the write buff, which also > uses p->pi_lock. No, we're not going to make the code ugly because printk is stupid. Fix whatever that triggers the WARN and leave it at that.