Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp348409img; Mon, 18 Mar 2019 04:41:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/i0Wsm341E93L3iyr3CjbPYfzXNC/qYmRW+jDtLoLEniWN69Dbw/byRMXaDAuvTxRN85j X-Received: by 2002:a62:1187:: with SMTP id 7mr3033290pfr.119.1552909277631; Mon, 18 Mar 2019 04:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552909277; cv=none; d=google.com; s=arc-20160816; b=ubYu23+6uroNH4jQcNc22nJ6qTL4eQAvsXqyRJao45U+OdukRYUonxgQxt2itmYQo8 XOHnuLaJ0WcChtB6+NPpRHtNES2qgAv9dIPjiSULbjYMkbVPUa96OARFECEltCu+5lR2 F3fvuP9xoVmUbkE6YVpv9tlTmOvxh8zQuijjfWZ3lJrh1/0taReTjRrSZ8PHU2MJA+ip AbUu+UOKkmH3szT8Vpz08I5PyJh9OFijIjWITlvyt1vv10p3H3vRA+pMBP8b6F5iuOuI DxIJPoQ1G3zNq8ezwDW4ZFS8zFD+5M2lMJfFSIhM7Gf9+6O2pidemKPcSsehj3I1aIY/ hp5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=AhKBv1OJVumJxBGtLJaNyXs/u1l0t1CE8DE0yZcX0CI=; b=PMF5dxamX08IQp9mPChFRDWCl8zXMeURu+Jy0icE90LlNfgwJI29/gJg702knDPPom fK8CA17cKfXNGSEm/uz9eX9WU5CIh2NwbdzDfbEuhf9dV3QJPMfJPTeIvq27G3IR20Lj EH0Zw0zSoGB7bHU8G18F5sXsBFiERACgp3x1Aea+uiiGzfhYwFQrz8TS2EuUQtcPEnfO oQ6D2jSQ3LIdyQbX8gnYQK4Q3xjVxMmpK3MNEWOw3AyGexWo42D3VNImfAD3jvo91aDw mH/UyLzGk3vvJyN+NqeLlKUVhubXjJJCjM4Yhf/yimxtxhYUH4O21hingaYfb+rIGlvZ /kvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1si9518430plb.148.2019.03.18.04.41.02; Mon, 18 Mar 2019 04:41:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726860AbfCRLkZ (ORCPT + 99 others); Mon, 18 Mar 2019 07:40:25 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58423 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbfCRLkZ (ORCPT ); Mon, 18 Mar 2019 07:40:25 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1h5qcr-0004SO-Uf; Mon, 18 Mar 2019 12:40:18 +0100 Date: Mon, 18 Mar 2019 12:40:17 +0100 From: Sebastian Andrzej Siewior To: "Liu, Yongxin" Cc: "linux-kernel@vger.kernel.org" , "linux-rt-users@vger.kernel.org" , "tglx@linutronix.de" , "rostedt@goodmis.org" , "dan.j.williams@intel.com" , "pagupta@redhat.com" , "Gortmaker, Paul" , "linux-nvdimm@lists.01.org" Subject: Re: [PATCH RT] nvdimm: make lane acquirement RT aware Message-ID: <20190318114017.tazjaegln2obt3zg@linutronix.de> References: <20190306095709.23138-1-yongxin.liu@windriver.com> <20190307143344.ytsnbmot5tjzjhip@linutronix.de> <597B109EC20B76429F71A8A97770610D12A52669@ALA-MBD.corp.ad.wrs.com> <20190308094131.ge4wbsvz4p6xikdf@linutronix.de> <597B109EC20B76429F71A8A97770610D12A5643B@ALA-MBD.corp.ad.wrs.com> <20190315164236.rzbwe7reeprjv3um@linutronix.de> <597B109EC20B76429F71A8A97770610D12A63C81@ALA-MBD.corp.ad.wrs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <597B109EC20B76429F71A8A97770610D12A63C81@ALA-MBD.corp.ad.wrs.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-03-18 01:41:10 [+0000], Liu, Yongxin wrote: > > Consider the recursive call to nd_region_acquire_lane() in the following situation. > Will there be a dead lock? > > > Thread A Thread B > | | > | | > CPU 1 CPU 2 > | | > | | > get lock for Lane 1 get lock for Lane 2 > | | > | | > migrate to CPU 2 migrate to CPU 1 > | | > | | > wait lock for Lane 2 wait lock for Lane 1 > | | > | | > _____________________________ > | > dead lock ? Bummer. That would dead lock indeed. Is it easily possible to recognize the recursive case? > > Thanks, > Yognxin Sebastian