From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751625AbbDRGp1 (ORCPT ); Sat, 18 Apr 2015 02:45:27 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:35282 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbbDRGpZ (ORCPT ); Sat, 18 Apr 2015 02:45:25 -0400 Message-ID: <5531FD7F.8070809@bjorling.me> Date: Sat, 18 Apr 2015 08:45:19 +0200 From: Matias Bjorling User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Christoph Hellwig CC: axboe@fb.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, keith.busch@intel.com, javier@paletta.io Subject: Re: [PATCH 1/5 v2] blk-mq: Add prep/unprep support References: <1429101284-19490-1-git-send-email-m@bjorling.me> <1429101284-19490-2-git-send-email-m@bjorling.me> <20150417063439.GB389@infradead.org> <5530C132.30107@bjorling.me> <20150417174630.GA10249@infradead.org> In-Reply-To: <20150417174630.GA10249@infradead.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Den 17-04-2015 kl. 19:46 skrev Christoph Hellwig: > On Fri, Apr 17, 2015 at 10:15:46AM +0200, Matias Bj?rling wrote: >> Just the prep/unprep, or other pieces as well? > > All of it - it's functionality that lies logically below the block > layer, so that's where it should be handled. > > In fact it should probably work similar to the mtd subsystem - that is > have it's own API for low level drivers, and just export a block driver > as one consumer on the top side. The low level drivers will be NVMe and vendor's own PCI-e drivers. It's very generic in their nature. Each driver would duplicate the same work. Both could have normal and open-channel drives attached. I'll like to keep blk-mq in the loop. I don't think it will be pretty to have two data paths in the drivers. For blk-mq, bios are splitted/merged on the way down. Thus, the actual physical addresses needs aren't known before the IO is diced to the right size. The reason it shouldn't be under the a single block device, is that a target should be able to provide a global address space. That allows the address space to grow/shrink dynamically with the disks. Allowing a continuously growing address space, where disks can be added/removed as requirements grow or flash ages. Not on a sector level, but on a flash block level. > >> In the future, applications can have an API to get/put flash block directly. >> (using the blk_nvm_[get/put]_blk interface). > > s/application/filesystem/? > Applications. The goal is that key value stores, e.g. RocksDB, Aerospike, Ceph and similar have direct access to flash storage. There won't be a kernel file-system between. The get/put interface can be seen as a space reservation interface for where a given process is allowed to access the storage media. It can also be seen in the way that we provide a block allocator in the kernel, while applications implement the rest of "file-system" in user-space, specially optimized for their data structures. This makes a lot of sense for a small subset (LSM, Fractal trees, etc.) of database applications. From mboxrd@z Thu Jan 1 00:00:00 1970 From: m@bjorling.me (Matias Bjorling) Date: Sat, 18 Apr 2015 08:45:19 +0200 Subject: [PATCH 1/5 v2] blk-mq: Add prep/unprep support In-Reply-To: <20150417174630.GA10249@infradead.org> References: <1429101284-19490-1-git-send-email-m@bjorling.me> <1429101284-19490-2-git-send-email-m@bjorling.me> <20150417063439.GB389@infradead.org> <5530C132.30107@bjorling.me> <20150417174630.GA10249@infradead.org> Message-ID: <5531FD7F.8070809@bjorling.me> Den 17-04-2015 kl. 19:46 skrev Christoph Hellwig: > On Fri, Apr 17, 2015@10:15:46AM +0200, Matias Bj?rling wrote: >> Just the prep/unprep, or other pieces as well? > > All of it - it's functionality that lies logically below the block > layer, so that's where it should be handled. > > In fact it should probably work similar to the mtd subsystem - that is > have it's own API for low level drivers, and just export a block driver > as one consumer on the top side. The low level drivers will be NVMe and vendor's own PCI-e drivers. It's very generic in their nature. Each driver would duplicate the same work. Both could have normal and open-channel drives attached. I'll like to keep blk-mq in the loop. I don't think it will be pretty to have two data paths in the drivers. For blk-mq, bios are splitted/merged on the way down. Thus, the actual physical addresses needs aren't known before the IO is diced to the right size. The reason it shouldn't be under the a single block device, is that a target should be able to provide a global address space. That allows the address space to grow/shrink dynamically with the disks. Allowing a continuously growing address space, where disks can be added/removed as requirements grow or flash ages. Not on a sector level, but on a flash block level. > >> In the future, applications can have an API to get/put flash block directly. >> (using the blk_nvm_[get/put]_blk interface). > > s/application/filesystem/? > Applications. The goal is that key value stores, e.g. RocksDB, Aerospike, Ceph and similar have direct access to flash storage. There won't be a kernel file-system between. The get/put interface can be seen as a space reservation interface for where a given process is allowed to access the storage media. It can also be seen in the way that we provide a block allocator in the kernel, while applications implement the rest of "file-system" in user-space, specially optimized for their data structures. This makes a lot of sense for a small subset (LSM, Fractal trees, etc.) of database applications.