Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1473280pxp; Thu, 10 Mar 2022 06:12:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDhWW6XHblHETlqohVZYFDl8/OCpjgg4U5bhKf5THZHfNjsoa7otNoDYrKl68hguDyOZu4 X-Received: by 2002:a17:907:60d5:b0:6da:a62d:1845 with SMTP id hv21-20020a17090760d500b006daa62d1845mr4587992ejc.154.1646921550756; Thu, 10 Mar 2022 06:12:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646921550; cv=pass; d=google.com; s=arc-20160816; b=L0Yl/Gbpcoxn1B38nTKxEQZjKVzVFqDsKUml0huapWRqsjKfvEH3MDstJ10wuZpkNC vzTUDFz+iOZtQ7KQLWbt10Y46+mKX/zpn205P39WAImw1EL4oo6+PobO3tqRvtojEGMj z6nQI1hS1pubC7TT8nDXn+0pQXJ99pVmXnlANceErtYmx1frjaNx+QSNCib6cpJqCsjw Z2L7noW+ppdvW+cDzxQ31N95G6ubCktEfQSVLY7i7ePWosIRFXDWe+yyhdt1J2dpUZf/ TkLu6clHZCH2gaz46kEgvOirluF1m9TlzMStJDaRRpwTQfs6hFDEh+fj+XN1k1di7UbN qd/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:dkim-signature; bh=rLiIrydGtkkB3KOVEms/Qjy695JJV/yeWKshsz1ZnEE=; b=Z7XyozGA6RLRzlf2f9fqJkbKsq3VH7Ud+sB4gww3Bh1U/MyCEhfUsqrIpu8kL3P2oz jz60cf+7yq4FwUgo8z0EXPi5tMjluGZ/O3IUMvro4UyOmBiN6axptfsNqiL/MRUMObUY K0Xl/AUZ2SN0vYT7KtMClRHGP8wBm8awPt0G31SsNRCG7e1cIMTad4bsQKNnLfdYYE0y IfyfwvRUeIpf6ic6mFBgcr3+IqLHRdjs6XzA4f88TALtZt265qHAUergDmcR8CojakzO Ih02S7agNekANxeVik+tB8MKXNyQ8Ht3ieHvluNZGyy2h+fRFNqfshYlBh2DnwVxt/DP 5t1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@fujitsu.com header.s=fj1 header.b=A2sPlZKo; dkim=pass header.i=@fujitsu.onmicrosoft.com header.s=selector2-fujitsu-onmicrosoft-com header.b=NGyqciIh; arc=pass (i=1 spf=pass spfdomain=fujitsu.com dkim=pass dkdomain=fujitsu.com dmarc=pass fromdomain=fujitsu.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j10-20020aa7c40a000000b00415f5c7700csi2893253edq.471.2022.03.10.06.12.05; Thu, 10 Mar 2022 06:12:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@fujitsu.com header.s=fj1 header.b=A2sPlZKo; dkim=pass header.i=@fujitsu.onmicrosoft.com header.s=selector2-fujitsu-onmicrosoft-com header.b=NGyqciIh; arc=pass (i=1 spf=pass spfdomain=fujitsu.com dkim=pass dkdomain=fujitsu.com dmarc=pass fromdomain=fujitsu.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240182AbiCJIVF (ORCPT + 99 others); Thu, 10 Mar 2022 03:21:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234542AbiCJIVD (ORCPT ); Thu, 10 Mar 2022 03:21:03 -0500 X-Greylist: delayed 65 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 10 Mar 2022 00:20:02 PST Received: from esa12.fujitsucc.c3s2.iphmx.com (esa12.fujitsucc.c3s2.iphmx.com [216.71.156.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4839570CEB; Thu, 10 Mar 2022 00:20:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1646900403; x=1678436403; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=hXHoXQJuLU/cKq7n6jqA9gT9mElI4sCeIzwQZNxGB9M=; b=A2sPlZKo69IN06l+4q8p+49bTSovU9atcgUozbSSt7jNYeiVMRpwkRdR 7AYbqMAYxpvypkQKXSZBp6z63DNqStv7mbfUkwiIl71oAlbg6SnXSi82z RiDXnTST7pEmxaRRH5xi9gjYiDabRoNHIGKNlr56IzcyJAkg8//m9GmPQ 4M+hB7/wgSEJf2395pfgDl95dtajIhG5IXsjuEnafDlNHIuM0uWrF0kBI P5DCWAzbdh9+QxsusyewVeSQuwXpBsS+kXt0gAFZUkTtnNFzqOt8reCe5 S+nXJHIuxqu4u4wZ3+LqJRej8Je+DhPZ2ZqAy077AuiHEwgkNbc5+mNP5 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="51606249" X-IronPort-AV: E=Sophos;i="5.90,169,1643641200"; d="scan'208";a="51606249" Received: from mail-os0jpn01lp2108.outbound.protection.outlook.com (HELO JPN01-OS0-obe.outbound.protection.outlook.com) ([104.47.23.108]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 17:18:54 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V5ZQRXOZaQ9VmXsSOgHJu6uKep8iAe2avIuNPKAYCekdqaXwWIB7vK4HZAmOyLRN/oOEdLtGY8LBwvIueJrc1wbbCGnN4qERnRXMafx6i3cKszhGC3sn7O8CBi0Wz12X2H5naiTB12cFcoBf2VmZBObS8X5KqjW6lLLeOgEEtywDhiYqDoDL9jMnU8BIEMqprIfCGyPz8fcegAxrHmPJ6JmsZL5bO77jHzuG6b6yhhmbNVyyeR75H8zL+bMctEfafHRtjPaz8T4LFhPCuDugUMkaPpSQk3EzAmtDe3/tu5SVHjMPJ3916AZkb+uQ6ZeG4/sbbf0d4PBb+pcPt/ukGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rLiIrydGtkkB3KOVEms/Qjy695JJV/yeWKshsz1ZnEE=; b=brWZmlPsWYpY0/zlOshi0QROb0AqVo2/O31mZXXaRrDyOS10eomObVKefEYtXYtAoMB0ooabekq8ZPQIictbdqCjwk+Am1mh6Wkqhzi5zJyyLd0eIOXnTnk1qPlf/Z5quuVrXZ0dhOiV4njjge/pvrPSjNuaBSHdwqt1GQliXvbHEwHmzRnmpjzSbwJ9Qrifcrwu2lGBXfgMyLgiTAyv1eAH2gEbx+cZ7XlOu4Wg/XHizUHpFRAEIGCosD0INSskWM0QaxTGp1TvMLvKhoOzWnKfdEsW3pwiW8sa4plk9uisCLC8fCAOsmaytXjzVGNMDazuo7B62XUK/6wwXNQsdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fujitsu.com; dmarc=pass action=none header.from=fujitsu.com; dkim=pass header.d=fujitsu.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.onmicrosoft.com; s=selector2-fujitsu-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rLiIrydGtkkB3KOVEms/Qjy695JJV/yeWKshsz1ZnEE=; b=NGyqciIhalVF409lV3QvWIXYK0NCazL6nxmX+1B+7JviNRnpFNJqjFCuWGi5O3z4reJ5bs1vSTN8aMOLchu73NjJLrh3xYzUpBPoUA7JnHP59B+pG56EUcb35lSIvFUAlXm+2B/zbwA3uVKs7SneE7/OClHZOVkf+pC6q5hI7qg= Received: from TYAPR01MB6330.jpnprd01.prod.outlook.com (2603:1096:402:3e::12) by OS3PR01MB6791.jpnprd01.prod.outlook.com (2603:1096:604:12a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.21; Thu, 10 Mar 2022 08:18:50 +0000 Received: from TYAPR01MB6330.jpnprd01.prod.outlook.com ([fe80::bddf:b81c:fc55:3bbb]) by TYAPR01MB6330.jpnprd01.prod.outlook.com ([fe80::bddf:b81c:fc55:3bbb%7]) with mapi id 15.20.5038.027; Thu, 10 Mar 2022 08:18:50 +0000 From: "tan.shaopeng@fujitsu.com" To: 'Shuah Khan' , Fenghua Yu , Reinette Chatre , Shuah Khan CC: "linux-kernel@vger.kernel.org" , "linux-kselftest@vger.kernel.org" Subject: RE: [PATCH v3] selftests/resctrl: Print a message if the result of MBM&CMT tests is failed on Intel cpu Thread-Topic: [PATCH v3] selftests/resctrl: Print a message if the result of MBM&CMT tests is failed on Intel cpu Thread-Index: AQHYL7RD0/HtLWYLGUq5/0oZbxMCdKy2CkIAgAJDRWA= Date: Thu, 10 Mar 2022 08:18:50 +0000 Message-ID: References: <20220304103957.487660-1-tan.shaopeng@jp.fujitsu.com> <9647f7ed-6a02-8603-0de4-3292d4d13157@linuxfoundation.org> In-Reply-To: <9647f7ed-6a02-8603-0de4-3292d4d13157@linuxfoundation.org> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Enabled=true; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_SetDate=2022-03-10T08:11:39Z; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Method=Standard; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Name=FUJITSU-RESTRICTED?; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_SiteId=a19f121d-81e1-4858-a9d8-736e267fd4c7; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_ActionId=dab9cced-9c87-49f8-bb9f-cb9a5d643e5e; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_ContentBits=0 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=fujitsu.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bdd75bb3-1ea8-4838-dabf-08da026e9b81 x-ms-traffictypediagnostic: OS3PR01MB6791:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9/4ctvHYGe+DOy5e24TKlxK4sF+fJzpCex58Hi8nPWl4Sq6UsOn5Mx+wt+RpAK6qRMUIW2anCalPvt+c8hLKRi1uSNSHu6Dv7NhzDxvmIfKrf3YXoqQQh1qoZWU44g2EEHFMgrFK3+bWlbVZeKbsTG6skVruCMscvBhYe5fNcc+78QAIYCm0Ws/7IlbxvwiH+HwbrDYuk0i7mAJq3X9cvXCLXBXApCoFyJF6JExyDEhYlWutku672lfb9fiH0kj33wscO4sTIHnG+xPKFqXK8XcjltOU/3vatCXWE3nbQyBsGaLOrnBBmJIgJyPedQcKUfACGjBW0561igNBSs86F6yyNLq6voRDoGR0+fc/3P+yb7OSIVfcDsnd6cQaXJQaCwk25F8+CIJYa/mQ5Mg3KXEFOlTz2Jaw2ZbIPAtEhhVXqvMQIK5xtoB+vFCnKY0DMZpTDn6JNmB9rhX1To1QSLNkuxsMHEPA8rO6aOI2h4Po7tMh9vOSqV/sNbDZu7/8f/SmYtnydXjPN4XTAN2bU+FWIdsFmeFivHbZEtDtXmWqmG8yOiUSWWKSLrcjrnj9t3NqvM1JsCjqljfrXYP/W7kqZ/VF98vLwN/0CagdqHsDgStljJDfQlguCsXTBkAD41o9iQxQgsYBHvaXiA6Zk7rS2o2y9vPoBbrYqm7V407sicOtXQ8xQW3x8U88IG3Tp77SQ6Q/5ibaECvFDivguw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYAPR01MB6330.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(186003)(15650500001)(86362001)(71200400001)(26005)(5660300002)(38070700005)(33656002)(7696005)(9686003)(6506007)(55016003)(53546011)(8676002)(4326008)(508600001)(38100700002)(82960400001)(122000001)(66946007)(66476007)(66556008)(64756008)(66446008)(76116006)(2906002)(83380400001)(52536014)(110136005)(54906003)(8936002)(85182001)(316002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?dXdHSk4zNkdMa1ZCMTBlcGx0eU9vUWVHMHowS0pNaWsyTGJrSDh5NmxL?= =?iso-2022-jp?B?dWtjeU1TSUROcHgwaXd3anFwbHZwazVTZFhDT25HcFAvWjhUNmRrNGJt?= =?iso-2022-jp?B?aUROWTFZN0FhbEpiSVY0NmYxQ1FSMWxaamlaMnhTZ1JUTGsvSEFFM1NU?= =?iso-2022-jp?B?WXVXeVAvdTZlRFZEc3BkRWNuRGVWdWxsTGNjZXlIMHF2YW40aWVXK3ZU?= =?iso-2022-jp?B?SitqelVUbm9IL1dtcWx3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p?B?ZlVPWUFBVmtFUkx4YXhKNEpCSVM2K0YxVS80c0FtRmNXRXdWUnIwU3kz?= =?iso-2022-jp?B?T0lHZklkTENGY3hvUEUvaGNnOXhmOTVnPT0=?= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: fujitsu.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYAPR01MB6330.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bdd75bb3-1ea8-4838-dabf-08da026e9b81 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Mar 2022 08:18:50.2952 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a19f121d-81e1-4858-a9d8-736e267fd4c7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tjOuy1KdcvPahV5twzMZ8eFINMAnvZBMP+5P2+9sDSILyaLsj/WTmoVraOXDItPk71fMRrCnRbCasGhs/QdUi+OU4Ws9mO1NO74lGX46GKQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB6791 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shuah, > On 3/4/22 3:39 AM, Shaopeng Tan wrote: > > According to "Intel Resource Director Technology (Intel RDT) on 2nd > > Generation Intel Xeon Scalable Processors Reference Manual", When the > > Intel Sub-NUMA Clustering(SNC) feature is enabled, Intel CMT and MBM > > counters may not be accurate. > > > > However, there does not seem to be an architectural way to detect if > > SNC is enabled. > > > > If the result of MBM&CMT test fails on Intel CPU, print a message to > > let users know a possible cause of failure. > > > > Signed-off-by: Shaopeng Tan > > --- > > Hello, > > > > In PATCH V2, I tried to detect whether SNC is enabled by NUMA info and > > cpuinfo(socket_num), but it is not reliable and no future-proof. > > > > I just print a message to let users know a possible cause of "not ok", > > When CMT or MBM test runs on Intel CPU, and the result is "not ok". > > > > This patch is based on v5.16. >=20 > Also need to be rebased on mainline latest I will rebased on mainline latest in next version. > > > > tools/testing/selftests/resctrl/resctrl_tests.c | 12 +++++++++--- > > 1 file changed, 9 insertions(+), 3 deletions(-) > > > > diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c > > b/tools/testing/selftests/resctrl/resctrl_tests.c > > index 973f09a66e1e..ec2bdce7b85f 100644 > > --- a/tools/testing/selftests/resctrl/resctrl_tests.c > > +++ b/tools/testing/selftests/resctrl/resctrl_tests.c > > @@ -14,8 +14,9 @@ > > #define BENCHMARK_ARG_SIZE 64 > > > > bool is_amd; > > +bool is_intel; > > >=20 > Why is this a global? I am not seeing a reason. These detect_*()s could b= e > moved to resctrl.h and get rid of globals. >=20 > Instead of adding intel check to detect_amd() add detect_intel() or is_in= tel() > and have ut return true of it detects intel. "is_amd" and "is_intel" are called many times, in this way, detect_vendor is called only once. Do you mean in the following way? "/proc/cpuinfo" will be open/closed many times, since is_amd()/is_intel() is called in serval places. So, I think current is better. Do you have any thoughts. ---- bool detect_vendor_str(const char *vendor_str ) { FILE *inf =3D fopen("/proc/cpuinfo", "r"); char *res; bool found =3D false; if (!inf) return found; res =3D fgrep(inf, "vendor_id"); if (res) { char *s =3D strchr(res, ':'); found =3D s && !strcmp(s,vendor_str); free(res); } fclose(inf); return found; } bool is_amd() { return detect_vendor_str(": AuthenticAMD\n"); } bool is_intel() { return detect_vendor_str(": GenuineIntel\n"); } ---- > > -void detect_amd(void) > > +void detect_vendor(void) > > { > > FILE *inf =3D fopen("/proc/cpuinfo", "r"); > > char *res; > > @@ -29,6 +30,7 @@ void detect_amd(void) > > char *s =3D strchr(res, ':'); > > > > is_amd =3D s && !strcmp(s, ": AuthenticAMD\n"); > > + is_intel =3D s && !strcmp(s, ": GenuineIntel\n"); > > free(res); > > } > > fclose(inf); > > @@ -70,6 +72,8 @@ static void run_mbm_test(bool has_ben, char > **benchmark_cmd, int span, > > sprintf(benchmark_cmd[5], "%s", MBA_STR); > > res =3D mbm_bw_change(span, cpu_no, bw_report, benchmark_cmd); > > ksft_test_result(!res, "MBM: bw change\n"); > > + if (is_intel && res) > > + ksft_print_msg("Intel CMT and MBM counters may be > inaccurate when > > +Sub-NUMA Clustering (SNC) is enabled. Ensure SNC is disabled in the > > +BIOS if this system supports SNC.\n"); >=20 > This message is rather long. Please make it concise. I will use the following message in next version. "Intel MBM may be inaccurate when Sub-NUMA Clustering is enabled. Check BIO= S configuration." > > mbm_test_cleanup(); > > } > > > > @@ -106,6 +110,8 @@ static void run_cmt_test(bool has_ben, char > **benchmark_cmd, int cpu_no) > > sprintf(benchmark_cmd[5], "%s", CMT_STR); > > res =3D cmt_resctrl_val(cpu_no, 5, benchmark_cmd); > > ksft_test_result(!res, "CMT: test\n"); > > + if (is_intel && res) > > + ksft_print_msg("Intel CMT and MBM counters may be > inaccurate when > > +Sub-NUMA Clustering (SNC) is enabled. Ensure SNC is disabled in the > > +BIOS if this system supports SNC.\n"); >=20 > This message is rather long. Please make it concise. "Intel CMT may be inaccurate when Sub-NUMA Clustering is enabled. Check BIO= S configuration." > > cmt_test_cleanup(); > > } > > > > @@ -207,8 +213,8 @@ int main(int argc, char **argv) > > if (geteuid() !=3D 0) > > return ksft_exit_fail_msg("Not running as root, abort > > testing.\n"); > > > > - /* Detect AMD vendor */ > > - detect_amd(); > > + /* Detect AMD/INTEL vendor */ > > + detect_vendor(); > > > > if (has_ben) { > > /* Extract benchmark command from command line. */ > > Best regards, Tan Shaopeng