Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp662545yba; Fri, 26 Apr 2019 06:48:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJxHnL4UQPlhynPgBSsWIDs4YyYi43V8sm7spSRcw7b+cQDSMzMoWOpVj9ErMyzjP0fazH X-Received: by 2002:a62:ab12:: with SMTP id p18mr11908975pff.216.1556286495465; Fri, 26 Apr 2019 06:48:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556286495; cv=none; d=google.com; s=arc-20160816; b=I+VU0lg+hf7two+18O98l+DCoFcnDeiGfDB7qWZaeswGLbCMoPyNR2EstsWpDenzKb Hh3UOUl3N0N4mTDc6pVgvvxbMMqETrCwFDKi6izAZ2rGADApjzuzgl+2W4uWRZ6pn97q veX0QERtpEHZ0/8S9b2+ERxD5G3QB5kr/01MJgeuQsnLKY+3nFXSHlKfwu2HLGzJxnIX dWLH7rBBi8eno3+rKmpHq7iTb50zp5wZNT3sfCh83JcPWzmmUyKCmDC2dPXPpVsaS8Ms nHlO1YLONUD7jswX4MJM+3VRF1i17jbMdEOFDcNE+TOeg1z1PmFnZc+keaR3HlyuDLJH PKbg== 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; bh=4KKOeIXoQV7dCaKAFO7g4J+tEYRGfbl3cm8D/T0nzz8=; b=SJDyJGAhIZDQ6xuHeXxmAFuUihWHuvpob6LtczCQftqrAUP2vEZ3ZyYJ3Ai/x3gVWc ZohyaDRFoczgRMGLsI88rcymkVPqlvjxHlwmDqEcXokzVcN1QgiEZGW3WrTlK8hTTlYH 5+S4E9LRhZ12bMmlsmP3t9mVKkxj7imocNFBuH2gDneMvtq66KIPumAL9YR/a/tOeQiv LHYKgNK804OBSA4ILI5MbzHHYrNR7gptoD4jKPdAACatCZaqr+1uyqD7s5vC9F6qNyjn CNmwS8RYuCZeO3BBXSRIYBiL6Bl+X9lbJAHRCOpasQVQ7LRvUjt+CBAX6HBUMXSJULE0 lgPw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e192si24057657pgc.222.2019.04.26.06.48.00; Fri, 26 Apr 2019 06:48:15 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726189AbfDZNql (ORCPT + 99 others); Fri, 26 Apr 2019 09:46:41 -0400 Received: from mga03.intel.com ([134.134.136.65]:38269 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbfDZNql (ORCPT ); Fri, 26 Apr 2019 09:46:41 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 06:46:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,397,1549958400"; d="scan'208";a="153986651" Received: from ikonopko-mobl.ger.corp.intel.com (HELO [10.237.142.109]) ([10.237.142.109]) by orsmga002.jf.intel.com with ESMTP; 26 Apr 2019 06:46:39 -0700 Subject: Re: [PATCH] lightnvm: pblk: Introduce hot-cold data separation To: =?UTF-8?Q?Javier_Gonz=c3=a1lez?= Cc: Heiner Litz , =?UTF-8?Q?Matias_Bj=c3=b8rling?= , Hans Holmberg , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190425052152.6571-1-hlitz@ucsc.edu> <66434cc7-2bac-dd10-6edc-4560e6a0f89f@intel.com> From: Igor Konopko Message-ID: Date: Fri, 26 Apr 2019 15:46:38 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26.04.2019 12:04, Javier Gonz?lez wrote: > >> On 26 Apr 2019, at 11.11, Igor Konopko wrote: >> >> On 25.04.2019 07:21, Heiner Litz wrote: >>> Introduce the capability to manage multiple open lines. Maintain one line >>> for user writes (hot) and a second line for gc writes (cold). As user and >>> gc writes still utilize a shared ring buffer, in rare cases a multi-sector >>> write will contain both gc and user data. This is acceptable, as on a >>> tested SSD with minimum write size of 64KB, less than 1% of all writes >>> contain both hot and cold sectors. >> >> Hi Heiner >> >> Generally I really like this changes, I was thinking about sth similar since a while, so it is very good to see that patch. >> >> I have a one question related to this patch, since it is not very clear for me - how you ensure the data integrity in following scenarios: >> -we have open line X for user data and line Y for GC >> -GC writes LBA=N to line Y >> -user writes LBA=N to line X >> -we have power failure when both line X and Y were not written completely >> -during pblk creation we are executing OOB metadata recovery >> And here is the question, how we distinguish whether LBA=N from line Y or LBA=N from line X is the valid one? >> Line X and Y might have seq_id either descending or ascending - this would create two possible scenarios too. >> >> Thanks >> Igor >> > > You are right, I think this is possible in the current implementation. > > We need an extra constrain so that we only GC lines above the GC line > ID. This way, when we order lines on recovery, we can guarantee > consistency. This means potentially that we would need several open > lines for GC to avoid padding in case this constrain forces to choose a > line with an ID higher than the GC line ID. > > What do you think? I'm not sure yet about your approach, I need to think and analyze this a little more. I also believe that probably we need to ensure that current user data line seq_id is always above the current GC line seq_id or sth like that. We cannot also then GC any data from the lines which are still open, but I believe that this is a case even right now. > > Thanks, > Javier >