change other SMBERROR() calls to SMBIODEBUG() - they are only useful when
debugging, and avoids spamming console/system logs with messages triggerable
from userland
so that iod wouldn't pause when the reply comes fast enough
to catch iod between smb_iod_recvall() and tsleep()
this gives nice performance boost for workloads with many synchronously
submitted transactions, like ls -lR
iod now doesn't need to wakeup periodically, so don't use any timeout
for its tsleep(); also use higher priority PSOCK instead of PWAIT
of iod calling smb_iod_sendall()
g/c now unneeded request timeout expire check from smb_iod_sendall()
make it possible to override default request timeout - set timeout
value in smb_rq_init() to default value, caller can adjust the value
before calling smb_iod_sendrq(); value <=0 means no timeout
do not inline smb_iod_rqprocessed()
make smb_iod_sendall(), smb_iod_recvall() 'return' void - the return value
was always ignored
smb_iod_recvall(): turn an programming error condition check to KASSERT()
smb_iod_main(): g/c unused 'error' local
smb_iod_thread(): iod_p is assigned in smb_iod_create(), so just KASSERT()
it's correct here
iod_sleeptimo is set to same value always, so use the value directly
and #if 0 iod_sleeptimo
add one smb_iod_wakeup() in smb_iod_sendrq()
XXX unfortunately iod thread still must wakeup periodically to check
XXX for arriving replies - command latency might be improved if this could
XXX be avoided
sent out, use mono_time instead microtime(), and simplify computation
in smb_iod_sendall(). Also count the timout once, not twice as previous code.
#if 0 iod->iod_lastrqsent, it was write-only
malloc types into a structure, a pointer to which is passed around,
instead of an int constant. Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
- implement SIMPLEQ_REMOVE(head, elm, type, field). whilst it's O(n),
this mirrors the functionality of SLIST_REMOVE() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups