Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp713333ybb; Thu, 28 Mar 2019 10:40:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwe6ZFa+O/1xnJ1IUtzgdUFLsiL518lmp2v+G5/h4UY8j6IRq7rsee0B7XqeP8fm6UsoAkH X-Received: by 2002:a17:902:9a4c:: with SMTP id x12mr44107267plv.157.1553794817634; Thu, 28 Mar 2019 10:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553794817; cv=none; d=google.com; s=arc-20160816; b=dL/wlMgnj87Z+Dv/tlYf9TOD9PfAHOj8M1/9tatejuktsuMyd5wUrmkakxRFlZcJLS UGzzjHHC6UlM4pzs/Ce/KhwtZFQMSk8cdfvI0TPaBFtPM8yXwhNbwrUBO2DMtX2vwMJ6 lMwZI4ZrqIDK3aij828LeNFZbBPG0UW4mnA4L3ypSA8Vw3aJ+a2c2lKiRcsyNOVAK5C0 UwhHLs0oxJ02wKdko+qqacjdXpzqrqwNVzlxrs3dKgRmjOlkBxPeHNxYefCf/cEciifT 9JPUaENBVZpIoIdGzEeifPyGzEiUIwvtI4d2X6mV1+mbWIMkJR+2fqcKslz2YE3PKGsU xkFA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=WA2S9xV3neu08zaJX66d+EtoRN/TDmN6kWeMyEgQn6w=; b=KnavVyUsRdDHp2/kCsbGmjVPMHqVyZjrd93jD6mCwdaW6O55X4WRmM2mf+C508deZK y05sIyqpPN6aKYqRhH2u9MpqtL2RxnEHxrMESQSc024TsHY0rYlmCB6p2Wqe0jwRMtZh mHOomhMgc03DOAQWKfR4tIB9bUM8XYB31k8K4MiD81achw9Zm8zfxekHnp1TPlNfg7eG hG2ZFe6mbvFX6BDHlFzy5sRJADKdhVLCmqYsFHxFUOXHOH2sCLF7jUjAzlA/Mt+ZSxHD FUX7mdmtz/cFviS7mzh6tDaqFA+A9HTdrjxYPqMli/882Y9I54evSXDmu3BpQ+kcEQ9j qwlw== 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 d14si15100482pgb.26.2019.03.28.10.40.01; Thu, 28 Mar 2019 10:40: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 S1727028AbfC1RjI convert rfc822-to-8bit (ORCPT + 99 others); Thu, 28 Mar 2019 13:39:08 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53721 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbfC1RjG (ORCPT ); Thu, 28 Mar 2019 13:39:06 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1h9YzT-00072K-6b; Thu, 28 Mar 2019 18:38:59 +0100 Date: Thu, 28 Mar 2019 18:38:59 +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: <20190328173858.hpbtoep42ucomav2@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> <20190318114017.tazjaegln2obt3zg@linutronix.de> <597B109EC20B76429F71A8A97770610D12A649C1@ALA-MBD.corp.ad.wrs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <597B109EC20B76429F71A8A97770610D12A649C1@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 11:48:28 [+0000], Liu, Yongxin wrote: > > > > > Bummer. That would dead lock indeed. > > Is it easily possible to recognize the recursive case? > > Not easily. I don't have test case for recursive call. > For now, just code analysis. So I've been playing with qemu's nvdimm device. So I *think* the recursive case is here not possible because qemu only supports pmem while it would require the blk mode to trigger it. It is just a wild guess… On top of qemu's nvdimm device I can create a block device via ndctl create-namespace namespace0.0 --mode=sector and then I trigger the code path in question. I would *really* prefer to understand the recursive case and avoid it. That way the recursive case is explicitly known and uses another path. The lock can then be always acquired which gives you always lockdep coverage (which is now missing unless you have more LANEs than CPUs). The local_lock thingy is completely unneeded: a simple get_cpu_light() would do the job. > Yongxin Sebastian