From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752590AbcFFUUs (ORCPT ); Mon, 6 Jun 2016 16:20:48 -0400 Received: from g2t4622.austin.hp.com ([15.73.212.79]:58251 "EHLO g2t4622.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750894AbcFFUUr (ORCPT ); Mon, 6 Jun 2016 16:20:47 -0400 X-Greylist: delayed 3305 seconds by postgrey-1.27 at vger.kernel.org; Mon, 06 Jun 2016 16:20:47 EDT Subject: Re: [PATCH 01/13] driver core, libnvdimm: disable manual unbind of dimms while region active To: Dan Williams References: <146507355220.8347.12117020810872172684.stgit@dwillia2-desk3.amr.corp.intel.com> <146507355828.8347.11600179233094511139.stgit@dwillia2-desk3.amr.corp.intel.com> <0d64fc79-fdfa-9d50-c8b8-fc7c3e79f1f4@hpe.com> <2860536d-ce69-1d2e-4ca5-ca2f10b9695e@hpe.com> Cc: "linux-nvdimm@lists.01.org" , Greg Kroah-Hartman , david , "linux-kernel@vger.kernel.org" , Christoph Hellwig From: Linda Knippers Message-ID: <25251cc2-b34a-504e-394f-b2062d1542ce@hpe.com> Date: Mon, 6 Jun 2016 16:20:43 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/6/2016 3:46 PM, Dan Williams wrote: > On Mon, Jun 6, 2016 at 12:36 PM, Linda Knippers wrote: >> >> >> On 6/6/2016 3:31 PM, Dan Williams wrote: >>> On Mon, Jun 6, 2016 at 12:25 PM, Linda Knippers wrote: >>>> On 6/4/2016 4:52 PM, Dan Williams wrote: >>>>> There are scenarios where we need a middle ground between disabling all >>>>> manual bind/unbind attempts (via driver->suppress_bind_attrs) and >>>>> allowing unbind at any userspace-determined time. Pinning modules takes >>>>> away one vector for unwanted out-of-sequence device_release_driver() >>>>> invocations, this new mechanism (via device->suppress_unbind_attr) takes >>>>> away another. >>>>> >>>>> The first user of this mechanism is the libnvdimm sub-system where >>>>> manual dimm disabling should be prevented while the dimm is active in >>>>> any region. Note that there is a 1:N dimm-to-region relationship which >>>>> is why this is implemented as a disable count rather than a flag. This >>>>> forces userspace to disable regions before dimms when manually shutting >>>>> down a bus topology. >>>> >>>> How is this related to deprecating pcommit? >>> >>> We need guarantees that the flush hint mappings are valid for the >>> duration of a pmem namespace being enabled. I am going to move the >>> mapping of the flush hint region from per-dimm to per-region. However >>> since multiple regions may reference the same dimm the mapping needs >>> to be reference counted and shared across regions. This will be >>> similar to the arrangement we have for BLK-regions that share a >>> control region mapping. >> >> Why are things moving around? Aren't flush hints defined per NFIT device >> handle, making them an optional per-dimm thing? >> >> I don't understand a lot of this patch series and had the same questions >> as Jeff. How does deprecating pcommit, because it's not necessary with ADR, >> change so much? > > This patch set deprecates pcommit, and introduces the usage of flush > hints into the pmem path. The introduction patch used the word > "usually", I should have fleshed that out to say "usually ADR, or > explicit use of flush hints". > > A solution to the posted-write-queue flushing needs to be available > and a platform can choose to use flush hints or ADR. If the NFIT > defines an NVDIMM device without hints we assume the platform must > have ADR. If the platform NFIT neglects to define an NVDIMM to > physical address range mapping, we warn about a potentially broken > BIOS. Hopefully we can make this clearer in future versions of the > spec. You lost me on those last 2 sentences. An NVDIMM doesn't have to have an SPA range, but that seems to be unrelated to pcommit or flushes. -- ljk