From patchwork Tue Sep 18 05:49:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10603751 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41C875A4 for ; Tue, 18 Sep 2018 06:01:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EA8A2A2FF for ; Tue, 18 Sep 2018 06:01:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 212032A30A; Tue, 18 Sep 2018 06:01:23 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham 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 C8CC02A2FF for ; Tue, 18 Sep 2018 06:01:22 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BF2CC2113DA23; Mon, 17 Sep 2018 23:01:22 -0700 (PDT) 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=192.55.52.43; helo=mga05.intel.com; envelope-from=dan.j.williams@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 25F0F2113DA1D for ; Mon, 17 Sep 2018 23:01:20 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2018 23:01:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,388,1531810800"; d="scan'208";a="84429665" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga003.jf.intel.com with ESMTP; 17 Sep 2018 23:00:58 -0700 Subject: [ndctl PATCH 0/3] ndctl: Remove udev rule for latch and dirty-shutdown-count From: Dan Williams To: linux-nvdimm@lists.01.org Date: Mon, 17 Sep 2018 22:49:11 -0700 Message-ID: <153724975102.55312.9664009456306267501.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP The latch needs to be coordinated with writes to the namespace and that makes it not suitable as a dimm-add-event udev rule. Additionally, the dirty-shutdown-count is something that can live in sysfs alongside the other health state flags in /sys/.../nmemX/nfit. Otherwise, calling any of the libndctl apis from a udev script means the entire udev queue can get blocked behind a ndctl_bus_wait_probe() call. That's too much overhead for a non-default policy. In other words, while the latch event remains in userspace as close as possible to the application that wants to manage dimm-flush-failed policy as anything other than fatal, dirty-shutdown-count caching should move to sysfs where it is cheap to implement and compliments the flush-failed health state flag. --- Dan Williams (3): ndctl: Introduce dirty-dimm command ndctl: Revert "ndctl, intel: Fallback to smart cached shutdown_count" ndctl: Revert "ndctl: Create ndctl udev rules for dirty shutdown" .gitignore | 1 Documentation/ndctl/Makefile.am | 1 Documentation/ndctl/ndctl-dirty-dimm.txt | 29 ++++++ Makefile.am | 3 - builtin.h | 1 configure.ac | 10 -- contrib/80-ndctl.rules | 3 - ndctl.spec.in | 3 - ndctl/Makefile.am | 5 - ndctl/dimm.c | 28 ++++++ ndctl/lib/intel.c | 41 -------- ndctl/lib/libndctl.c | 6 - ndctl/lib/private.h | 3 - ndctl/ndctl-udev.c | 150 ------------------------------ ndctl/ndctl.c | 1 15 files changed, 61 insertions(+), 224 deletions(-) create mode 100644 Documentation/ndctl/ndctl-dirty-dimm.txt delete mode 100644 contrib/80-ndctl.rules delete mode 100644 ndctl/ndctl-udev.c