From patchwork Mon Feb 3 20:00:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Goyal X-Patchwork-Id: 11363367 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E30EC13B4 for ; Mon, 3 Feb 2020 20:01:15 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E82520658 for ; Mon, 3 Feb 2020 20:01:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EBFpBsyr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E82520658 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580760074; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=GQ61p9zAdW7Gs2ytLmrfT7i2bGOa+FAOyBM4W2D1Mpg=; b=EBFpBsyrqm1nQBzffBVPtUVeKY3kpnRWJDUQtzS361TtLArUJOLDvEdcxYkmJ97u8vvdZ1 kP6nezvyZfbZ/8ixrP/lPxJCQUcw0ncXyd+ZSjFwkM3fvPJti3aObSU+w1wmbPs/AvKn1T yBpQMAct3NktUcqYKD+kIG98LXymYj4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-89--rj24THaP-uk1kNJn1jSaw-1; Mon, 03 Feb 2020 15:00:57 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E632F1B2C984; Mon, 3 Feb 2020 20:00:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5651889A83; Mon, 3 Feb 2020 20:00:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 541918172A; Mon, 3 Feb 2020 20:00:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 013K0noV021352 for ; Mon, 3 Feb 2020 15:00:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id F3F0E1001B0B; Mon, 3 Feb 2020 20:00:48 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from horse.redhat.com (unknown [10.18.25.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 701831001B09; Mon, 3 Feb 2020 20:00:46 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 058A92202E9; Mon, 3 Feb 2020 15:00:45 -0500 (EST) From: Vivek Goyal To: linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org, dan.j.williams@intel.com, hch@infradead.org Date: Mon, 3 Feb 2020 15:00:24 -0500 Message-Id: <20200203200029.4592-1-vgoyal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: dm-devel@redhat.com Cc: vishal.l.verma@intel.com, dm-devel@redhat.com, vgoyal@redhat.com Subject: [dm-devel] [RFC PATCH 0/5][V2] dax, pmem: Provide a dax operation to zero range of memory X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: -rj24THaP-uk1kNJn1jSaw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Hi, This is V2 of patches. I posted V1 here. https://lore.kernel.org/linux-fsdevel/20200123165249.GA7664@redhat.com/ Changes since V1. - Took care of feedback from Christoph. - Made ->zero_page_range() mandatory operation. - Provided a generic helper to zero range for non-pmem drivers. - Merged __dax_zero_page_range() and iomap_dax_zero() - Made changes to dm drivers. - Limited range zeroing to with-in single page. - Tested patches with real hardware. description ----------- This is an RFC patch series to provide a dax operation to zero a range of memory. It will also clear poison in the process. Motivation from this patch comes from Christoph's feedback that he will rather prefer a dax way to zero a range instead of relying on having to call blkdev_issue_zeroout() in __dax_zero_page_range(). https://lkml.org/lkml/2019/8/26/361 My motivation for this change is virtiofs DAX support. There we use DAX but we don't have a block device. So any dax code which has the assumption that there is always a block device associated is a problem. So this is more of a cleanup of one of the places where dax has this dependency on block device and if we add a dax operation for zeroing a range, it can help with not having to call blkdev_issue_zeroout() in dax path. Thanks Vivek Vivek Goyal (5): dax, pmem: Add a dax operation zero_page_range s390,dax: Add dax zero_page_range operation to dcssblk driver dm,dax: Add dax zero_page_range operation dax,iomap: Start using dax native zero_page_range() dax,iomap: Add helper dax_iomap_zero() to zero a range drivers/dax/super.c | 20 ++++++++++++ drivers/md/dm-linear.c | 18 +++++++++++ drivers/md/dm-log-writes.c | 17 ++++++++++ drivers/md/dm-stripe.c | 23 ++++++++++++++ drivers/md/dm.c | 30 ++++++++++++++++++ drivers/nvdimm/pmem.c | 50 +++++++++++++++++++++++++++++ drivers/s390/block/dcssblk.c | 7 ++++ fs/dax.c | 60 ++++++++++++++--------------------- fs/iomap/buffered-io.c | 9 +----- include/linux/dax.h | 17 ++++++---- include/linux/device-mapper.h | 3 ++ 11 files changed, 204 insertions(+), 50 deletions(-)