From patchwork Wed May 4 12:52:46 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: 9013861 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AA5BA9F1C1 for ; Wed, 4 May 2016 12:52:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA6ED2038F for ; Wed, 4 May 2016 12:52:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9765E203A0 for ; Wed, 4 May 2016 12:52:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752825AbcEDMwx (ORCPT ); Wed, 4 May 2016 08:52:53 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36278 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751453AbcEDMww (ORCPT ); Wed, 4 May 2016 08:52:52 -0400 Received: by mail-wm0-f41.google.com with SMTP id n129so187458519wmn.1 for ; Wed, 04 May 2016 05:52:52 -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:mime-version :content-transfer-encoding; bh=TwSeBlin0l9fyV1DE8m0vTWuWz6Ep7ZU3uX4PvO+P5E=; b=nrzEcPb3hYM1z/SweqYiirHijf/cdgFEMYpS1NO2djyGqDpTKSp5ne0wNuPXm0NwzA ruE4KT5ib2K0aDzPcOgLNJUKNrT8TtgV+do1nrd8bvfOMNdB+qt1eIUGDCzbSU3idZED Qro/BZkqSgz50MKp4QAYgxLp5B9pw8A+6Y2Sg= 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:mime-version :content-transfer-encoding; bh=TwSeBlin0l9fyV1DE8m0vTWuWz6Ep7ZU3uX4PvO+P5E=; b=KUm0a+QdqZ1ZBaQvtalikudXmdrQkYYZczH2H9qcIM9tDX2gnpQ2Dv+ZLl6TVU7EPB xec/Nu8n3i7pb5sU81MWaAsXBMX+AKuI5P8nzbNOG3tSijYe95u7hfviN6icAMbao720 Q4RKTde1hKIiVrX+QHo1mlm5d5cAc+jnCTNhHL7dJanH+UpghwnUiGGn788QJTCCmqYY knCV6cyFxA1b6IPUlY6KuN4MWFPVIu4wNSwu3+PwsuYgDOABhfeYPfsI8Roor4oNOsM3 bn9cD7BjvTZGXsmMm8IJMfIaH1cgM8fqe3jk4EGyXkPPpg9dJ0EbztJFSJu7c1cSGLrQ KpCQ== X-Gm-Message-State: AOPr4FW6iEgbas4IBc72DV9Zo6Zw7dqlsxGe4MgknXm3DQE/7abeuMORYw+KYvM9p2EXeg== X-Received: by 10.28.19.20 with SMTP id 20mr31622901wmt.5.1462366371383; Wed, 04 May 2016 05:52:51 -0700 (PDT) Received: from Macroninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id jq1sm4069393wjc.28.2016.05.04.05.52.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 May 2016 05:52:50 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH] lightnvm: add is_cached entry to struct ppa_addr Date: Wed, 4 May 2016 14:52:46 +0200 Message-Id: <1462366366-24658-1-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 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; }; };