Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2842918pxk; Mon, 28 Sep 2020 01:10:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY31aP9YXoNYJ/1K5Gcmb179ZRKaGDKxHFuZypC/DU4dnB7GgyUPvniweCEXT8OaE3tHkN X-Received: by 2002:a50:cd5d:: with SMTP id d29mr432272edj.318.1601280614633; Mon, 28 Sep 2020 01:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601280614; cv=none; d=google.com; s=arc-20160816; b=qCghu/4nFi8qfJivxgabJ4Y+r3Nx6Po1NrhSvAqzEOsQ+BOzcDCEJbEtSQU0FZI+mm syurzChVhDIfEsVgX4/2MosBjNGw5u0TDYfxgdP9qCV+jyb/WxmUpnZ9VgogB5x6m2Ba cTRF1o9xirB4/AsU4aJN4t7kHdxVlxiRsmNO0WWTrOCf350y8U40BjbGt+WLHLWBIQvN HVGLfy0Kgj+J6yd9wyV+3zDjdgCiEtXcEZKPLw9j2dyd8Ews/j0dyomErhUlmTy4EFcQ Ock8KM++zOm1vhxN3JwT/BgUce/oJF1hQ0tZs+ODi1mcyoQwBocPFvFGy8BQ22AEkadg A2ng== 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=nSb+Zj16S/95FquhSwPKCI8PgeOwt43+2Fh6BPMBmGY=; b=EPOsYhG6ptFKuJaQyMNR7IszY7v/Xvf64yric7S1pF6+Aq5zu24udMOzIZnlQ3btN4 shWu7MoEXGtg+/x1BbjrMsgpnJL2Ovo3UE1RjtMmXJkPubgnsE+smjWkkSNZRvyuGMde Fs8Ik6vWs/CYs0N14ZsaL92Bf2sR3kOqD9ui2fIJzyhmMMc2Z43a1GzcjK/AdkW6iLqs pLfRGx02OZxS4Hx7lMlIJAnZg4GqdO7WBxEGZ+kWgHxFRpfSAbCvVITDJQfxzTOrZEGY go2Q9MmoFSrtX8Vr2u4ljAxKJNlYPa+h91WH9g+VNLeAALbhOx44Ir8GuZWBhOMtr3I5 H/wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=CLA0jGvl; 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 cf25si175898ejb.67.2020.09.28.01.09.52; Mon, 28 Sep 2020 01:10:14 -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=merlin.20170209 header.b=CLA0jGvl; 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 S1726583AbgI1IGb (ORCPT + 99 others); Mon, 28 Sep 2020 04:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726500AbgI1IGa (ORCPT ); Mon, 28 Sep 2020 04:06:30 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A21E5C0613CE for ; Mon, 28 Sep 2020 01:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=nSb+Zj16S/95FquhSwPKCI8PgeOwt43+2Fh6BPMBmGY=; b=CLA0jGvlYBclgRTcwwuxVFFBgn AfbbKySnhTOmpEUZyMMAXItCD6H6/45h94bicfeJ1PrRm+JUuOMfyH/IROHwZZyfWpXx7DQVqZdD9 ZSioSKOUr+JcD1JbXY3o1SCcuEVFmACh0WDjSF/fHd5rDFfB/3veji9cJk7dEkS0q/BJM4MCz171A n/FOGLdbIXzJiL92DN4RC8Agp86fqImQOtOI3NcaZukH5CYndYm4/vO0bLKzSXyMiJ0bRMYIkpRQJ Ggbuy84EDRWa/ah0qPMDiIHXtGw7rmFawYCGeSIYSTAlXP2Fl4uiBwgNnArm/WXzj4YN7nSEbkleI VI1hGdLA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kMoAp-0002BI-3z; Mon, 28 Sep 2020 08:06:15 +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 BA292302753; Mon, 28 Sep 2020 10:06:13 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9D0A7200D90B3; Mon, 28 Sep 2020 10:06:13 +0200 (CEST) Date: Mon, 28 Sep 2020 10:06:13 +0200 From: Peter Zijlstra To: Joe Perches Cc: Chengming Zhou , 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 Subject: Re: [PATCH 2/2] sched: mark PRINTK_DEFERRED_CONTEXT_MASK in __schedule() Message-ID: <20200928080613.GB2651@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> <0e8e87e25c90339fe790252626855cbb47bc2c08.camel@perches.com> <20200928080022.GD2611@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200928080022.GD2611@hirez.programming.kicks-ass.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 28, 2020 at 10:00:22AM +0200, Peter Zijlstra wrote: > On Mon, Sep 28, 2020 at 12:52:44AM -0700, Joe Perches wrote: > > On Mon, 2020-09-28 at 09:32 +0200, Peter Zijlstra wrote: > > > On Mon, Sep 28, 2020 at 12:11:30AM +0800, Chengming Zhou wrote: > > > > The WARN_ON/WARN_ON_ONCE with rq lock held in __schedule() should be > > > > deferred by marking the PRINTK_DEFERRED_CONTEXT_MASK, or will cause > > > > deadlock on rq lock in the printk path. > > [] > > > NAK printk_deferred is an abomination, kill that. > > > > Didn't you introduce it? > > Should you be complaining to yourself? > > Yeah. I should've hacked around it then I suppose. Still, no reason to > proliferate that crap. Afaik the new printk should be able to deal with > this at some point. > > The thing we're not going to do it add a cache-miss to schedule just > because. Also, using deferred for WARN/BUG is fundamentally wrong, you want that splat _NOW_, there might not be a later.