From: Sayali Lokhande <sayalil@codeaurora.org>
To: Evan Green <evgreen@chromium.org>, Bart.VanAssche@wdc.com
Cc: Vinayak Holikatti <vinholikatti@gmail.com>,
linux-kernel@vger.kernel.org, asutoshd@codeaurora.org,
riteshh@codeaurora.org, cang@codeaurora.org,
martin.petersen@oracle.com, subhashj@codeaurora.org,
linux-scsi@vger.kernel.org, vivek.gautam@codeaurora.org,
Rajendra Nayak <rnayak@codeaurora.org>,
jejb@linux.vnet.ibm.com
Subject: Re: [PATCH V5 2/2] scsi: ufs: Add configfs support for ufs provisioning
Date: Mon, 30 Jul 2018 13:16:00 +0530 [thread overview]
Message-ID: <8e6af8ed-1ec0-f10e-69b2-08281b638a4b@codeaurora.org> (raw)
In-Reply-To: <CAE=gft6zm2mw3rnNuktDe0NWs-NM1CFQw1BUeGhaBi3eoEDXBg@mail.gmail.com>
Hi Evan,
On 7/18/2018 1:53 AM, 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.
> -Evan
I am using ASCII format for reading/writing to config desc as it will be
more readable for users and easier/comfortable to compare any value to
default spec value(if required).
So I don't really see any harm in using current ASCII format for
provisioning purpose.
-Sayali
next prev parent reply other threads:[~2018-07-30 7:46 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
2018-07-18 17:30 ` Bart Van Assche
2018-07-18 17:45 ` gregkh
2018-07-30 7:46 ` Sayali Lokhande [this message]
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=8e6af8ed-1ec0-f10e-69b2-08281b638a4b@codeaurora.org \
--to=sayalil@codeaurora.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=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
all inboxes | Powered by JetHome®