From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Right location in sysfs for dlpar file
Date: Mon, 08 Dec 2014 09:21:29 -0600 [thread overview]
Message-ID: <5485C1F9.9000401@linux.vnet.ibm.com> (raw)
In-Reply-To: <20141204043102.GA21724@kroah.com>
On 12/03/2014 10:31 PM, Greg KH wrote:
> On Wed, Dec 03, 2014 at 09:07:27PM -0600, Nathan Fontenot wrote:
>> On 12/01/2014 10:26 PM, Greg KH wrote:
>>> On Mon, Dec 01, 2014 at 09:41:03AM -0600, Nathan Fontenot wrote:
>>>> On 11/26/2014 09:12 PM, Benjamin Herrenschmidt wrote:
>>>>> Hi Greg,
>>>>>
>>>>> So Nathan is working on a patch series to cleanup and improve our
>>>>> "DLPAR" infrastructure which is basically our hotplug mechanism when
>>>>> running under the PowerVM (aka pHyp) and KVM hypervisors.
>>>>
>>>> The cleanup to the dlpar infrastructure will move the entire operation
>>>> of hotplugging a device to the kernel instead of doing it partially in
>>>> userspace and partially in the kernel as is currently done.
>>>>
>>>>>
>>>>> I'll let Nathan give you a bit more details/background and answer
>>>>> subsequent question you might have as this is really his area of
>>>>> expertise.
>>>>>
>>>>> To cut a long story short, we need a sysfs file that allows our
>>>>> userspace tools to notify the kernel of hotplug events coming from
>>>>> the management console (which talks to userspace daemons using a
>>>>> proprietary protocol) to "initiate" the hotplug operations, which in
>>>>> turn get dispatched internally in the kernel to the right subsystem
>>>>> (memory, cpu, pci, ...) based on the resource type.
>>>>>
>>>>> On IRC, Greg suggested /sys/firmware and /sys/hypervisor which both
>>>>> look like a reasonable option to me, probably better than dlpar...
>>>>
>>>> For PowerVM systems we need this sysfs file to deliver what is
>>>> essentially a binary blob (specifically a rtas error log) to the
>>>> kernel. The current patch set is creating /sys/kernel/dlpar. As Ben
>>>> mentioned we would like your input on what would be the proper place
>>>> to create this file.
>>>
>>> And what is the kernel supposed to do with such a binary blob? Parse
>>> it? Or pass it to something else?
>>
>> The kernel will parse it and perform the requested hotplug operation.
>
> Oh I was hoping you would not say that :(
Heh! hint taken. I won't cc you.
>
> Seriously? Parsing binary blobs from userspace? Don't do that, you
> know better.
Yes, not ideal. One thing to note here is that the code to parse these
binary blobs already exists in the kernel for powerpc. The binary blob
we need to pass in is the same format as rtas error logs that we can be
handed by firmware on powerpc systems.
-Nathan
next prev parent reply other threads:[~2014-12-08 15:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-27 3:12 Right location in sysfs for dlpar file Benjamin Herrenschmidt
2014-12-01 15:41 ` Nathan Fontenot
2014-12-02 4:26 ` Greg KH
2014-12-04 3:07 ` Nathan Fontenot
2014-12-04 4:31 ` Greg KH
2014-12-08 15:21 ` Nathan Fontenot [this message]
2014-12-08 20:08 ` Benjamin Herrenschmidt
2014-12-02 5:09 ` Michael Ellerman
2014-12-04 3:06 ` Nathan Fontenot
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=5485C1F9.9000401@linux.vnet.ibm.com \
--to=nfont@linux.vnet.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).