Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2332534pxv; Sun, 11 Jul 2021 09:45:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDL2KTDyHQB1zREIO37tQj2mcEWIuILOkOw/xoNl0iktBur1qCNqXrpEMtqoMAHpuajlzU X-Received: by 2002:a05:6402:348c:: with SMTP id v12mr49557846edc.278.1626021914138; Sun, 11 Jul 2021 09:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626021914; cv=none; d=google.com; s=arc-20160816; b=Y0Ig1xP9SxBb8wOGHNLN6piOzICtomIn+9q6ccq3Ml1MeWIIxPt04JA/ZILz23JTUG 59U4m1BiMYk11TL4KNolAHXFv82x1EDk7xsZfHx7z0L55ZTYOalKPxy6p7kjUo3x4EIG XIuOXEroWp85bUA33L0BFqBQUmp6LcWNYYT7Wdyrny9GihH3CdS+G/o3PmySMn9BkzZF iKxzDt64bu9ffBjW1vgjyvzZ3Uk8Od41EsgkL/7hDYkMCov12z8UXPDgfQXK9E4jc8O4 xi51dtCooTVCLMQQxQCHUy1EvNyREf/fVuGCLy3Y9MhopKF54tj8HB86FCKDx7JqTpqD AomA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from:dkim-signature; bh=4H/aSCSDYFzuJZ4hm8xQrB/5Bg7sdnlywCKPCNdNXn4=; b=OHz6BUEeAk+h2dhTWMgbucAtdjrWtKY4a+946mGivTv7rbIXNwBh55cKfeKC27pijY dmyCvgu2ysjXA0z+Yy9+yXzZpmrnGZcsMH8BCNDiOrHkANTqFwEiZEHWBrif2yX8tPzj ZVMjR/7wjkyh2Ca1MfK5vRtZ+jkvcUhjNSRX694u2DdSJdhfWNVQ+gAebuVjaYFy54NL JHOfin8kG53BHmlJxefASHvRWyeDSC2lpiUAsAYvhbfsejpriCyAfTJs6qHN/ZvtoAgF gtyXE04RgUQtDZoLn5f9Bu6ifSujAXuJBFdjlssjg3+O+QtS1qwQJg2AiomIYOgCEjmf ojZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eqIh7hr6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dh6si14309178edb.138.2021.07.11.09.44.51; Sun, 11 Jul 2021 09:45: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=@redhat.com header.s=mimecast20190719 header.b=eqIh7hr6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232776AbhGKQqF (ORCPT + 99 others); Sun, 11 Jul 2021 12:46:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33948 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbhGKQqE (ORCPT ); Sun, 11 Jul 2021 12:46:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626021797; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4H/aSCSDYFzuJZ4hm8xQrB/5Bg7sdnlywCKPCNdNXn4=; b=eqIh7hr6qbhR4ji5Tp0y1Pr3MxglLFQ+ofl3qbPKKrNb5KGZAF5WbnZ51iHJ/XyrHeb63O +vSD9cCoIiy3FAnNAdjXjEAo+LdEhCPx8FlvEqBhzwi30kb/yZER1oKQQ9fAzjWFPGV0qn 2UP9kKuGWdUtocTycvHH5FPwTCM9vFk= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-251-WU-LNO7fNOqPrYOpdplOEQ-1; Sun, 11 Jul 2021 12:43:13 -0400 X-MC-Unique: WU-LNO7fNOqPrYOpdplOEQ-1 Received: by mail-qt1-f198.google.com with SMTP id t21-20020a05622a1495b02901e65f85117bso6169024qtx.18 for ; Sun, 11 Jul 2021 09:43:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=4H/aSCSDYFzuJZ4hm8xQrB/5Bg7sdnlywCKPCNdNXn4=; b=YCMSkuMnupFuFii+QXB6FwJ8a1C4ph/xToyGPw8gDjn9L7/V/hSwyzAsadSgyh0O2T NfSHE36hre1ZwsllcmWf2VCXMFqsJjRr/9uiCTIE87UGXqAAEnzfdMvvLribhjUfFT/T eyMbhqwODfri3CcQtsPcXuecv5UNqqjDznWbNr+qYKFrCYodjL5C3D1LvwsqgnsN0/fF gyRZuVdoanMErYp6gPRsTpP73Sdd/KkBt09DnJ9Osz4TNc9VenO7Ts7Ob/qTThpId1CI QgiLufVvP0fulEAtKPkM1DZrBlUwNNLyIAmsxT3Iwgq5b3QBvYmyMF7167giDQQVJ85Q HGbQ== X-Gm-Message-State: AOAM531eCMDypPzWe03JsnCesXZHLENc2FugxaF+nnVNorqiRDYtWXxz 0V389ugHkUuJuebhdc4s1OwMjmwWGdg40aNz0I0lpocr0AbGyYb05zEusB6AJ8iNb4fnkeepdZV jKiaOwJQG1zCupCslxeYCmq/Q X-Received: by 2002:a37:b6c1:: with SMTP id g184mr48253651qkf.270.1626021793255; Sun, 11 Jul 2021 09:43:13 -0700 (PDT) X-Received: by 2002:a37:b6c1:: with SMTP id g184mr48253632qkf.270.1626021793096; Sun, 11 Jul 2021 09:43:13 -0700 (PDT) Received: from llong.remote.csb ([2601:191:8500:76c0::cdbc]) by smtp.gmail.com with ESMTPSA id 71sm4651827qtc.97.2021.07.11.09.43.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 11 Jul 2021 09:43:12 -0700 (PDT) From: Waiman Long X-Google-Original-From: Waiman Long Subject: Re: [RFC PATCH v1 1/3] locking/lockdep: Fix false warning of check_wait_context() To: Xiongwei Song , peterz@infradead.org, mingo@redhat.com, will@kernel.org, boqun.feng@gmail.com Cc: linux-kernel@vger.kernel.org, Xiongwei Song References: <20210711141430.896595-1-sxwjean@me.com> Message-ID: <07878d21-fa4d-fbf5-a292-b71c48847a5e@redhat.com> Date: Sun, 11 Jul 2021 12:43:11 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210711141430.896595-1-sxwjean@me.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/11/21 10:14 AM, Xiongwei Song wrote: > From: Xiongwei Song > > We now always get a "Invalid wait context" warning with > CONFIG_PROVE_RAW_LOCK_NESTING=y, see the full warning below: > > [ 0.705900] ============================= > [ 0.706002] [ BUG: Invalid wait context ] > [ 0.706180] 5.13.0+ #4 Not tainted > [ 0.706349] ----------------------------- I believe the purpose of CONFIG_PROVE_RAW_LOCK_NESTING is experimental and it is turned off by default. Turning it on can cause problem as shown in your lockdep splat. Limiting it to just PREEMPT_RT will defeat its purpose to find potential spinlock nesting problem in non-PREEMPT_RT kernel. The point is to fix the issue found, not hiding it from appearing. Cheers, Longman