From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932388AbbFIG6N (ORCPT ); Tue, 9 Jun 2015 02:58:13 -0400 Received: from mail-ig0-f174.google.com ([209.85.213.174]:36303 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932418AbbFIG5n (ORCPT ); Tue, 9 Jun 2015 02:57:43 -0400 MIME-Version: 1.0 In-Reply-To: <20150609063418.GB9804@lst.de> References: <20150602001134.4506.45867.stgit@dwillia2-desk3.amr.corp.intel.com> <20150602001435.4506.42614.stgit@dwillia2-desk3.amr.corp.intel.com> <20150609063418.GB9804@lst.de> Date: Mon, 8 Jun 2015 23:57:42 -0700 Message-ID: Subject: Re: [PATCH v5 05/21] libnvdimm: control (ioctl) messages for libnvdimm bus and dimm devices From: Dan Williams To: Christoph Hellwig Cc: "linux-nvdimm@lists.01.org" , Jens Axboe , Stephen Rothwell , "Rafael J. Wysocki" , Neil Brown , Greg KH , "linux-kernel@vger.kernel.org" , Ingo Molnar , Linux ACPI , jmoyer , linux-api@vger.kernel.org, Andrew Morton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 8, 2015 at 11:34 PM, Christoph Hellwig wrote: > On Mon, Jun 01, 2015 at 08:14:35PM -0400, Dan Williams wrote: >> Most discovery/configuration of the libnvdimm-subsystem is done via >> sysfs attributes. However, some libnvdimm buses, particularly the >> ACPI.NFIT bus, define a small set of messages that can be passed to the >> platform. For convenience we derive the initial libnvdimm-ioctl command >> formats directly from the NFIT DSM Interface Example formats. > > Why not merge these into the extensive sysfs interface? Data payload size for one, these commands transfer more than a page worth of data at a time. Even if we killed the ioctl interface to userspace we still need all the ugly data marshaling code in the kernel to craft properly formatted ACPI _DSM messages. I try to share as much common infrastructure from the ACPI _DSM implementation to the ioctl interface (nd_cmd_dimm_desc() + nd_cmd_bus_desc()).