[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1FB5E1D5CA062146B38059374562DF7266B8951F@TK5EX14MBXC128.redmond.corp.microsoft.com>
Date: Wed, 19 May 2010 22:12:51 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: Greg KH <gregkh@...e.de>
CC: "'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
"'devel@...verdev.osuosl.org'" <devel@...verdev.osuosl.org>,
"'virtualization@...ts.osdl.org'" <virtualization@...ts.osdl.org>,
"Hank Janssen" <hjanssen@...rosoft.com>
Subject: RE: [PATCH 1/2] staging: hv: Fix race condition in hv_utils module
initialization.
> > Actually, we already assign a default callback function,
> chn_cb_negotiate(),
> > when the channels are opened in vmbus module. It's a real function
> and can
> > handle common negotiation messages.
>
> Then why don't you use it here?
When vmbus is loaded and channel is offered from HyperV host, the default
callback function, chn_cb_negotiate(), is assigned to the function ptr, and
used to do basic responses of negotiation messages.
After hv_utils modules is loaded the callback function ptr is overridden by
a specialized function in hv_utils module, and handles each feature (shutdown,
timesync, etc.) differently.
> I still think there's a real problem somewhere else in the architecture
> if such a sleep is necessary...
>
> Is the issue that the modprobe of the hv_vmbus can return before the
> bus
> is really all set up and ready to go? If so, just fix that, then you
> will not need any "sleep" calls anywhere, right?
After vmbus is loaded, the channel offering will come from the host, then
it initializes the channel. The channel offering can happen a little later
after vmbus_init() is done and modprobe returns. So I think we should let
vmbus_init function wait(sleep) until all channel offerings are received before
returning. This will ensure all channels are ready before modprobe returns.
Thanks,
- Haiyang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists