Bug 3310 - [Anolis8][kernel-debug ck-5.10][aarch64][内部版nightly] blktests测试套block/009测试fail
Summary: [Anolis8][kernel-debug ck-5.10][aarch64][内部版nightly] blktests测试套block/009测试fail
Status: RESOLVED WONTFIX
Alias: None
Product: Anolis OS 8
Classification: Anolis OS
Component: kernel - anck-5.10 (show other bugs) kernel - anck-5.10
Version: 8.6
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: ZiyangZhang
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-01 10:48 UTC by yunhe123
Modified: 2022-12-08 10:20 UTC (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yunhe123 alibaba_cloud_group 2022-12-01 10:48:21 UTC
Description of problem:
Anolis8 kernel-debug ck-5.10 aarch64环境,内部版nightly测试,blktests测试套block/009测试fail,日志如下:

[root@nu4f13164 blktests]# ./check tests/block/009
block/009 (check page-cache coherency after BLKDISCARD)      [failed]
    runtime  1.832s  ...  1.835s
    --- tests/block/009.out     2022-11-30 22:55:52.038409410 +0800
    +++ /tmp/tone/run/blktests/results/nodev/block/009.out.bad  2022-12-01 10:34:20.142166310 +0800
    @@ -1,6 +1,8 @@
     Running block/009
     0000000 0000 0000 0000 0000 0000 0000 0000 0000
     *
    +1fff000 aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa
    +*
     2000000
     0000000 0000 0000 0000 0000 0000 0000 0000 0000
    ...
    

Version-Release number of selected component (if applicable):


How reproducible:
必现

Steps to Reproduce:
提前做好磁盘分区:
disk1=nvme0n1p1
disk2=nvme0n1p2
mkdir -p /fs/$disk1 /fs/$disk2
export TEST_DIR=/fs/$disk1
export TEST_DEV=/dev/$disk1
export SCRATCH_MNT=/fs/$disk2
export SCRATCH_DEV=/dev/$disk2

git clone https://github.com/osandov/blktests.git
cd blktests/
make
make install prefix=./run_blktests
cd ./run_blktests
export TEST_DEVS=/dev/nvme0n1p1
cd blktests/
./check block/009

测试环境信息:
cat /etc/os-release
NAME="Anolis OS"
VERSION="8.6"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.6"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.6"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

内核信息:
uname -r
5.10.134-470.git.62eaa9d58.an8.aarch64+debug

cpu信息:
lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              96
On-line CPU(s) list: 0-95
Thread(s) per core:  1
Core(s) per socket:  48
Socket(s):           2
NUMA node(s):        4
Vendor ID:           HiSilicon
BIOS Vendor ID:      HiSilicon
Model:               0
Model name:          Kunpeng-920
BIOS Model name:     HUAWEI Kunpeng 920 5250
Stepping:            0x1
CPU max MHz:         2600.0000
CPU min MHz:         200.0000
BogoMIPS:            200.00
L1d cache:           64K
L1i cache:           64K
L2 cache:            512K
L3 cache:            24576K
NUMA node0 CPU(s):   0-23
NUMA node1 CPU(s):   24-47
NUMA node2 CPU(s):   48-71
NUMA node3 CPU(s):   72-95
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm

内存信息:
free -h
              total        used        free      shared  buff/cache   available
Mem:          657Gi        10Gi       646Gi        10Mi       1.2Gi       645Gi
Swap:         2.0Gi          0B       2.0Gi


Actual results:
用例fail

Expected results:
用例pass

Additional info:
Comment 2 ZiyangZhang alibaba_cloud_group 2022-12-02 17:59:50 UTC
Shin'ichiro Kawasaki said:

Unfortunately, I still observe block/009 failure on the kernel version 5.15.0,
which includes this fix patch. I found that BLKDISCARD ioctl has the same
problem. I modified blk_ioctl_discard() in same manner, and the block/009
failure goes away. I also found that BLKZEROOUT has the same issue. I will
post two patches for these ioctl. Your reviews will be appreciated.

Patches:
https://lore.kernel.org/all/20211109104723.835533-1-shinichiro.kawasaki@wdc.com/
Comment 3 ZiyangZhang alibaba_cloud_group 2022-12-07 18:35:19 UTC
https://patchwork.kernel.org/project/linux-fsdevel/patch/20210712165609.13215-3-jack@suse.cz/

filemap_invalidate_lock_shared 在5.15引入内核,anck 5.10不包括该功能,需要进一步评估回合的需要。
Comment 4 ZiyangZhang alibaba_cloud_group 2022-12-08 10:20:20 UTC
需要回合的补丁在5.15,数量多,且涉及page cache读写逻辑,风险较大。决定不合入,问题关闭。
Comment 5 ZiyangZhang alibaba_cloud_group 2022-12-08 10:20:55 UTC
closed