Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2906805pxk; Mon, 28 Sep 2020 03:28:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwC8MnOJPCBsdylSFUygDCaVhAbYP1QHlDCqVGW3nE74uT4Km/xIOfEce9TkWvGoTzAXr0 X-Received: by 2002:aa7:dc0e:: with SMTP id b14mr923700edu.17.1601288905476; Mon, 28 Sep 2020 03:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601288905; cv=none; d=google.com; s=arc-20160816; b=HsxQfXBxA85uI1Bo0dElfgU58B47CjxD1ZhBsQ7uKyt9wOysHFiz1ZPgw5Olrt++3X mUflMPtWUZENFgdV9YZfF5bJkzcKLi0GcaMAPkKfaXU/vQY+8zrsBB8BRiGq8bnakFl2 PgR+BOqMNS0ncn9Fl7ZDTkK2Ag0YLykv2PlPQVvbHNh1Iml+wZIn7KvkkatUsnj2nuZh RtbMom/bLL2gsaOEJHtdKvddtGXvKVJYXIZVDR1e6PASwCkb0eDrAQk4Kfjj+3cIKBu8 rVUOeYfc0ikZBvGuEg77AEeGg5vyIylLpQmNDDFkUDzi32lHUly9Y45Y0s/cbpbtzRf/ uk1Q== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Vc5TPB8gzwYQ4bV3QPrFgoBi6Jlg1QoC2FUYpd7zyDo=; b=pyi0B892QtFs/s0tOKhaN6KfMiqrxSI/c3JbkBRT08jzgeuV5B+dzYLTs14hc5XFuF s4HjFP7KXdOvWOlPI2Jb1HX9P3cVqfzwaedUWSrBCy3Sa2HqkOrzQ2/KmYLE4oIwUrlc +NwnPrhuZm4NUohdu4zZ9uMoppgrgrCIlwjWNHWlAKrO05y06u/ZyeOY4577wsluVVQD 3YFnoTr3pd3Q4cXS4EpzPGK3wxoaJikOZHtWRXq+PjzxUbPULo53S3xtWf3i/oUyNIaO 6yAVbllUYt7+2gHIxD/y83gFi5TiA+7ofEkMsvYo0To8YJaaM0+XZRG0gUBAmJe3d1Y9 oObg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=tcB2Ty+l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp19si329700ejc.122.2020.09.28.03.28.02; Mon, 28 Sep 2020 03:28:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=tcB2Ty+l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726629AbgI1K0f (ORCPT + 99 others); Mon, 28 Sep 2020 06:26:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726500AbgI1K0f (ORCPT ); Mon, 28 Sep 2020 06:26:35 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A0A5C061755 for ; Mon, 28 Sep 2020 03:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=Vc5TPB8gzwYQ4bV3QPrFgoBi6Jlg1QoC2FUYpd7zyDo=; b=tcB2Ty+lP6MFCVih7DRU4PWnRS Aj3y4brI3ONLGXo3KFO88/n8Xd23Dme6MEQTMnJF+wZVw1d4XFzWhSNiM4eERDWiEkKK2vbdXV/Gn AUkrBfUJLW+EIoiPhBVPObIzyxGdaovissYnz9d3+yufRgPfCwqCyPvOWSl4b/J7w3x3K9IkNxdw2 UuRtIEJTNpHdYg1pIe73yAEFhIq7OLQ9YcGfOJrLT0z7cfSrkepMEznzHXUcLlF3w/gLYyXgUmpz2 4tk/HelTC06z3gm8jpz+9WGXLTpCrhpMCCazb98TqwREF2iWG+LGbaU89/w8Y5oe7oLUIw5aapLIG x8+munNA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kMqM5-0005Mm-GJ; Mon, 28 Sep 2020 10:26:02 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 9002A300DB4; Mon, 28 Sep 2020 12:25:59 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6B41E2006F633; Mon, 28 Sep 2020 12:25:59 +0200 (CEST) Date: Mon, 28 Sep 2020 12:25:59 +0200 From: Peter Zijlstra To: Chengming Zhou Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, pmladek@suse.com, sergey.senozhatsky@gmail.com, rostedt@goodmis.org, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, songmuchun@bytedance.com, john.ogness@linutronix.de Subject: Re: [External] Re: [PATCH 2/2] sched: mark PRINTK_DEFERRED_CONTEXT_MASK in __schedule() Message-ID: <20200928102559.GF2611@hirez.programming.kicks-ass.net> References: <20200927161130.33172-1-zhouchengming@bytedance.com> <20200927161130.33172-2-zhouchengming@bytedance.com> <20200928073202.GA2611@hirez.programming.kicks-ass.net> <40ab934e-5b8b-735b-da65-3043efab9fdc@bytedance.com> <20200928090143.GA2628@hirez.programming.kicks-ass.net> <688eadd7-4ca3-3e32-3520-25977ff059a6@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <688eadd7-4ca3-3e32-3520-25977ff059a6@bytedance.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 28, 2020 at 06:04:23PM +0800, Chengming Zhou wrote: > Well, you are lucky. So it's a problem in our printk implementation. Not lucky; I just kicked it in the groin really hard: git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git debug/experimental > The deadlock path is: > > printk > ? vprintk_emit > ??? console_unlock > ? ? ? vt_console_print > ? ? ? ? hide_cursor > ? ? ? ? ? bit_cursor > ? ? ? ? ? ? soft_cursor > ? ? ? ? ? ? ? queue_work_on > ? ? ? ? ? ? ? ? __queue_work > ? ? ? ? ? ? ? ? ? try_to_wake_up > ? ? ? ? ? ? ? ? ? ? _raw_spin_lock > ? ? ? ? ? ? ? ? ? ? ? native_queued_spin_lock_slowpath > > Looks like it's introduced by this commit: > > eaa434defaca1781fb2932c685289b610aeb8b4b > > "drm/fb-helper: Add fb_deferred_io support" Oh gawd, yeah, all the !serial consoles are utter batshit. Please look at John's last printk rewrite, IIRC it farms all that off to a kernel thread instead of doing it from the printk() caller's context. I'm not sure where he hides his latests patches, but I'm sure he'll be more than happy to tell you.