下面的Log是debug时候得到的调用过程:
0xd405de9c SDMEMORY!SMC_IOControl(unsigned long 0xd3f20f90, unsigned long 0x00075c08, unsigned char * 0xd3b78190, unsigned long 0x0000001c, unsigned char * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764) sdmemmain.cpp line 584
0xd405e070 DEVMGR!DM_DevDeviceIoControl(fsopendev_t * 0x00000000, unsigned long 0x00000000, void * 0xd405e764, unsigned long 0x00000000, void * 0x00000000, unsigned long 0x8c079bc0, unsigned long * 0x000005c9, _OVERLAPPED * 0x8ef79e50) devfile.c line 453 + 76 bytes
0xd405e0d8 KERNEL!MDCallKernelHAPI + 60 bytes
0xd405e128 KERNEL!NKHandleCall(unsigned long 0xd3b79da0, _DHCALL_STRUCT * 0xd405e138) apicall.c line 1983 + 40 bytes
0xd405e1a4 K.COREDLL!DirectHandleCall(unsigned long 0x00000007) coredll.cpp line 73 + 24 bytes
0xd405e1cc K.COREDLL!xxx_DeviceIoControl(void * 0x05c90003, unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764, _OVERLAPPED * 0x00000000) twinbase.cpp line 32 + 84 bytes
0xd405e22c MSPART!DoDiskIoControl(tagDriverState * 0xd3f22250, unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764, _OVERLAPPED * 0x00000000) part.h line 148 + 96 bytes
0xd405e270 MSPART!ReadPartition(unsigned long 0xd3f224f0, unsigned char * 0xd3b78190, unsigned long 0x0000001c, unsigned char * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764) part.cpp line 619 + 64 bytes
0xd405e2f0 MSPART!PD_DeviceIoControl(unsigned long 0xd3f224f0, unsigned long 0x00075c08, unsigned char * 0xd3b78190, unsigned long 0x0000001c, unsigned char * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764) part.cpp line 791 + 36 bytes
0xd405e398 FSDMGR!PartitionDriver_t::DeviceIoControl(unsigned long 0x00000000, unsigned long 0xd405e764, void * 0xc0d4b070, unsigned long 0x00000001, void * 0xd405e3c0, unsigned long 0xc0d4ade4, unsigned long * 0xd3f212d0) partition.hpp line 277 + 60 bytes
0xd405e3e8 FSDMGR!PartitionDisk_t::DiskIoControl(unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764, _OVERLAPPED * 0x00000000) partition.cpp line 216 + 68 bytes
0xd405e43c FSDMGR!StoreDisk_t::StoreIoControl(PartitionDisk_t * 0xd3f22590, unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764) storedisk.cpp line 1242 + 72 bytes
0xd405e498 FSDMGR!STG_DeviceIoControl(StoreHandle_t * 0x0000001c, unsigned long 0x00000000, void * 0x00000000, unsigned long 0xd405e764, void * 0xd3b78190, unsigned long 0x00000001, unsigned long * 0x00000000, _OVERLAPPED * 0x8fca08b8) stgapi.cpp line 697 + 68 bytes
0xd405e590 KERNEL!MDCallKernelHAPI + 60 bytes
0xd405e5e0 KERNEL!NKHandleCall(unsigned long 0x00000001, _DHCALL_STRUCT * 0x00000000) apicall.c line 1983 + 40 bytes
0xd405e65c K.COREDLL!DirectHandleCall(unsigned long 0x00000007) coredll.cpp line 73 + 24 bytes
0xd405e684 K.COREDLL!xxx_DeviceIoControl(void * 0x05cc0003, unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764, _OVERLAPPED * 0x00000000) twinbase.cpp line 32 + 84 bytes
0xd405e6e4 FSDMGR!FSDMGR_DiskIoControl(LogicalDisk_t * 0xd3f22590, unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764, _OVERLAPPED * 0x00000000) fsdmgrapi.cpp line 623 + 52 bytes
0xd405e748 FSDMGR!ReadWriteDiskEx(_FSD_SCATTER_GATHER_INFO * 0xd405e7a0, _FSD_SCATTER_GATHER_RESULTS * 0x00000000, unsigned long 0x00075c08) fsdmgrapi.cpp line 748 + 76 bytes
0xd405e7a0 FSDMGR!FSDMGR_ReadDisk(LogicalDisk_t * 0xd3f22590, unsigned long 0x00484dc8, unsigned long 0x00000008, unsigned char * 0xd4061000, unsigned long 0x00001000) fsdmgrapi.cpp line 788 + 16 bytes
0xd405e7e8 EXFAT!Disk::ReadWriteDisk(unsigned long 0x00000009, unsigned long 0x00484dc8, unsigned long 0x00000008, unsigned char * 0xd4061000) disk.cpp line 179 + 48 bytes
0xd405e83c EXFAT!Volume::ReadVolume(unsigned long 0x00484dc8, unsigned long 0x00000008, void * 0xd4061000, unsigned long 0x00000009) volume.cpp line 1370 + 36 bytes
0xd405e864 EXFAT!Stream::ReadStreamData(unsigned __int64 0xd405e888d405e88c, void * 0x00000000, unsigned long 0x00000000, unsigned long 0x00000000, unsigned long * 0x00001000) stream.cpp line 324 + 36 bytes
0xd405e928 EXFAT!File::ReadFileData(unsigned __int64 0x0000000000001000, void * 0xd4061000, unsigned long 0x00001000, unsigned long * 0xd405ea70) file.cpp line 896 + 52 bytes
0xd405ea2c EXFAT!File::ReadFile(unsigned __int64 0x0000000000001000, void * 0xd4061000, unsigned long 0x00001000, unsigned long * 0xd405ea70) file.cpp line 134 + 36 bytes
0xd405ea60 EXFAT!FAT_ReadFileWithSeek(FileHandle * 0xd0675a90, void * 0xd4061000, unsigned long 0x00001000, unsigned long * 0xd405ec08, _OVERLAPPED * 0x00000000, unsigned long 0x00001000, unsigned long 0x00000000) api.cpp line 206 + 44 bytes
0xd405eab0 CACHEFILT!FilterHook_t::ReadFileWithSeek(unsigned long 0x00001000, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0x00000040, _OVERLAPPED * 0xae1c2000, unsigned long 0x054f0006, unsigned long 0xd0ab0afc) fsdmgr.h line 515 + 60 bytes
0xd405eafc CACHEFILT!FSSharedFileMap_t::UncachedReadWriteWithSeek(void * 0xd4061000, unsigned long 0x00001000, unsigned long * 0xd405ec08, unsigned long 0x00001000, unsigned long 0x00000000, int 0x00000000) fssharedfilemap_uncached.cpp line 114 + 68 bytes
0xd405eba8 CACHEFILT!FCFILT_ReadWriteData(unsigned long 0xd0ab0c10, unsigned char * 0xd4061000, unsigned long 0x00001000, unsigned long * 0xd405ec08, const _ULARGE_INTEGER * 0xd405eccc, int 0x00000000) fssharedfilemap_cached.cpp line 152 + 56 bytes
0xd405ebec KERNEL!MAPPageInPage(_FSMAP * 0x8e0023a8, _ULARGE_INTEGER * 0xd405eccc, unsigned char * 0xd4061000) mapfile.c line 1599 + 56 bytes
0xd405ecac KERNEL!PageFromMapper(_PROCESS * 0x8c863bc0, unsigned long 0xd2a71000, int 0x00000000) mapfile.c line 1762 + 16 bytes
0xd405ed5c KERNEL!VMProcessPageFault(_PROCESS * 0x8c863bc0, unsigned long 0xd2a71a00, int 0x00000000) vm.c line 1207 + 24 bytes
0xd405edcc KERNEL!MDHandleHardwareException(_CALLSTACK * 0xd405f08c, _EXCEPTION_RECORD * 0xd405f03c, _CONTEXT * 0xd405ef48, unsigned long * 0xd405ee78) mdarm.c line 824 + 36 bytes
0xd405ee5c KERNEL!ExceptionDispatch(_EXCEPTION_RECORD * 0xd405f03c, _CONTEXT * 0xd405ef48) exdsptch.c line 930 + 20 bytes
0xd405ef48 KERNEL!CaptureContext + 44 bytes
=====================================================================================================================
从上面的调用过程中可以看出在:MAPPageInPage中使用了每次读取一个Page的操作,即一次4K。
这个操作就造成了SD卡的读取速度比较慢。