From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "evgreen@chromium.org" <evgreen@chromium.org>,
"vinholikatti@gmail.com" <vinholikatti@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>,
"sayalil@codeaurora.org" <sayalil@codeaurora.org>,
"riteshh@codeaurora.org" <riteshh@codeaurora.org>,
"cang@codeaurora.org" <cang@codeaurora.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"subhashj@codeaurora.org" <subhashj@codeaurora.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"vivek.gautam@codeaurora.org" <vivek.gautam@codeaurora.org>,
"rnayak@codeaurora.org" <rnayak@codeaurora.org>,
"jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>
Subject: Re: [PATCH V5 2/2] scsi: ufs: Add configfs support for ufs provisioning
Date: Wed, 18 Jul 2018 10:56:51 +0200 [thread overview]
Message-ID: <20180718085651.GA23599@kroah.com> (raw)
In-Reply-To: <aa697186c00937c18519fe5eb1355d3fc458cfb6.camel@wdc.com>
On Tue, Jul 17, 2018 at 09:06:35PM +0000, Bart Van Assche wrote:
> On Tue, 2018-07-17 at 13:23 -0700, Evan Green wrote:
> > On Mon, Jul 16, 2018 at 5:04 PM Bart Van Assche <Bart.VanAssche@wdc.com> wrote:
> > >
> > > On Mon, 2018-07-16 at 16:46 -0700, Evan Green wrote:
> > > > I see Bart has chimed in on the next series with a suggestion to break
> > > > out each field into individual files within configfs. Bart, what are
> > > > your feelings about converting to a binary attribute? I remember when
> > > > I did my sysfs equivalent of this patch, somebody chimed in indicating
> > > > a "commit" file might be needed so that the new configuration could be
> > > > written in one fell swoop. One advantage of the binary attribute is
> > > > that it writes the configuration atomically.
> > >
> > > Hello Evan,
> > >
> > > I may be missing some UFS background information. But since a configfs interface
> > > is being added I think the same rule applies as to all Linux kernel user space
> > > interfaces, namely that it should be backwards compatible. Additionally, if
> > > anyone ever will want to use this interface from a shell script, I think that
> > > it will be much easier to write multiple ASCII attributes than a single binary
> > > attribute.
> > >
> >
> > Hi Bart,
> > I'm unsure about the compatibility aspect for binary attributes that
> > essentially represent direct windows into hardware. I suppose this
> > comes down to who this interface is most useful to. Hypothetically
> > lets say a future revision of UFS adds fields to the configuration
> > descriptor, but is otherwise backwards compatible. If this interface
> > is primarily for OEMs initializing their devices in the factory, then
> > I'd argue they'd want the most direct window to the configuration
> > descriptor. These folks probably just have a configuration they want
> > to plunk into the hardware, and would prefer being able to write all
> > fields over having some sort of compatibility restriction. If, on the
> > other hand, this is used by long-running scripts that stick around for
> > years without modification, then yes, it seems like it would be more
> > important to stay compatible, and have smarts in the kernel to make
> > writes of old descriptors work in new devices.
> >
> > At least for myself, I fall into the category of someone who just
> > needs to plunk a configuration descriptor in once, and would prefer
> > not to have to submit kernel changes if the descriptor evolves
> > slightly. It also seemed a little odd that this patch now spends a
> > bunch of energy converting ASCII into bytes, just to write it without
> > modification into the hardware, and convert back again to ASCII for
> > reads.
> >
> > We plan to use a script for provisioning, and could easily handle
> > ASCII or rawbytes:
> >
> > # Some bytes, ready to go with the interface today...
> > some_bytes="00 01 02 03"
> >
> > # Same bytes, now in binary format
> > bytes_fmt=$(echo " $some_bytes" | sed 's/ /\\x/g')
> > /usr/bin/printf "$bytes_fmt" > /configfs/ufs_provision
> >
> > I'm not dead set on binary, since as above I could do it either way,
> > but it seemed worth at least talking through. Let me know what you
> > think.
>
> The configfs documentation (Documentation/filesystems/configfs/configfs.txt)
> is clear about this: "Preferably only one value per file should be used." So
> I would like to hear the opinion of someone who has more authority than I
> with regard to configfs.
Don't we have "binary" files for configfs? We have them for sysfs, they
are for files that are not touched by the kernel and just "pass-through"
to the hardware. Would that work here as well?
thanks,
greg k-h
next prev parent reply other threads:[~2018-07-18 8:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1530858040-13971-1-git-send-email-sayalil@codeaurora.org>
2018-07-06 6:20 ` [PATCH V5 1/2] scsi: ufs: set the device reference clock setting Sayali Lokhande
2018-07-06 21:07 ` Rob Herring
2018-07-16 8:28 ` Sayali Lokhande
2018-07-06 6:20 ` [PATCH V5 2/2] scsi: ufs: Add configfs support for ufs provisioning Sayali Lokhande
2018-07-08 20:21 ` Christoph Hellwig
2018-07-11 9:50 ` Sayali Lokhande
2018-07-17 12:48 ` Christoph Hellwig
2018-07-09 17:48 ` Evan Green
2018-07-16 8:10 ` Sayali Lokhande
2018-07-16 23:46 ` Evan Green
2018-07-17 0:04 ` Bart Van Assche
2018-07-17 20:23 ` Evan Green
2018-07-17 21:06 ` Bart Van Assche
2018-07-18 8:56 ` gregkh [this message]
2018-07-18 17:30 ` Bart Van Assche
2018-07-18 17:45 ` gregkh
2018-07-30 7:46 ` Sayali Lokhande
2018-07-30 23:39 ` Evan Green
2018-07-31 5:18 ` Sayali Lokhande
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180718085651.GA23599@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Bart.VanAssche@wdc.com \
--cc=asutoshd@codeaurora.org \
--cc=cang@codeaurora.org \
--cc=evgreen@chromium.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=riteshh@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=sayalil@codeaurora.org \
--cc=subhashj@codeaurora.org \
--cc=vinholikatti@gmail.com \
--cc=vivek.gautam@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox