Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2942966rdb; Fri, 22 Sep 2023 12:48:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHtlKKSrotgRNu4XAtqG13FB6qOu1dRQP+0byz54HS6/hx794JsCAVf1lUCMe6jjILKdimw X-Received: by 2002:a05:6a20:f397:b0:14b:a3f8:1c17 with SMTP id qr23-20020a056a20f39700b0014ba3f81c17mr527211pzb.38.1695412115021; Fri, 22 Sep 2023 12:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695412115; cv=none; d=google.com; s=arc-20160816; b=ETHa+1PXha3eR2wcoT5uHQNzMQg3OxWaz8kIA/7wpqQrs+pj/4dVU6sJl7E/adACvr XRz+WD1W+drA+AiVthaYZTKVXQyjqZoh9IXh1i5vlGMb73kbNI+snUum8pkf9ppnmxnw o/0vkhWEkuSmhu36+m3Jh6VG4GkeutHijUA0pfL6lSX2xV4La6fvv80BqyrPkVfCQESC qE+sebJV54pSzBWJTvIbCovMT2NP+4MplS2jLeFB7KZe8wmnMz5PjRrHX+yUUT+4Vw2S ayqXPtKUKiwgLOodhVwbJAIpdVmO6PO4VvJ7nZZqi0MqzTMnCQRVeLCZZw31UUWHicHi KDFg== 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=FGDuEdnl3l5utwLCLWhQ/pexaLBdevadmo9pKsXaJrY=; fh=XVXvb7KyL1tQXHQ9nkbZk30NdqldymlHMWLwt3O3xII=; b=jMNL1uoLe7XSObily0Xrv5Zr8G7p3hhLKrv04ny8AdoKoZD4OH68v1V8rBU8fjkU65 SovV25cYK5Py0HPPTC1oTbj47qSCFwMGn1BK4vxmXdHmJk60ro52RliIjIY5LR3u1b17 p1QlK9iIXd9B0wI/O/jVVVWF5qHaWJ8QX2Nh//+GwWu1pWnElTz3Qjp8WRKyVs+Yqork fRON9/JmbYz2LXR7ZqNIBuOs+2Mnpx5LuP/5g04uR78diiWpa7jhe+7Iw499ChWzK9kW D6ZMJiLynEzYEtBUIaz2ecDHLfPwb74HKsbkES7ZOn0QRceawXPBez3DeEylBbtYYOoq 04CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=NU60oxKs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id l12-20020a170903244c00b001b801044467si4708329pls.3.2023.09.22.12.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 12:48:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=NU60oxKs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 77EF78258CB3; Fri, 22 Sep 2023 12:47:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229541AbjIVTrU (ORCPT + 99 others); Fri, 22 Sep 2023 15:47:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbjIVTrS (ORCPT ); Fri, 22 Sep 2023 15:47:18 -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 78752AC for ; Fri, 22 Sep 2023 12:47:12 -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=FGDuEdnl3l5utwLCLWhQ/pexaLBdevadmo9pKsXaJrY=; b=NU60oxKs5eFsUgnwNlpvYi7ubt 2h73DuZ2PLfTZPKNim0BCD4q3jv+DSjLIPH6MR8FYPJisgz8PJyE4BAJBrwj7faJW5CGsJiCr0p3j w3oCLa3vwXdq/m1sgdeQknBDxQC63J0wXS8GbKiEVM/ay8fnbKPY9ix2n8agNOGfsPmbXJowIxrqe +UOfbe1BO5WxxelvwwSNrZMiFPP52dxlx4hMkNU37WXlmD7xi18wjKlyGY9H/u9rm8cSWyQQmD9JW afCbszdKJxLH73+GySe5Uv00TwEQAuQRCDqJTtvRiYj/7BTMSRWYxCWJlzXWjvSAG+KFK1MqyG4sb C5JCUVyQ==; 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 1qjm7D-00GVno-2N; Fri, 22 Sep 2023 19:47:05 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 9883B30042E; Fri, 22 Sep 2023 21:47:04 +0200 (CEST) Date: Fri, 22 Sep 2023 21:47:04 +0200 From: Peter Zijlstra To: Waiman Long Cc: Ingo Molnar , Will Deacon , Boqun Feng , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] locking/semaphore: Use wake_q to wake up processes outside lock critical section Message-ID: <20230922194704.GA40277@noisy.programming.kicks-ass.net> References: <20220909192848.963982-1-longman@redhat.com> <20230921074247.GC14803@noisy.programming.kicks-ass.net> <06163c13-03b2-bfe0-90b4-5267a039a02c@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06163c13-03b2-bfe0-90b4-5267a039a02c@redhat.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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 22 Sep 2023 12:47:22 -0700 (PDT) X-Spam-Level: ** On Fri, Sep 22, 2023 at 02:45:04PM -0400, Waiman Long wrote: > I believe early_printk should only be used in the non-SMP boot process. The > use of printk() is frequently used for debugging purpose and the insertion > of printk at some lock critical section can cause the lockdep splat to come > out obscuring the debugging process. By default early_printk is disabled somewhere early, but it has a keep argument to keep it around. Anyway, printk() as it exists today is wholly unsuited for debugging. There are too many contexts where it will flat out not work. When you use early_print with keep then you can use early_printk() instead of printk() to debug. Also, see the patches I pointed John at. Perf would not be what it is without those patches. Serial lines and early printk are not optional. That is, I flat out refuse to develop on machines without them.