On Thu, 2010-07-01 at 17:07 +0100, Jeremy Fitzhardinge wrote:
> On 07/01/2010 05:47 PM, Ian Campbell wrote:
> >> Hm, I hadn't meant to commit that properly. I had it locally and
> >> accidentally pushed it out.
> >>
> >> I only did that patch as an RFC in response to an issue alluded to by
> >> Dongxiao (or was it you?) about things not being fully initialized by
> >> the time the async code starts. Is this a real issue, and if so, what's
> >> the correct fix?
> >>
> > I don't think there is an actual current issue, just a potential one
> > since we are relying on data structures being zeroed rather than
> > properly initialised to keep the async code from running off into the
> > weeds, it just seemed a little fragile this way.
> >
> > Originally I said:
> >
> >>> The crash is in one of the calls to list_move_tail and I think it is
> >>> because netbk->pending_inuse_head not being initialised until after
> >>> the
> >>> threads and/or tasklets are created (I was running in threaded mode).
> >>> Perhaps even though we are now zeroing the netbk struct those fields
> >>> should still be initialised before kicking off any potentially
> >>> asynchronous tasks?
> >>>
> > this specific issue was fixed by zeroing the netbk array as it is
> > allocated, I just thought we could make things more robust by not
> > triggering the async code until everything was fully setup.
> >
>
> It would only affect system startup time, not domain creation?
I think so, it's a race during netback_init.
netbk_action_thread can reference &netbk->net_schedule_list (via
tx_work_todo) before it is initialised. It is now zeroed which is
probably safe but not exactly robust.
> I was looking at it because Stefano was having fairly consistent crashes
> on domain creation, and it looked like sort-of-racy sy
I think this particular race would be long gone by the time you started
a domain. Although I suppose having the thread spinning doing
potentially arbitrary things for a small window during netback_init
could leave things in a fragile enough state that it might fall apart
when you started a domain. I'm not convinced though.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|