From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5656D44 for ; Mon, 4 Dec 2023 23:32:11 -0800 (PST) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VxtSpGf_1701761527; Received: from 30.97.48.243(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VxtSpGf_1701761527) by smtp.aliyun-inc.com; Tue, 05 Dec 2023 15:32:09 +0800 Message-ID: Date: Tue, 5 Dec 2023 15:32:06 +0800 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Weird EROFS data corruption To: Juhyung Park Cc: Gao Xiang , linux-erofs@lists.ozlabs.org, linux-f2fs-devel@lists.sourceforge.net, linux-crypto@vger.kernel.org, Yann Collet References: <5a0e8b44-6feb-b489-cdea-e3be3811804a@linux.alibaba.com> <649a3bc4-58bb-1dc8-85fb-a56e47b3d5c9@linux.alibaba.com> <275f025d-e2f1-eaff-6af1-e909d370cee0@linux.alibaba.com> From: Gao Xiang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Juhyung, On 2023/12/4 11:41, Juhyung Park wrote: ... > >> >> - Could you share the full message about the output of `lscpu`? > > Sure: > > Architecture: x86_64 > CPU op-mode(s): 32-bit, 64-bit > Address sizes: 39 bits physical, 48 bits virtual > Byte Order: Little Endian > CPU(s): 8 > On-line CPU(s) list: 0-7 > Vendor ID: GenuineIntel > BIOS Vendor ID: Intel(R) Corporation > Model name: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz > BIOS Model name: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz None CPU > @ 3.0GHz > BIOS CPU family: 198 > CPU family: 6 > Model: 140 > Thread(s) per core: 2 > Core(s) per socket: 4 > Socket(s): 1 > Stepping: 1 > CPU(s) scaling MHz: 60% > CPU max MHz: 4800.0000 > CPU min MHz: 400.0000 > BogoMIPS: 5990.40 > Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc > a cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss > ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art > arch_perfmon pebs bts rep_good nopl xtopology nonstop_ > tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes6 > 4 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xt > pr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_dead > line_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowp > refetch cpuid_fault epb cat_l2 cdp_l2 ssbd ibrs ibpb st > ibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ > ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid > rdt_a avx512f avx512dq rdseed adx smap avx512ifma clfl > ushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl > xsaveopt xsavec xgetbv1 xsaves split_lock_detect dtherm > ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp > hwp_pkg_req vnmi avx512vbmi umip pku ospke avx512_vbmi > 2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme av > x512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2i Sigh, I've been thinking. Here FSRM is the most significant difference between our environments, could you only try the following diff to see if there's any difference anymore? (without the previous disable patch.) diff --git a/arch/x86/lib/memmove_64.S b/arch/x86/lib/memmove_64.S index 1b60ae81ecd8..1b52a913233c 100644 --- a/arch/x86/lib/memmove_64.S +++ b/arch/x86/lib/memmove_64.S @@ -41,9 +41,7 @@ SYM_FUNC_START(__memmove) #define CHECK_LEN cmp $0x20, %rdx; jb 1f #define MEMMOVE_BYTES movq %rdx, %rcx; rep movsb; RET .Lmemmove_begin_forward: - ALTERNATIVE_2 __stringify(CHECK_LEN), \ - __stringify(CHECK_LEN; MEMMOVE_BYTES), X86_FEATURE_ERMS, \ - __stringify(MEMMOVE_BYTES), X86_FEATURE_FSRM + CHECK_LEN /* * movsq instruction have many startup latency Thanks, Gao Xiang From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8753C4167B for ; Tue, 5 Dec 2023 07:32:29 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Sksgc3rgMz3cVP for ; Tue, 5 Dec 2023 18:32:28 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.alibaba.com (client-ip=115.124.30.99; helo=out30-99.freemail.mail.aliyun.com; envelope-from=hsiangkao@linux.alibaba.com; receiver=lists.ozlabs.org) Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4SksgR5bG5z3c3g for ; Tue, 5 Dec 2023 18:32:16 +1100 (AEDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VxtSpGf_1701761527; Received: from 30.97.48.243(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VxtSpGf_1701761527) by smtp.aliyun-inc.com; Tue, 05 Dec 2023 15:32:09 +0800 Message-ID: Date: Tue, 5 Dec 2023 15:32:06 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Weird EROFS data corruption To: Juhyung Park References: <5a0e8b44-6feb-b489-cdea-e3be3811804a@linux.alibaba.com> <649a3bc4-58bb-1dc8-85fb-a56e47b3d5c9@linux.alibaba.com> <275f025d-e2f1-eaff-6af1-e909d370cee0@linux.alibaba.com> From: Gao Xiang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yann Collet , linux-erofs@lists.ozlabs.org, linux-crypto@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" Hi Juhyung, On 2023/12/4 11:41, Juhyung Park wrote: ... > >> >> - Could you share the full message about the output of `lscpu`? > > Sure: > > Architecture: x86_64 > CPU op-mode(s): 32-bit, 64-bit > Address sizes: 39 bits physical, 48 bits virtual > Byte Order: Little Endian > CPU(s): 8 > On-line CPU(s) list: 0-7 > Vendor ID: GenuineIntel > BIOS Vendor ID: Intel(R) Corporation > Model name: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz > BIOS Model name: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz None CPU > @ 3.0GHz > BIOS CPU family: 198 > CPU family: 6 > Model: 140 > Thread(s) per core: 2 > Core(s) per socket: 4 > Socket(s): 1 > Stepping: 1 > CPU(s) scaling MHz: 60% > CPU max MHz: 4800.0000 > CPU min MHz: 400.0000 > BogoMIPS: 5990.40 > Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc > a cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss > ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art > arch_perfmon pebs bts rep_good nopl xtopology nonstop_ > tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes6 > 4 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xt > pr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_dead > line_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowp > refetch cpuid_fault epb cat_l2 cdp_l2 ssbd ibrs ibpb st > ibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ > ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid > rdt_a avx512f avx512dq rdseed adx smap avx512ifma clfl > ushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl > xsaveopt xsavec xgetbv1 xsaves split_lock_detect dtherm > ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp > hwp_pkg_req vnmi avx512vbmi umip pku ospke avx512_vbmi > 2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme av > x512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2i Sigh, I've been thinking. Here FSRM is the most significant difference between our environments, could you only try the following diff to see if there's any difference anymore? (without the previous disable patch.) diff --git a/arch/x86/lib/memmove_64.S b/arch/x86/lib/memmove_64.S index 1b60ae81ecd8..1b52a913233c 100644 --- a/arch/x86/lib/memmove_64.S +++ b/arch/x86/lib/memmove_64.S @@ -41,9 +41,7 @@ SYM_FUNC_START(__memmove) #define CHECK_LEN cmp $0x20, %rdx; jb 1f #define MEMMOVE_BYTES movq %rdx, %rcx; rep movsb; RET .Lmemmove_begin_forward: - ALTERNATIVE_2 __stringify(CHECK_LEN), \ - __stringify(CHECK_LEN; MEMMOVE_BYTES), X86_FEATURE_ERMS, \ - __stringify(MEMMOVE_BYTES), X86_FEATURE_FSRM + CHECK_LEN /* * movsq instruction have many startup latency Thanks, Gao Xiang From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA91DC07E97 for ; Tue, 5 Dec 2023 07:32:32 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rAPux-0007px-2l; Tue, 05 Dec 2023 07:32:30 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rAPuv-0007pq-JD for linux-f2fs-devel@lists.sourceforge.net; Tue, 05 Dec 2023 07:32:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RDvHjOceR6WQpYEnRIVAcg5UVxdgwBXUxxT4fneZ/p4=; b=XSAF7am09O3SxEQ+ZwziEZUEDx lWD/N4BP37M7RnPvZW18QSRovr5/5zn8k8AzFoaAhTbyRq/LrxAW0Qql9EyRm83CnU0hCkiKoLwob zxQki07hgFMSYYE8lqzJeDULkFAmwhRniqc0QZePt+Fg8QXMSe9MPNjRaAf9WdR9xgik=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=RDvHjOceR6WQpYEnRIVAcg5UVxdgwBXUxxT4fneZ/p4=; b=JNA7scShFs3j7YQr1n68Xt3osM 40inptQBS7Bc4pfcHW0r5+miF4xRYbcYNcU+owKM6mZbEfQJVWV1B34KKaMCw+bdeYtx88ThFVeQ6 MFN1FabK1B7al/E4qtjjn6cN4oFN1sXtrqyN3Q0kHSW1IYPPOIQQsdS5e8XqLbSRs2I8=; Received: from out30-101.freemail.mail.aliyun.com ([115.124.30.101]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rAPuq-0004qt-F1 for linux-f2fs-devel@lists.sourceforge.net; Tue, 05 Dec 2023 07:32:28 +0000 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R121e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018045192; MF=hsiangkao@linux.alibaba.com; NM=1; PH=DS; RN=6; SR=0; TI=SMTPD_---0VxtSpGf_1701761527; Received: from 30.97.48.243(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VxtSpGf_1701761527) by smtp.aliyun-inc.com; Tue, 05 Dec 2023 15:32:09 +0800 Message-ID: Date: Tue, 5 Dec 2023 15:32:06 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 To: Juhyung Park References: <5a0e8b44-6feb-b489-cdea-e3be3811804a@linux.alibaba.com> <649a3bc4-58bb-1dc8-85fb-a56e47b3d5c9@linux.alibaba.com> <275f025d-e2f1-eaff-6af1-e909d370cee0@linux.alibaba.com> From: Gao Xiang In-Reply-To: X-Headers-End: 1rAPuq-0004qt-F1 Subject: Re: [f2fs-dev] Weird EROFS data corruption X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yann Collet , Gao Xiang , linux-erofs@lists.ozlabs.org, linux-crypto@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Hi Juhyung, On 2023/12/4 11:41, Juhyung Park wrote: ... > >> >> - Could you share the full message about the output of `lscpu`? > > Sure: > > Architecture: x86_64 > CPU op-mode(s): 32-bit, 64-bit > Address sizes: 39 bits physical, 48 bits virtual > Byte Order: Little Endian > CPU(s): 8 > On-line CPU(s) list: 0-7 > Vendor ID: GenuineIntel > BIOS Vendor ID: Intel(R) Corporation > Model name: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz > BIOS Model name: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz None CPU > @ 3.0GHz > BIOS CPU family: 198 > CPU family: 6 > Model: 140 > Thread(s) per core: 2 > Core(s) per socket: 4 > Socket(s): 1 > Stepping: 1 > CPU(s) scaling MHz: 60% > CPU max MHz: 4800.0000 > CPU min MHz: 400.0000 > BogoMIPS: 5990.40 > Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc > a cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss > ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art > arch_perfmon pebs bts rep_good nopl xtopology nonstop_ > tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes6 > 4 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xt > pr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_dead > line_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowp > refetch cpuid_fault epb cat_l2 cdp_l2 ssbd ibrs ibpb st > ibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ > ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid > rdt_a avx512f avx512dq rdseed adx smap avx512ifma clfl > ushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl > xsaveopt xsavec xgetbv1 xsaves split_lock_detect dtherm > ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp > hwp_pkg_req vnmi avx512vbmi umip pku ospke avx512_vbmi > 2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme av > x512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2i Sigh, I've been thinking. Here FSRM is the most significant difference between our environments, could you only try the following diff to see if there's any difference anymore? (without the previous disable patch.) diff --git a/arch/x86/lib/memmove_64.S b/arch/x86/lib/memmove_64.S index 1b60ae81ecd8..1b52a913233c 100644 --- a/arch/x86/lib/memmove_64.S +++ b/arch/x86/lib/memmove_64.S @@ -41,9 +41,7 @@ SYM_FUNC_START(__memmove) #define CHECK_LEN cmp $0x20, %rdx; jb 1f #define MEMMOVE_BYTES movq %rdx, %rcx; rep movsb; RET .Lmemmove_begin_forward: - ALTERNATIVE_2 __stringify(CHECK_LEN), \ - __stringify(CHECK_LEN; MEMMOVE_BYTES), X86_FEATURE_ERMS, \ - __stringify(MEMMOVE_BYTES), X86_FEATURE_FSRM + CHECK_LEN /* * movsq instruction have many startup latency Thanks, Gao Xiang _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel