Hi,

Regarding the Microsoft own rescan.exe, as found at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;308669

I have found this very utility and particulary the
CM_Reenumerate_DevNode() call, which is used within to do actual bus
rescan, are behaving as if there is some caching involved.

Test as follows:
1. run rescan over and over, from command line, as fast as you can (or
write a shell script to do it)
2. Observe how long does it take, each time, for rescan to finish

You will see the very 1st rescan does take some time to finish while
all subsequent are returning IMMEDIATELLY.
Then again, after 30 or some iterations, rescan AGAIN takes some time,
as if it actually doing something. I made no device additions in that
time. Machine was idle. Test is reproducible.

Note I did above test with both NORMAL and CM_REENUMERATE_SYNCHRONOUS
setting for CM_Reenumerate_DevNode(), same behaviour.

Any thoughts on this?

Thanks,

Robert

Re: scsi rescan caching by Mark

Mark
Tue Oct 11 19:32:47 CDT 2005

robert.simac@gmail.com wrote:
> Hi,
>
> Regarding the Microsoft own rescan.exe, as found at:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;308669
>
> I have found this very utility and particulary the
> CM_Reenumerate_DevNode() call, which is used within to do actual bus
> rescan, are behaving as if there is some caching involved.
>
> Test as follows:
> 1. run rescan over and over, from command line, as fast as you can (or
> write a shell script to do it)
> 2. Observe how long does it take, each time, for rescan to finish
>
> You will see the very 1st rescan does take some time to finish while
> all subsequent are returning IMMEDIATELLY.
> Then again, after 30 or some iterations, rescan AGAIN takes some time,
> as if it actually doing something. I made no device additions in that
> time. Machine was idle. Test is reproducible.
>
> Note I did above test with both NORMAL and CM_REENUMERATE_SYNCHRONOUS
> setting for CM_Reenumerate_DevNode(), same behaviour.
>
> Any thoughts on this?
>
> Thanks,
>
> Robert
>
Yes - there is a timer that returns the last scan data until it expires,
in which case it allows another scan. Scsi scans are hideously slow and
disturb every device on the shared scsi bus. Of course this also means
that there can be a considerable lag between device insertion/removal
and pnp actions related to device insertion/removal.Oh well... its scsi.


--

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

Re: scsi rescan caching by Bob

Bob
Wed Oct 12 09:48:08 CDT 2005

Mark,

Thanks for detailed answer.

Since I forgot to crosspost this message, pls take a look at other,
maybe more appropriate group for my follow up question.
http://groups.google.com/group/microsoft.public.storage/browse_frm/thread/da5b5cb85ebd422d/8ae26c4cae8996ae#8ae26c4cae8996ae

Thanks,

Robert