mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Dexuan Cui <decui@microsoft.com>
Cc: "Vitaly Kuznetsov" <vkuznets@redhat.com>,
	"KY Srinivasan" <kys@microsoft.com>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"Haiyang Zhang" <haiyangz@microsoft.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Dan Carpenter" <dan.carpenter@oracle.com>
Subject: RE: [PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer
Date: Thu, 29 Jan 2015 10:17:18 +0008	[thread overview]
Message-ID: <1422526158.14137.2@smtp.corp.redhat.com> (raw)
In-Reply-To: <F792CF86EFE20D4AB8064279AFBA51C61EA9510B@SIXPRD3002MB028.064d.mgd.msft.net >



On Wed, Jan 28, 2015 at 8:51 PM, Dexuan Cui <decui@microsoft.com> wrote:
>>  -----Original Message-----
>>  From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
>>  Sent: Wednesday, January 28, 2015 20:09 PM
>>  To: Dexuan Cui
>>  Cc: KY Srinivasan; devel@linuxdriverproject.org; Haiyang Zhang; 
>> linux-
>>  kernel@vger.kernel.org; Jason Wang; Radim Krčmář; Dan Carpenter
>>  Subject: Re: [PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and 
>> Rescind
>>  offer
>>  
>>  Dexuan Cui <decui@microsoft.com> writes:
>>  
>>  >> -----Original Message-----
>>  >> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
>>  >> Sent: Tuesday, January 20, 2015 23:45 PM
>>  >> To: KY Srinivasan; devel@linuxdriverproject.org
>>  >> Cc: Haiyang Zhang; linux-kernel@vger.kernel.org; Dexuan Cui; 
>> Jason Wang;
>>  >> Radim Krčmář; Dan Carpenter
>>  >> Subject: [PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and 
>> Rescind
>>  offer
>>  ...
>>  >
>>  > Hi Vitaly and all,
>>  > I have 2 questions:
>>  > In vmbus_process_offer(),  in the cases of "goto err_free_chan",
>>  > should we consider the possibility a rescind message could be 
>> pending for
>>  > the new channel?
>>  > In the cases,  because we don't run
>>  > "INIT_WORK(&newchannel->work, vmbus_process_rescind_offer); ",
>>  > vmbus_onoffer_rescind() will do nothing and as a result,
>>  > vmbus_process_rescind_offer() won't be invoked.
>>  
>>  Yes, but processing the rescind offer results in freeing the channel
>>  (and this processing supposes the channel wasn't freed before) so
>>  there is no difference... or is it?
>>  
>>  >
>>  > Question 2: in vmbus_process_offer(), in the case
>>  > vmbus_device_register() fails, we'll run
>>  > "list_del(&newchannel->listentry);" -- just after this line,
>>  >  what will happen at this time if relid2channel() returns NULL
>>  > in vmbus_onoffer_rescind()?
>>  >
>>  > I think we'll lose the rescind message.
>>  >
>>  
>>  Yes, but same logic applies - we already freed the channes so no 
>> rescind
>>  proccessing required.
> free_channel() and vmbus_process_rescind_offer() are different, 
> because
>  the latter does more work, e.g., sending the host a message 
> CHANNELMSG_RELID_RELEASED.
> 
> In the cases of "goto err_free_chan" + "a pending rescind message",
> the host may expect the message CHANNELMSG_RELID_RELEASED and
> could reoffer the channel once the message is received.
> 
> It would be better if the VM doesn't lose the rescind message here. 
> :-)

It's interesting that rescind needs a ack from guest. But looks like 
the offer does not need it? Is there a spec for this for us for 
reference?

Thanks
> 
> 
>>   If we still need to do something we need to
>>  add support for already freed channel to the rescind offer 
>> processing path.
>>  
> 
> Thanks,
> -- Dexuan


  parent reply	other threads:[~2015-01-29 10:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 15:45 [PATCH v3 0/3] Drivers: hv: vmbus: protect Offer/Rescind offer processing Vitaly Kuznetsov
2015-01-20 15:45 ` [PATCH v3 1/3] Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer() Vitaly Kuznetsov
2015-01-20 18:33   ` KY Srinivasan
2015-01-21  3:10   ` Jason Wang
2015-01-20 15:45 ` [PATCH v3 2/3] Drivers: hv: rename sc_lock to the more generic lock Vitaly Kuznetsov
2015-01-20 18:33   ` KY Srinivasan
2015-01-21  3:11   ` Jason Wang
2015-01-20 15:45 ` [PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer Vitaly Kuznetsov
2015-01-20 18:34   ` KY Srinivasan
2015-01-21  3:25   ` Jason Wang
2015-01-28 11:57   ` Dexuan Cui
2015-01-28 12:08     ` Vitaly Kuznetsov
2015-01-28 12:51       ` Dexuan Cui
2015-01-28 13:09         ` Vitaly Kuznetsov
2015-01-29 10:10           ` Jason Wang
     [not found]         ` <F792CF86EFE20D4AB8064279AFBA51C61EA9510B@SIXPRD3002MB028.064d.mgd.msft.net >
2015-01-29 10:09           ` Jason Wang [this message]
2015-01-30  4:21             ` Dexuan Cui
2015-02-01 18:17               ` KY Srinivasan
     [not found]     ` <F792CF86EFE20D4AB8064279AFBA51C61EA94FB7@SIXPRD3002MB028.064d.mgd.msft.net >
2015-01-29 10:07       ` Jason Wang
2015-02-01 18:12         ` KY Srinivasan

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=1422526158.14137.2@smtp.corp.redhat.com \
    --to=jasowang@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=decui@microsoft.com \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=vkuznets@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

Powered by JetHome