From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 08/15] block, dax, pmem: reference counting infrastructure Date: Thu, 24 Sep 2015 08:15:03 -0700 Message-ID: <20150924151503.GF24375@infradead.org> References: <20150923043737.36490.70547.stgit@dwillia2-desk3.jf.intel.com> <20150923044155.36490.2017.stgit@dwillia2-desk3.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@linux-foundation.org, Jens Axboe , linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Ross Zwisler To: Dan Williams Return-path: Content-Disposition: inline In-Reply-To: <20150923044155.36490.2017.stgit@dwillia2-desk3.jf.intel.com> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Sep 23, 2015 at 12:41:55AM -0400, Dan Williams wrote: > Enable DAX to use a reference count for keeping the virtual address > returned by ->direct_access() valid for the duration of its usage in > fs/dax.c, or otherwise hold off blk_cleanup_queue() while > pmem_make_request is active. The blk-mq code is already in a position > to need low overhead referece counting for races against request_queue > destruction (blk_cleanup_queue()). Given DAX-enabled block drivers do > not enable blk-mq, share the storage in 'struct request_queue' between > the two implementations. Can we just move the refcounting to common code with the same field name, and even initialize it for non-mq, non-dax queues but just never tage a reference there (for now)? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755228AbbIXPPG (ORCPT ); Thu, 24 Sep 2015 11:15:06 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:39620 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751996AbbIXPPE (ORCPT ); Thu, 24 Sep 2015 11:15:04 -0400 Date: Thu, 24 Sep 2015 08:15:03 -0700 From: Christoph Hellwig To: Dan Williams Cc: akpm@linux-foundation.org, Jens Axboe , linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Ross Zwisler Subject: Re: [PATCH 08/15] block, dax, pmem: reference counting infrastructure Message-ID: <20150924151503.GF24375@infradead.org> References: <20150923043737.36490.70547.stgit@dwillia2-desk3.jf.intel.com> <20150923044155.36490.2017.stgit@dwillia2-desk3.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150923044155.36490.2017.stgit@dwillia2-desk3.jf.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2015 at 12:41:55AM -0400, Dan Williams wrote: > Enable DAX to use a reference count for keeping the virtual address > returned by ->direct_access() valid for the duration of its usage in > fs/dax.c, or otherwise hold off blk_cleanup_queue() while > pmem_make_request is active. The blk-mq code is already in a position > to need low overhead referece counting for races against request_queue > destruction (blk_cleanup_queue()). Given DAX-enabled block drivers do > not enable blk-mq, share the storage in 'struct request_queue' between > the two implementations. Can we just move the refcounting to common code with the same field name, and even initialize it for non-mq, non-dax queues but just never tage a reference there (for now)?