Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp494831imm; Fri, 17 Aug 2018 01:23:17 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxMmfugUpEjeeeTm1pjkSxWug5t3hPiLJTzwC1j3feSIMni+xIVacjPpvVGKxB1lXB6XWfr X-Received: by 2002:a17:902:3124:: with SMTP id w33-v6mr32431969plb.235.1534494197925; Fri, 17 Aug 2018 01:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534494197; cv=none; d=google.com; s=arc-20160816; b=K/soEnp947y4fmnnAMvtAl/HixIRxcrg3g9qykR/tkCcV1qOyYq/MP1iIQUkW0hAkt cOgQGiN+ti6FJYo49ct4dTn/uirnuxCnvjKHrxeiBgPcrn8w4xHNpKmadgoccOSV+wZA pIerSfGU6t7nM+uuHI577ghvzlBILUkVzBodtfeCrbuVDSTn9vjN4F/fviHj1i0qjQNR Q0ZkQ2D7nzUlWN71WPdjg2fIP8Ew72EK9PUeIfj3V9jP+NuSN+eVC8iydoCs9ld3uTdK 4JitpJZWTLMzzwwss1RO3Q53IC/25JOKoCYtnSHkMXFmPU5tgjRZ67uwx8AiWpkCpSJS KAhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=soua0aq5DAE7ZZi34SuiTN74usIbQuLl9+DNm+vcxmg=; b=u36erIivoXvtwk8NzQer4yDmwSWcxbhP/EN9NNE4BsyQtaOFeqEsuXMFrVtRAHjvBV B4QDeZ0GkfePB7wsciVulWV++e680FblgwHNjrUBSx0S6WThevMoyOTANF3vl8q6Ji4x QekWrpPy/W8SBcHuPQPXnYGllqmH5X5/LTewPYNgvBVPH5cN0i9uglLWoxYTQ3/W9Ok5 1xG0lJHMy/bXm6Oc0rF567wo0dnnHr75r1hlWktpiTp8CwEiX1mxWg/L3+chU7ZZs1sa 87Z8TyQk15kkQc7wKZgt/DYOAraRZ9ttYECy2yQW1/JZ9U25jyA8pd4I4Apj/l7HGZ2g Uo/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=v1F2wgek; 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 s25-v6si1530685pgd.539.2018.08.17.01.23.02; Fri, 17 Aug 2018 01:23: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; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=v1F2wgek; 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 S1726798AbeHQLXx (ORCPT + 99 others); Fri, 17 Aug 2018 07:23:53 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:45302 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbeHQLXw (ORCPT ); Fri, 17 Aug 2018 07:23:52 -0400 Received: by mail-pl0-f67.google.com with SMTP id j8-v6so3375403pll.12 for ; Fri, 17 Aug 2018 01:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=soua0aq5DAE7ZZi34SuiTN74usIbQuLl9+DNm+vcxmg=; b=v1F2wgekrMPfgFahIFg9l9u9qa+1MlqW96y0k/4Eb1us7G2AVGzLWOxeqzSFCM/mkB b4nE2SSXzGK/ptG/R6UQxZYiXt9s2LEzZbmMEAPWkwib5Hu2o5DVoDO5RwDfxQ+w9tR5 0MBhsPyBpec6Dzd4o7AV8O78uK8pjPe2VVMCwvsDPALimOPZI1j9iRJh6UWhWltrkcNG 6pQPWxcGGD9LpweXJ/NFcVqg1Umhk7wLWCiiJ60Gd1R/QIopKqHoQkR83uKVgQQM+KTz u1Nk+tVRsN1LzYIEXc+nVgS1uknlwnx1HkiUVZuQYUZrWXhFcxNHMhxEolxsIz3bNoGm UFkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=soua0aq5DAE7ZZi34SuiTN74usIbQuLl9+DNm+vcxmg=; b=JGnR8PS6yDpo/T7qobKI/PyX5g5aQGVBIvHaEtYaCcabuiqxhm9WU/3llxf6bZR62K FdEzhZFIpuBnIuU3+BeXHHdoFaIAkFBwAn7fy6OL928fkWEOjsoNAk5iQGP+MdNl0aUa MM5JXobRX/U+7H452LTYTsEs3wAa4Qn6643YtyBeNdVfwF5WHMk3ZGKCRH+CSzITHpPy 6gwthz/i1SQO1+qbfSegqau8nAjzrqKH+3lorb307L02WuRVEa+wCeB6YNv3cxBDBEE2 zPVgagwAaO+9Xjx8s4160lCA51mhga0GxcSkb4HeY8Jq4Sx+qwnp7oP39lugDPnRSw13 iVqQ== X-Gm-Message-State: AOUpUlHE3ib0md+b53yTSSZx6JTEAEX1NCw6BV3eO1w+fTkXXd463VlI J8nqq8qjajcYzQ+ud3+4q4K/aqrAbnVhNw== X-Received: by 2002:a17:902:6845:: with SMTP id f5-v6mr1896366pln.17.1534494084613; Fri, 17 Aug 2018 01:21:24 -0700 (PDT) Received: from [10.86.58.199] (rap-us.hgst.com. [199.255.44.250]) by smtp.googlemail.com with ESMTPSA id o84-v6sm1940307pfi.165.2018.08.17.01.21.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Aug 2018 01:21:23 -0700 (PDT) Subject: Re: [RFC PATCH v2 0/1] lightnvm: move bad block and chunk state logic to core To: javier@cnexlabs.com Cc: igor.j.konopko@intel.com, marcin.dziegielewski@intel.com, hans.holmberg@cnexlabs.com, hlitz@ucsc.edu, youngtack.jin@circuitblvd.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180816113417.3641-1-mb@lightnvm.io> <00698BD3-4382-4033-908F-BEB63E7FAD57@cnexlabs.com> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: <2ed73237-2657-17a8-7134-2267ffb7e35d@lightnvm.io> Date: Fri, 17 Aug 2018 10:21:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <00698BD3-4382-4033-908F-BEB63E7FAD57@cnexlabs.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/16/2018 05:53 PM, Javier Gonzalez wrote: >> On 16 Aug 2018, at 13.34, Matias Bjørling wrote: >> >> This patch moves the 1.2 and 2.0 block/chunk metadata retrieval to >> core. >> >> Hi Javier, I did not end up using your patch. I had misunderstood what >> was implemented. Instead I implemented the detection of the each chunk by >> first sensing the first page, then the last page, and if the chunk >> is sensed as open, a per page scan will be executed to update the write >> pointer appropriately. >> > > I see why you want to do it this way for maintaining the chunk > abstraction, but this is potentially very inefficient as blocks not used > by any target will be recovered unnecessarily. True. It will up to the target to not ask for more metadata than necessary (similarly for 2.0) Note that in 1.2, it is > expected that targets will need to recover the write pointer themselves. > What is more, in the normal path, this will be part of the metadata > being stored so no wp recovery is needed. Still, this approach forces > recovery on each 1.2 instance creation (also on factory reset). In this > context, you are right, the patch I proposed only addresses the double > erase issue, which was the original motivator, and left the actual > pointer recovery to the normal pblk recovery process. > > Besides this, in order to consider this as a real possibility, we need > to measure the impact on startup time. For this, could you implement > nvm_bb_scan_chunk() and nvm_bb_chunk_sense() more efficiently by > recovering (i) asynchronously and (ii) concurrently across luns so that > we can establish the recovery cost more fairly? We can look at a > specific penalty ranges afterwards. Honestly, 1.2 is deprecated. I don't care about the performance, I care about being easy to maintain, so it doesn't borg me down in the future. Back of the envelope calculation for a 64 die SSD with 1024 blocks per die, and 60us read time, will take 4 seconds to scan if all chunks are free, a worst case something like ~10 seconds. -> Not a problem for me. > > Also, the recovery scheme in pblk will change significantly by doing > this, so I assume you will send a followup patchset reimplementing > recovery for the 1.2 path? The 1.2 path shouldn't be necessary after this. That is the idea of this work. Obviously, the set bad block interface will have to preserved and called.