Received: by 10.223.185.111 with SMTP id b44csp1644857wrg; Sat, 10 Mar 2018 10:28:29 -0800 (PST) X-Google-Smtp-Source: AG47ELu5XETC6qw5r+tJt0SSFpXAPMfdbIpRvyND7zt2mRyy78oUxhZwF3SsToAPHrDzKu6zBB1V X-Received: by 10.99.185.77 with SMTP id v13mr2277051pgo.112.1520706509332; Sat, 10 Mar 2018 10:28:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520706509; cv=none; d=google.com; s=arc-20160816; b=k1KYHagoIMJ66gvN8mm4PuYI/pWABJ0GxphFsMasxUGJGO42cM9dKMOWoYYmFX+1Fx rM3tBxE2hMZqXOwBFMZXLIOPMOxfNC3PCMjkLFTYzJ6GVJlR+NfaZnqHPMdOddm4TEMO flhxKbd8LvSWKIK9WBis/fePwVJO8Adscqlh2moXfpNh/5mDAMy0eGP2GnunGv9spRMp f07idLEpwkQoiUqYGdv57Jt/lz98MiBnLe3G+9c+TE/nipA/486k6Aw4cTMY7ojHQadg qJBut7UG/FyFckqWmLZT7dhdg8qtOq8igZfoavYcARHFXCYix0StMgcVF44YIzs+6cui 6ANQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=gpnLWVmPs/qzmxGuEzJYIWT80t74dxWPJN82bdIB5XY=; b=YRYKATIzIVSmK8rf1KN67vS6a0m/k5Kwkmk5fGMt3owJnp22DWoj68fKZ6elnWBuUm CUQivW/mw4W/NhmCNLfz1k3m3UyGpxfwLHw0xEyah2cxWdhKzt0hXLvDj4JsNu3ah5WT MAhsbRf3CKoOihOhwkwntDw8l2+KKNqDteEQE8xGhQUV4stFpzVS6AMZu5YfaRyO3nXU n9UAHnXBZK+47FGEz0MDgItwpdEWm3vJH02Z7+lK7sCnWvEbtSWKGqzmLorPhkXf5MCG DyqFLGs3QvSytymZOMZyBGJro1WmpsfZp5VU7DGakCJvEX3t0GHHcUDhCq5qA1HXSdm7 O6XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@eng.ucsd.edu header.s=google header.b=MGr16u8U; 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 33-v6si3109321plt.429.2018.03.10.10.28.15; Sat, 10 Mar 2018 10:28:29 -0800 (PST) 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=@eng.ucsd.edu header.s=google header.b=MGr16u8U; 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 S932669AbeCJSVn (ORCPT + 99 others); Sat, 10 Mar 2018 13:21:43 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:38434 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932670AbeCJSVk (ORCPT ); Sat, 10 Mar 2018 13:21:40 -0500 Received: by mail-pg0-f68.google.com with SMTP id a15so484809pgn.5 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=N0UNwVDfykNIqhxm4LNfm6gCxQewrG+EX4MXB/Zu8USemP3Kd7gGsw83/6zoHyuPlk yZc7S8li2hoth1QP14aXndO8KvNm4TIY8JnlOGy/+daZ7KXBDCG3bTq/qeGXRNY4oo03 +dIg2zDtROSMqtOBGe8NkK17FxwzqoZ0N/nQV0mQvddW8b2RiMyU1mOBEOeQjBIfrdtT MBuoAwZH8QrRz7xnK31NMVRTX5zN2dJnEgJJTgIoe7Y+NfKw4dYSlEkn94yivfO+JUbZ x9VbIc1MwwDKNt4InNr8a/F/kWpPc9j4xvuPqa4NjmgtKAKNc3sAKzOUADJ51fM1hbem BAUA== X-Gm-Message-State: AElRT7Ec82iMQh60WVgib8dmYbxBUrAwSt07920FFvuZt1MvdtVt4Avc 4nShGQZ7mJ+w4UmyggReV4abrw== 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 Cc: dan.j.williams@intel.com, andy.rudoff@intel.com, coughlan@redhat.com, swanson@cs.ucsd.edu, david@fromorbit.com, jack@suse.com, swhiteho@redhat.com, miklos@szeredi.hu, andiry.xu@gmail.com, Andiry Xu 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.7.4