Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp294198pxf; Wed, 17 Mar 2021 23:40:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvG/k7Q4sKyXbalEuX0AScuB/IdHGGTX+7Xyd9J3CSWsYmYbch4sYjdu5oTmbvAPA4+otf X-Received: by 2002:a17:906:4801:: with SMTP id w1mr17650430ejq.475.1616049641200; Wed, 17 Mar 2021 23:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616049641; cv=none; d=google.com; s=arc-20160816; b=oUtt7j1mCpok1HJ+vsfRiDfscwTvtOBfZW/+4hLeySU/+2GDL3VlKU8EbsWOZ9kL9G QEXBFr77b3oPaPx4vkBtLp6Owad3OE/TNST8Dimeq117S9BlbGuVGpfvyKrR1fUSW5N0 4aJROTA/rRDc/viOS8D6B1RPyByvQq/5etA9LK/hhZgFKU2qW0HCBXZ6ZmEWVeotIddi KqUC5HT2KQdYeKYKje8wjb0aaJ2aWEacmER32mKPH9BG6Ga/8FlULXbCRS9aRAIMm/Lb bcz9vOmNkAHQe9vyHojtVNhWsEEndWsTxeS9mGv9u9lD2pudmNZl0oPDIxXZwEKu5cLk T34g== 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=9KK3pAd1KRV0ESCKYhHZQ3UsogiNm22NnlLa5ysW8Fk=; b=n4G4vWptNGnUneuxizXcw3wC+j2Vz165EL8RaRRRgj8m8AJRQ/DgDglGHdcDsjtr3c qDrWjhP/lEYacrfu2E05Hwm9khscCHaRUc6rnkNKhh6vq0oX6v9WiqTgR8nbO2pJtu3U /4jxwi4OKeLV+comd4A3Pcx0sm3/WcqYEFMI1kGu9zVzf8pbQbMGwvMk1e9MKFpdL/Tk qzJCNppkITTFTU/sMeoIKe043Tb6JzGqWlIC3QDMisjYC+3Mu1mHM6j+tNLe1tNgTraG iYONYIJe5KNO3c8OFIjjYIFXpI+SJXalF496j9Mt5rvfHUIW/lIOsxPGEfoOEagSua5k Nr8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Bml1qeMG; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qo14si912408ejb.675.2021.03.17.23.40.18; Wed, 17 Mar 2021 23:40:41 -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=@gmail.com header.s=20161025 header.b=Bml1qeMG; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbhCRGhO (ORCPT + 99 others); Thu, 18 Mar 2021 02:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbhCRGhM (ORCPT ); Thu, 18 Mar 2021 02:37:12 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09E16C06174A for ; Wed, 17 Mar 2021 23:37:12 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id n79so1014407qke.3 for ; Wed, 17 Mar 2021 23:37:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9KK3pAd1KRV0ESCKYhHZQ3UsogiNm22NnlLa5ysW8Fk=; b=Bml1qeMGnM436VljGcsX17E687Um5S+FY/d+TZjF0gr8yg6Keka5wOo/q3Bm7zHn9a z8M6dVTBrrfYp+VXF1p/E2o9KrDmidizedBRjoa04Q0OP/jszlGVdgHFowkfmWV0iAVk mzvzFNtvh0AY4rHqfheXdjgrERQFdRpwaTkVc8YePrUt82GK1DEVYxSlsiCH5f7N4VMQ sN7P/jZlp7XnCfRd1dJpRsfHcCTewusqNBzO/tq2F6l58A3HU18U/BIplhqWRtynumQf m0IblVT+6Omd1LRRa5lxSNAQVHe6bQv/G+UjnRjnpmXKDHGTnpsHdy5i1fqtHkazyz1R 6Aig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9KK3pAd1KRV0ESCKYhHZQ3UsogiNm22NnlLa5ysW8Fk=; b=kMmyZI2ohwm/lSTq2+oJ44oO+rf56kskTlJa6btHyOJCRCwVBdMh1jqrHqb0h7ETcI LTa3ako21fFv8/ifFJYCUBraexzsY77z9TorwjvO7D9LRzDWUogDb8Hl/WeCVdnzl4mO niXAiYixvYTRmKELPjaEOt6KNGf+ynF5qyj+RXBcgqal1AlyvN+WQjGxw3s26xtwdvZI lQnJUrb/6Cba6eJhjjRLf+qh5l6y940/L6rWOz6pZZfCsPtmss5xmPFoOBIeJRY0GA16 GZQo1ahmZkrD3bjnLKb2HQsTJOdBYMRWtb3XWcLzNzgyJq05Bii2dij6Yg6Vqu7ghiLN M4ig== X-Gm-Message-State: AOAM5323TJ1UqRtOJtm4mjbP3vPBw4ifkj31kkkYKPD3JLkuBGYOE+wX 77q5wvdLjcPoRLmHMEHAiFQ= X-Received: by 2002:ae9:f818:: with SMTP id x24mr2896505qkh.101.1616049431145; Wed, 17 Mar 2021 23:37:11 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id g7sm828004qti.20.2021.03.17.23.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 23:37:10 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id E6E4027C0054; Thu, 18 Mar 2021 02:37:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 18 Mar 2021 02:37:09 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefhedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhquhhn ucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrth htvghrnhepvdelieegudfggeevjefhjeevueevieetjeeikedvgfejfeduheefhffggedv geejnecukfhppedufedurddutdejrddurddvheegnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepsghoqhhunhdomhgvshhmthhprghuthhhphgv rhhsohhnrghlihhthidqieelvdeghedtieegqddujeejkeehheehvddqsghoqhhunhdrfh gvnhhgpeepghhmrghilhdrtghomhesfhhigihmvgdrnhgrmhgv X-ME-Proxy: Received: from localhost (unknown [131.107.1.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 7E08F24005A; Thu, 18 Mar 2021 02:37:08 -0400 (EDT) Date: Thu, 18 Mar 2021 14:36:50 +0800 From: Boqun Feng To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , "Paul E. McKenney" , Davidlohr Bueso , linux-kernel@vger.kernel.org, Juri Lelli Subject: Re: [PATCH 3/4] locking/ww_mutex: Treat ww_mutex_lock() like a trylock Message-ID: References: <20210316153119.13802-1-longman@redhat.com> <20210316153119.13802-4-longman@redhat.com> <64af1d7b-6720-0ac1-4a55-bb0acb642c6f@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <64af1d7b-6720-0ac1-4a55-bb0acb642c6f@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 17, 2021 at 10:54:17PM -0400, Waiman Long wrote: > On 3/17/21 10:24 PM, Boqun Feng wrote: > > Hi Waiman, > > > > Just a question out of curiosity: how does this problem hide so long? > > ;-) Because IIUC, both locktorture and ww_mutex_lock have been there for > > a while, so why didn't we spot this earlier? > > > > I ask just to make sure we don't introduce the problem because of some > > subtle problems in lock(dep). > > > You have to explicitly specify ww_mutex in the locktorture module parameter > to run the test. ww_mutex is usually not the intended target of testing as > there aren't that many places that use it. Even if someone run it, it > probably is not on a debug kernel. > > Our QA people try to run locktorture on ww_mutex and discover that. > Got it. Thanks ;-) Regards, Boqun > Cheers, > Longman >