public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>,
	devel@linuxdriverproject.org,
	Haiyang Zhang <haiyangz@microsoft.com>,
	linux-kernel@vger.kernel.org, Dexuan Cui <decui@microsoft.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-api@vger.kernel.org
Subject: Re: [PATCH RFC 0/3] Drivers: hv: utils: re-implement the kernel/userspace communication layer
Date: Mon, 02 Mar 2015 14:33:20 +0100	[thread overview]
Message-ID: <87a8zvjzhb.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20150227210744.GA11904@potion.brq.redhat.com> ("Radim \=\?utf-8\?B\?S3LEjW3DocWZIidz\?\= message of "Fri, 27 Feb 2015 22:07:44 +0100")

Radim Krčmář <rkrcmar@redhat.com> writes:

> 2015-02-27 17:14+0100, Vitaly Kuznetsov:
>> This series converts kvp/vss daemons to use misc char devices instead of
>> netlink for userspace/kernel communication and then updates fcopy to be
>> consistent with kvp/vss.
>> 
>> Userspace/kernel communication via netlink has a number of issues:
>> - It is hard for userspace to figure out if the kernel part was loaded or not
>>   and this fact can change as there is a way to enable/disable the service from
>>   host side.
>
> (Hm, this should be just a message to the userspace daemon, but netlink
>  probably makes it complicated anyway.)
>
>>              Racy daemon startup is also a problem.
>
> (Is it significantly worse than what we need to protect devices?)
>
>> - When the userspace daemon restarts/dies kernel part doesn't receive a
>>   notification.
>
> (True, we could use a other-side-closed callback.)

With normal devices we can use e.g. udev/systemd machinery to start/stop
service on device hotplug/hotunplug (and these devices are actually
pluggable/unpluggable from host side) without any special code in
kernel/userspace parts and I'd like to use that.

>
>> - Netlink communication is not stable under heavy load.
>
> (The message order changes?)
>

It is a disaster if it does (the whole transaction will get lost). Same
if any of these messages gets lost.

>> RFC: I'm a bit puzzled on how to split commits 1 and 2 avoiding breakages.
>
> Split the userspace part -- it won't break bisects.
>

Sure if it simplifies the review.

> And then, you could refactor drivers first ... the way we communicate
> with userspace should have little impact on what the rest does (or how).
> At first sight, there are three units, apart from glue,
>  1) communication with host
>  2) communication with userspace
>  3) repacking of data between first two
>
> With an API for userspace communication, the amount of code to replace
> netlink could be lower and resulting patches definitely easier to
> review.  (And with extra work, both ABIs could even live side-by-side ;)

Ok, thanks!

-- 
  Vitaly

  reply	other threads:[~2015-03-02 13:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 16:14 [PATCH RFC 0/3] Drivers: hv: utils: re-implement the kernel/userspace communication layer Vitaly Kuznetsov
2015-02-27 16:14 ` [PATCH RFC 1/3] Drivers: hv: kvp: convert userspace/kernel communication to using char device Vitaly Kuznetsov
2015-02-27 20:27   ` Radim Krčmář
2015-03-03  9:53     ` Vitaly Kuznetsov
2015-03-03 19:47       ` Radim Krčmář
2015-02-27 16:14 ` [PATCH RFC 2/3] Drivers: hv: vss: " Vitaly Kuznetsov
2015-02-27 16:14 ` [PATCH RFC 3/3] Drivers: hv: fcopy: make it consistent with vss/kvp Vitaly Kuznetsov
2015-02-27 21:07 ` [PATCH RFC 0/3] Drivers: hv: utils: re-implement the kernel/userspace communication layer Radim Krčmář
2015-03-02 13:33   ` Vitaly Kuznetsov [this message]
2015-03-02  2:11 ` KY Srinivasan
2015-03-02 13:37   ` Vitaly Kuznetsov

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=87a8zvjzhb.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=decui@microsoft.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    /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