From patchwork Fri May 6 18:03:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 9035221 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A72EABF440 for ; Fri, 6 May 2016 18:05:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB40820398 for ; Fri, 6 May 2016 18:05:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2D1120272 for ; Fri, 6 May 2016 18:05:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932429AbcEFSED (ORCPT ); Fri, 6 May 2016 14:04:03 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:37292 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932397AbcEFSD7 (ORCPT ); Fri, 6 May 2016 14:03:59 -0400 Received: by mail-wm0-f43.google.com with SMTP id a17so89994952wme.0 for ; Fri, 06 May 2016 11:03:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TwSeBlin0l9fyV1DE8m0vTWuWz6Ep7ZU3uX4PvO+P5E=; b=a0RTUIo4L9r/d5pmeUkMFGAhKSFLEbU2mAotRzvl4YBq0aQM+f7m20Mf4lGBepI0q4 Yc3vuNGA7ry+yel9EzNRi0LPzZwg8AYjmEAZmeyCO5kGz6lZtB5a+bgB5PiJ/MaD6opF CNUfh3Dmzds/iZTEJ0Qa+M8tZspEFi7gG75SU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TwSeBlin0l9fyV1DE8m0vTWuWz6Ep7ZU3uX4PvO+P5E=; b=MO5tpoDnur4qJZA0o2DO6OKXZxujaM5rC55O00eEANVDa27JEF55LLbERlo8NPzR2g 6xT9XGSNOyTZhcxKuSlvVgdb8h46xlmYyiHh0MLsME4kveeXze604qhMkXme+eG9sGxH Jr8U1grjNrJzw8VfIlw8h+k921g/Kcl0ZeBsySyAWivQ1bB8Bpm9anZfV8niSd6HADow feZPQDoGT2R9dNLCoxf1wNYzvYZRc79vFVoOxvJnIFoHxMsh7W4IW3s2ozudF+H69Lfq iHsZQtiJS/tiigzGsJc7YuLqtYAyhQyaKgfhFvPHGMVt/RV4Pt+i4/uPp22Wy6gmRASy 49lw== X-Gm-Message-State: AOPr4FXYt/NVotEpXxZJsUaSWkWnB9DYUoC5lTzNBvDLBV0p5Z6aJczTzb6ull67EF5GbA== X-Received: by 10.28.16.136 with SMTP id 130mr10909647wmq.23.1462557838479; Fri, 06 May 2016 11:03:58 -0700 (PDT) Received: from Macroninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id kz1sm16076559wjc.46.2016.05.06.11.03.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 May 2016 11:03:57 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 26/28] lightnvm: add is_cached entry to struct ppa_addr Date: Fri, 6 May 2016 20:03:19 +0200 Message-Id: <1462557801-24974-27-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1462557801-24974-1-git-send-email-m@bjorling.me> References: <1462557801-24974-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A target requires a method to identify PPAs that are either cached in memory or on disk. This can efficiently be maintained within the PPA. The target host-side translation table can then lookup a PPA and know from the PPA if it is cached or on disk. In the case it is cached, it is the responsibility of the target to maintain this cache. Signed-off-by: Matias Bjørling --- include/linux/lightnvm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 3c53911..3a810d7 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -18,7 +18,7 @@ enum { #define NVM_SEC_BITS (8) #define NVM_PL_BITS (8) #define NVM_LUN_BITS (8) -#define NVM_CH_BITS (8) +#define NVM_CH_BITS (7) struct ppa_addr { /* Generic structure for all addresses */ @@ -30,8 +30,14 @@ struct ppa_addr { u64 pl : NVM_PL_BITS; u64 lun : NVM_LUN_BITS; u64 ch : NVM_CH_BITS; + u64 reserved : 1; } g; + struct { + u64 line : 63; + u64 is_cached : 1; + } c; + u64 ppa; }; };