From patchwork Sat Mar 10 18:18:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andiry Xu X-Patchwork-Id: 10273971 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A0BBA601A0 for ; Sat, 10 Mar 2018 18:21:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FEFB29106 for ; Sat, 10 Mar 2018 18:21:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 848FB29735; Sat, 10 Mar 2018 18:21:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 551D329106 for ; Sat, 10 Mar 2018 18:21:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 235112264631F; Sat, 10 Mar 2018 10:15:23 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c05::242; helo=mail-pg0-x242.google.com; envelope-from=jix024@eng.ucsd.edu; receiver=linux-nvdimm@lists.01.org Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2B451226462F8 for ; Sat, 10 Mar 2018 10:15:21 -0800 (PST) Received: by mail-pg0-x242.google.com with SMTP id e9so4831299pgs.10 for ; Sat, 10 Mar 2018 10:21:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eng.ucsd.edu; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gpnLWVmPs/qzmxGuEzJYIWT80t74dxWPJN82bdIB5XY=; b=MGr16u8Ue3lU0PTmZnvuaK+bjqcXagVFD9OCDyZ+OUM+ofxTspvRuKwgkPylD1XWu0 dZFmILccCpZuhWYyBmj6QcRGn6bEJT4uoF3+xeJo5zffjCdnexhuG0+jwfvjXwovXrHq 7yRQXQ0pXqSHlTWF72ra9EM/S3nizB7GKSK6E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gpnLWVmPs/qzmxGuEzJYIWT80t74dxWPJN82bdIB5XY=; b=Kt2qiS0a+c3+TkzriWYGxZZw65gKUwbR5rGN6TWcjI9h0N7nOZRmHo7mlc87Z3IttH vw4je1r5Nz/xTiqoSyaSGuH9n144+TbRmSu7kuum+7GHIn/9u4PGIzUCKA9o64td0Skx upvwvBQlHvju4ms7ynL15xbi541tA4qpokX5mptsRBBo62wgV0eBYsKmNLZFoPa8ta2i WJrFW9eUSGIYWjO76750ioIg7BgtoXn/NYMbeZwdwthailH4tQRZAl4H2iKE71uo/oX/ MTZmvC8pmDm1XUMhK2mWT9/RPh6NVtiDL3qjUcQWV4BTK4LfnQHMWtj+4DJoTI+FPJCr JcYQ== X-Gm-Message-State: AElRT7E9UWL4EfhWycv4//wFHtMcybOUahritHi5XjAh1fswmVC7r+6w we2CWItL6/nb/2DrtOSnoD4GrA== X-Google-Smtp-Source: AG47ELuGXDyEElbQbZ210ZdMDy3RX6AuLD2khR+7zkrkcg8ssWER9Evj9cTN8Y4I2Z41rBo6rdmQvg== X-Received: by 10.98.79.90 with SMTP id d87mr2658037pfb.41.1520706099607; Sat, 10 Mar 2018 10:21:39 -0800 (PST) Received: from brienza-desktop.8.8.4.4 (andxu.ucsd.edu. [132.239.17.134]) by smtp.gmail.com with ESMTPSA id h80sm9210167pfj.181.2018.03.10.10.21.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 10 Mar 2018 10:21:39 -0800 (PST) From: Andiry Xu To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org Subject: [RFC v2 69/83] Super: Add module param inplace_data_updates. Date: Sat, 10 Mar 2018 10:18:50 -0800 Message-Id: <1520705944-6723-70-git-send-email-jix024@eng.ucsd.edu> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520705944-6723-1-git-send-email-jix024@eng.ucsd.edu> References: <1520705944-6723-1-git-send-email-jix024@eng.ucsd.edu> X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: coughlan@redhat.com, miklos@szeredi.hu, Andiry Xu , david@fromorbit.com, jack@suse.com, swanson@cs.ucsd.edu, swhiteho@redhat.com, andiry.xu@gmail.com MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP From: Andiry Xu Provide inplace data updates option if people prefer inplace updates to copy-on-write. Signed-off-by: Andiry Xu --- fs/nova/nova.h | 1 + fs/nova/super.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/nova/nova.h b/fs/nova/nova.h index 1c2205e..6c94a9b 100644 --- a/fs/nova/nova.h +++ b/fs/nova/nova.h @@ -138,6 +138,7 @@ extern unsigned int nova_dbgmask; extern int measure_timing; +extern int inplace_data_updates; extern unsigned int blk_type_to_shift[NOVA_BLOCK_TYPE_MAX]; diff --git a/fs/nova/super.c b/fs/nova/super.c index 9710be8..980b1d7 100644 --- a/fs/nova/super.c +++ b/fs/nova/super.c @@ -43,10 +43,14 @@ int measure_timing; int support_clwb; +int inplace_data_updates; module_param(measure_timing, int, 0444); MODULE_PARM_DESC(measure_timing, "Timing measurement"); +module_param(inplace_data_updates, int, 0444); +MODULE_PARM_DESC(inplace_data_updates, "Perform data updates in-place (i.e., not atomically)"); + module_param(nova_dbgmask, int, 0444); MODULE_PARM_DESC(nova_dbgmask, "Control debugging output"); @@ -541,7 +545,8 @@ static int nova_fill_super(struct super_block *sb, void *data, int silent) goto out; } - nova_dbg("measure timing %d\n", measure_timing); + nova_dbg("measure timing %d, inplace data update %d\n", + measure_timing, inplace_data_updates); get_random_bytes(&random, sizeof(u32)); atomic_set(&sbi->next_generation, random);