Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5043648imb; Thu, 7 Mar 2019 06:35:00 -0800 (PST) X-Google-Smtp-Source: APXvYqw72GDtW1gQjBxjf/eFQNNwOdx0ZLXopvF5GD0WF4iWAt5GSBRcVEAb3IRUkaXEvXmq9vTx X-Received: by 2002:a63:6c43:: with SMTP id h64mr11232552pgc.22.1551969300134; Thu, 07 Mar 2019 06:35:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551969300; cv=none; d=google.com; s=arc-20160816; b=CoYsDMHBpcpNhKjUOPXTMyIUt/r/8HKum6PhL/zByEjZOiQqT9eyyu2A+xnw9G3HIl OHTdfAYk05pe8m/jYP9wYlWRI4ApgbFjKpvcMLR8pfQ72YBfoL7inOh2OHhVduD5dHmJ c5wRrm0HIYij1YVdPYMFqL7GlFDzESdr7rINYMVQQ1PYYRsj2yYS5dQflQarl0EQxCIr 77AL+1TIaXeLDT/iukupwNKPG0W+sFRYrXn7wrkbC+CogVqLa3RMdPncAMn2DH78wmCs IQN4fJbGc/VGzbioeE9TO5ZXF6HcMrs+V2pzOE05uWy/59UMMudLBR6gkvSHawFoYTTD kA0A== 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=Tddwc1IdWPChX/GyJxVltZoNYPEU6LY3msTYwuiHBKw=; b=R8aGIkz/fLvJjg94ZmAsKM1bRd71vFJo2yiBQj653s5wM+iWiGRiYMgqzzfWd+y6Yu H85xWO3jATilYvHD04Riosu1YbeQBnWA0Z3+9Ygx/kJs6/ZFXtbHwA1kty/SsKCt3knh 15XkDSKD/lMVhaXPktyKV4hIx6wCdzfaTjRxINO+RHCBrUq6leCjhNX/f+fXbbuppsbQ uouVbGlVKJ8oOTXGNmuVh6ejBWNj88uN1BWVI2X2W1JRODnEMKVBCRx2mMIXLl9DMQhC 61VtP6YZVCMqCwkt5mwjbJRTmSxZsIW9iCtJHiIyZ/J+9C8lr2QBPpLrb9/RsKhoDzm+ ekAg== 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 b11si4563169pla.195.2019.03.07.06.34.21; Thu, 07 Mar 2019 06:35:00 -0800 (PST) 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 S1726207AbfCGOdv (ORCPT + 99 others); Thu, 7 Mar 2019 09:33:51 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:54757 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbfCGOdv (ORCPT ); Thu, 7 Mar 2019 09:33:51 -0500 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1h1u5h-0006dO-0e; Thu, 07 Mar 2019 15:33:45 +0100 Date: Thu, 7 Mar 2019 15:33:44 +0100 From: Sebastian Andrzej Siewior To: Yongxin Liu 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, paul.gortmaker@windriver.com, linux-nvdimm@lists.01.org Subject: Re: [PATCH RT] nvdimm: make lane acquirement RT aware Message-ID: <20190307143344.ytsnbmot5tjzjhip@linutronix.de> References: <20190306095709.23138-1-yongxin.liu@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190306095709.23138-1-yongxin.liu@windriver.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-06 17:57:09 [+0800], Yongxin Liu wrote: > In this change, we replace get_cpu/put_cpu with local_lock_cpu/ > local_unlock_cpu, and introduce per CPU variable "ndl_local_lock". > Due to preemption on RT, this lock can avoid race condition for the > same lane on the same CPU. When CPU number is greater than the lane > number, lane can be shared among CPUs. "ndl_lock->lock" is used to > protect the lane in this situation. so what was the reason that get_cpu() can't be replaced with raw_smp_processor_id()? Sebastian