-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
async io for blk_posix module #5
Comments
Yes, this fails on my machine. blk 1!! p[0]=0xff |
Did it pass on the NVMe block device? |
@dwaddington cannot pass in block_nvme(using uio-generic in qemu) |
The log of block_nvme(using uio): root@node0:/home/lifeng/comanche/src/components/block/nvme/unit_test# ./blocknvme-test1 00:09.0
[==========] Running 4 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 4 tests from Block_nvme_test
[ RUN ] Block_nvme_test.InstantiateBlockDevice
[LOG]:Load path: libcomanche-blknvme.so
[LOG]:Using API defined memory limit 48 MB
[LOG]:CPU count: 4
EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !
# DPDK EAL set maps & initialized OK.
# DPDK EAL initialized ok (--proc-type=primary).
Creating 'Block_device_factory' component.
[LOG]:Block_device factory loaded OK.
[LOG]:Ring_buffer_base [rbuf-0]: allocated at 0x7f20be4ebd00 size=131072
[LOG]:Nvme_device (IO threads):0x71bfe0
[LOG]:Nvme_device: descriptor ring size 131072
[LOG]:Looking for NVMe Controller (00:09.0)...
[LOG]:Using device: 0000:00:09.0
nvme_qpair.c: 112:nvme_admin_qpair_print_command: *NOTICE*: SET FEATURES (09) sqid:0 cid:63 nsid:0 cdw10:0000000b cdw11:0000001f
nvme_qpair.c: 283:nvme_qpair_print_completion: *NOTICE*: INVALID FIELD (00/02) sqid:0 cid:63 cdw0:0 sqhd:0005 p:1 m:0 dnr:1
nvme_ctrlr.c:1030:nvme_ctrlr_configure_aer: *ERROR*: nvme_ctrlr_cmd_set_async_event_config failed!
nvme_qpair.c: 112:nvme_admin_qpair_print_command: *NOTICE*: GET LOG PAGE (02) sqid:0 cid:63 nsid:ffffffff cdw10:007f00c0 cdw11:00000000
nvme_qpair.c: 283:nvme_qpair_print_completion: *NOTICE*: INVALID OPCODE (00/01) sqid:0 cid:63 cdw0:0 sqhd:0006 p:1 m:0 dnr:1
nvme_ctrlr.c: 360:nvme_ctrlr_set_intel_support_log_pages: *ERROR*: nvme_ctrlr_cmd_get_log_page failed!
Attaching to NVMe device 0000:00:09.0::
Using controller QEMU NVMe Ctrl (1236 ) with 1 namespaces
[LOG]:Probe complete (0x7f20be4e90c0,0x7f20be4dce40)
[ctlr-info] sqes: min(64) max(64)
[ctlr-info] cqes: min(16) max(16)
[ctlr-info] awun: 1
[ctlr-info] awupf: 1
[ctlr-info] acwu: 0
[ctlr-info] fused op: N
[ctlr-info] metadata size: 0
[ctlr-info] max IO size: 2072576
[ns-info] extended LBA support: N
[ns-info] metadata transfer as extended LBA: N
[ns-info] metadata transfer as separate pointer: N
[ns-info] nsze: 4194304
[ns-info] ncap: 4194304
[LOG]:Launching IO thread: 1
[LOG]:allocating queue [0x7f20be4dcd90] (0) on namespace:1 block size=512
[LOG]:created new IO queue: namespace=1 max_lba=4194304
NVMe queue IO thread (core 1) entered.
[LOG]:Launching IO thread: 2
[LOG]:registering queue message ring (core=1) : 0x7f20be18fe00
[LOG]:allocating queue [0x7f20be393f50] (1) on namespace:1 block size=512
[LOG]:created new IO queue: namespace=1 max_lba=4194304
NVMe queue IO thread (core 2) entered.
[LOG]:registering queue message ring (core=2) : 0x7f20be084e00
[LOG]:unloading component (0x711510)
nvme-based block-layer component loaded OK.
[ OK ] Block_nvme_test.InstantiateBlockDevice (570 ms)
[ RUN ] Block_nvme_test.AsyncSwap
[WRN]: eeek on blk 1!! p[0]=0xff
/home/lifeng/comanche/src/components/block/nvme/unit_test/test1.cpp:115: Failure
Value of: 0
Actual: false
Expected: true
[ FAILED ] Block_nvme_test.AsyncSwap (1 ms) |
explained and fixed in this pull request: (#6) |
I added the following test function in the "src/components/block/posix/unit_test/test1.cpp"(before the "BasicAsync" test).
It uses one 4k page(mem) as a buffer and first writes 0xcc into each byte of the first block,and 0xff into each byte of the second block.
It's more like a stress test where the values are frequently read in and written back between one memory page and two logical blocks. (it also represents one extreme case in Pager_Simple: there is only once physical page and two blocks for swapping)
But the test cannot pass in my qemu vm.
Could you help to confirm it in your side?
Thanks
The first byte of block 1 should be read as 0xcc, but 0xff is read instead:
The text was updated successfully, but these errors were encountered: