http://defect.opensolaris.org/bz/show_bug.cgi?id=12633
Summary: "nwamadm list" takes > 30s to respond during wifi scan
connect
Classification: Development
Product: nwam
Version: RC5
Platform: ANY/Generic
OS/Version: All
Status: ACCEPTED
Severity: normal
Priority: P4
Component: ON daemon
AssignedTo: alan.maguire at sun.com
ReportedBy: alan.maguire at sun.com
QAContact: nwam-dev at opensolaris.org
--- Comment #0 from amaguire <alan.maguire at sun.com> 2009-11-12 12:31:23 UTC
---
"nwamadm list" collates state from the NCUs (of the active NCP), ENMs and
locations and once it has gathered this info, it is displayed. However, during
wifi scans and connects, "nwamadm list" takes a long time to respond - for the
length of time it takes for the scan/connect to complete. The reason is the
object lock of the link NCU is held across the scan/connect request, so as
consequence the retrieval of state for that NCU within nwamd (which currently
also requires the object lock) is blocked. Since "nwamadm list" doesn't display
state until all state info has been retrieved (rightly I think), it takes a
long time to respond. Periodic WiFi scans mean this is not just a problem for
initial WiFi connect, but a more general usability issue with nwamadm.
Solution is to add a state retrieval function, nwamd_object_get_state(), which
locks the object list as opposed to the individual object to retrieve object
state and as a result does not need to wait for the object lock. An object
cannot be removed from the object list until it has the object list lock, so
this is safe to do I believe.
The ideal thing would obviously be not to hold the object lock across
scan/connects, but since these functions utilize data stored in the per-object
link structure, it would be complex to go down that road at this stage I think.
With this change in place, "nwamadm list" always responds immediately. This is
much better because it's very likely that the times users will be wondering
what NWAM is doing, and issuing "nwamadm list -x" are when it is in the middle
of scanning or connecting.
--
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.