From patchwork Thu Jan 19 04:37:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 45591 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp143088wrn; Wed, 18 Jan 2023 20:52:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXshpl5+Fsp9uvvmf/KrQ/4FpYFTOKDx3jqpdHJ8evyIzileMgbxElaf6H+Tp2pqOerqzOLm X-Received: by 2002:a05:6402:209:b0:47e:15ec:155e with SMTP id t9-20020a056402020900b0047e15ec155emr9067799edv.26.1674103966216; Wed, 18 Jan 2023 20:52:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674103966; cv=pass; d=google.com; s=arc-20160816; b=JtQDm24f7BSL7lqn5+JxMyu4Iu61/zMYDkBHLCquDNRECuyjw3itDjYRZI72FQw3ib feGHRcu+wYPmqABRZkOol9W24s+dOXlrGC+HhfCA69p3wNKcgt/h0uevJqbqu+hjsMue U6USqCYMrlErn2do8Ta7Ms4m6+38K3oDe2cQ1x+9JVgEuCcAkOnTpgjjVLl3c3Cqn7sS XCt1X+Fa07wHjIn0mgkXodRvxfveFMAoGPaPFNh56VtNvxlCc1GWD72gFP9LsFkBgP+4 hp6HnEmS31ZgQxRcNR7othRgDlpB3BJv9zIo0N6vYnAO6WnExTY8LJM5bHU3mOCdJiLz rnMQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=sbL1sYMpetymHB/72RunSmVnR3tIgNVfByr1LjXh/i8=; b=TKN/T6tIWz0rxqxo/+AcCEwNx7RkcnLt/dibUywqQCruVVbACu6RabPP0kZ4ojnbfi +fhRy3aWTlFe9jW+1mCxeM9aZPdBke+0xV6vA1RBjZyMrKwAVuKYSCzpeIYhDG3NDwQC 37V3oQgKD2zOFfVtPEXL50XFIVTN4EjjNMNM92nwWKgaLOGCQCCP4pKlUj5C+MUHvPxW Jq/ZvjCzs2UDKyEZ2aqISYYwejfv1h1VighOy1hUPAUGQZGPdQ0FeeKvdRxM5HFhgdnf eL7fM67PZGxTeitXIae7O1mPp8HPDCB9V5n6GXajgHlyV7yb1MqWujHe+ECTGV665+Bb vFIg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=MPAlOlAQ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020a05640211c900b0047338d1bfcfsi14698353edw.166.2023.01.18.20.52.22; Wed, 18 Jan 2023 20:52:46 -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=pass header.i=@nxp.com header.s=selector2 header.b=MPAlOlAQ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbjASEq2 (ORCPT + 99 others); Wed, 18 Jan 2023 23:46:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbjASEpv (ORCPT ); Wed, 18 Jan 2023 23:45:51 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2078.outbound.protection.outlook.com [40.107.21.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2C9F3B0ED; Wed, 18 Jan 2023 20:41:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ANizqg4uYYqOfxFoWPAqYFLK93a0zWXgRtuQmSVoVdcXS+bdQPnWNRSjIcY5dgBCpe62DjG46KxUJcF+7D+HMhOOyZCPl+kI+ie9fFBXpqftypYLr4MUz0+5kQHBwn8mGXns9ejnh/N3MLM9+w2oTnBArsFsNGIF58hOGEQIV9ejOV1aqP+nXogemiwo6x8vMtWUOCkV0S71zwE+gYhpWhwJkhraX2clGCRvQ7PtcuhD+8OrR4QphHV20CBOPXSgQS5gSfwGaJhEIM45x61pkL1Jui50v4kqA4FoWY9DadX1+4afv9f8u4KgfVOniRKEDScjOFyeDKmyy3no7x+IdQ== 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=sbL1sYMpetymHB/72RunSmVnR3tIgNVfByr1LjXh/i8=; b=euxZKYfzIkY6g2kb4cOOVAt64p48vJnUlu1f0hNqnT0jfn3lXyuD2ryUzU8vlSjYsempe/nyJf3MeSGz6GlJvw45pxi/AJVTb50GcEeLjZO7awqgSRzyQhX17789Rg2Dza+t86TR3Mb03h7OWfMN3SoWe9zqyflLxyKip1awWRGvnPhU/R/qXFXlX8E0X1RCgK8QjvWsBLnVTy9/3KTxZP8SSTTBhuL29y+T3m+e3qYbHQpkME+Auh98yL8rAwEYL67BU+X1Ov9Y+iKhCkmHh489q8xP7Ed9VXH38jS95pjZID7UlP78WuQPG+ZbwdnAG+jHbGODtYJ6Ln1FNLiOtA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sbL1sYMpetymHB/72RunSmVnR3tIgNVfByr1LjXh/i8=; b=MPAlOlAQwhBfj4LJf4m2vjFIVY1bzvmRLCW3lQ2craINOnm4O7QsAujbcOTMhsKiSQD18BF2Bepq3Fzz6oJwMU7hvgRN5yGQ8yaf95E/Ekpe7MRQ1mU7yvtF156Ty02gwyZMO+t+HB9iqFaN3MOxuHlW6nFs8mbSiGMg2mmxYKY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB8106.eurprd04.prod.outlook.com (2603:10a6:10:24b::13) by GV1PR04MB9214.eurprd04.prod.outlook.com (2603:10a6:150:29::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24; Thu, 19 Jan 2023 04:40:27 +0000 Received: from DB9PR04MB8106.eurprd04.prod.outlook.com ([fe80::5b45:16d:5b45:769f]) by DB9PR04MB8106.eurprd04.prod.outlook.com ([fe80::5b45:16d:5b45:769f%5]) with mapi id 15.20.6002.025; Thu, 19 Jan 2023 04:40:26 +0000 From: wei.fang@nxp.com To: shenwei.wang@nxp.com, xiaoning.wang@nxp.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org Cc: linux-imx@nxp.com, linux-kernel@vger.kernel.org Subject: [PATCH net] net: fec: Use page_pool_put_full_page when freeing rx buffers Date: Thu, 19 Jan 2023 12:37:47 +0800 Message-Id: <20230119043747.943452-1-wei.fang@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SI1PR02CA0022.apcprd02.prod.outlook.com (2603:1096:4:1f4::16) To DB9PR04MB8106.eurprd04.prod.outlook.com (2603:10a6:10:24b::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB8106:EE_|GV1PR04MB9214:EE_ X-MS-Office365-Filtering-Correlation-Id: b3a87517-db33-4e01-8877-08daf9d7490d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7Ex5OBySP78wsP5sQ1Q7db3j//xlBHWU4hhsOz92TRiX8nulOHVXZ64i+Kj1Qu7NDORib8H7JXzd3Uc4vN7h8ndOnJqlpbLnIBOGXjBIS1q6hrkIStMsYXkQVIks9EV2FJBm02k/wT9H9zAUTwbF2MBVefR0CmxWIadDxfN1dCPqu7v3SKxGMB2u569rysQPPWTy/c4fRq0gh/9E6JDJNK2ZNy8lSuWyZLszVlM3xyA97Uuco8AZq3mEIW/Zk/1L5UiVDFBIemzqGZ6YwwtaKNNVneeCkHyhL2UTR0x+nCem2hIGgkQgJEvdxoW+1D9VXLSvPGhOuduq5YFoTgwVjVtltPqQ+ofaX/7q7GdxVHUL1vQC7yHPMCrvg3uNvjVY9z86uyDwLE0AF4GYG9VeEZZZvLrLPIiwbBx5cZMMAQx3ARcrID8/WEPpdqsN37/LV/5kP4HmfANQiVCXzBfyKOTBLU052c9zHFaBrAyWRXh3BINB8aKN6T460nQyEb0fnlr4AenThblvczH2S+yixWvsC6QAIYSd9qigEIxYWzC/rLMNLmfhCROWTj/ssHngmsJCNcU7HAnJo68K+Tkbv/KvfWl2UKcjRchkeBwqEZkXu/GGHKLw6Hwb2cZllNd18UDo/E7fYV3KOPkgwn9WD3oGko3zxwuIGUM8XywILS/XEI284DQhA1JprIOj7FHdLYRcxSrrpLZ9WI/u7O3ZtA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB8106.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(346002)(376002)(39860400002)(366004)(136003)(451199015)(66476007)(38350700002)(38100700002)(40140700001)(86362001)(8936002)(5660300002)(2906002)(30864003)(66946007)(66556008)(4326008)(8676002)(41300700001)(1076003)(26005)(2616005)(186003)(6512007)(9686003)(83380400001)(52116002)(316002)(6666004)(478600001)(6486002)(6506007)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3d4Sq9PBUroJt14t//xBpUQvjDpekvb6JWF4d7j31iyAzf8rA6WlVmt479eTRIK8uk1ABm5M5GnDJl15DQcysf9G0QN7LthNX7rX3KcyLjRgmKh5laoVzzdli0CJu7IvY5/OU2MBsc18e+FGUr3sXoJY2tDaCEimjEDZe4fTBgLW6ucOgr2248QYEorzqf9ySezV1XajCKsvOaQLr4JV2vHfVjKr7XwhSMoGNfw1Wq94+2T34qAEmZnadw3den3ELlaObDPg16aWdPXn0wVLLRlZl3Sw+8E7CUkyc+G4D2lvWycdCT6aPj0bZtt+0J3M3urFPTST8gLgNPGUeyVJjRzo+K2z3kwdyvDBvYbEL9bOy3EmndVB+HroSDFRM1G57T77eHXBe3bGs+XRNAgoG5w7nPhRsYD+m/tZWkzhWElSI1ajiVvVkvZbJJlI1sP95JCZjrV/HKDkImKnt0ZfB3pA+kkzQEWS8SfE8ubNTnd6DMzEwlSUAsJz51bnVZUl0EwmT78ELxHcDBKirdQUIlNQkNb5E877k+oWRArLa7Y3DJcO5eSgI2UyRmJG9HBy132vwYpcpLMm6P8lswFvEe9v/UQZEfxKpCxcjx+5G8Pm2KqbKfVXrAUbM6B+lfFjYjmF7OHzfdGf3e+eYSOBA/KsGaL+eL/vmC5z3E1bErayjGMJs9VEJ3PYk3BwbLb29ER9zqkEz5ucxXZ4gCgvJj5JllyOh7MVZHkcPJwg4QVzBCdFmZHiD7TpFRzxzI/iEx5lvC35ZoPt4Dc75LwFxV2woNBWWEDj4mvUos056sLWdfEm6bwcVy2L/rmUEyP/FVG2V4BalDrIAhiPw8+d3VOnieDZAjChiJEYl6vjwhuEOLwZkOxvBhNPExSaTJ5QI8t/9HPV/jPvu3Pc8+47KrpUOFdrQrssi6Iz35wzRKf4fLI6LHiBz7vI1CwlFJ1+I2wayO4Xhfh6g+1AKbxjka2NhIOtC01ehiLMlowp3ujNt+01SbPRUou+SBF3nVF5UKzz055KajZBpRsNq1b/2QdW+dKksXfgHcxEoI6JxTaXkn9DsY2XaBKgVfQB/ZYrMb56AIeTxaVtYWoZx0Y7f6tB1iB/+/mBaW1ciHvHto6Mz54lTlnUTN+MrhYESexLEA0UwpXbxK/KzqopwWHEqdQhDp8FBeCRxM8Zi+7YOJT6AT0Bw2hQeXIfpL01or55SsaqS16ptxKVLHd2dRfWIHM8sacz6XEFIjoPQ+O8/XEwHyvfe09373hkKhtTlLGVO4gopgNs5SfTYZSjJOa42a7IjlHymbEJM3kMki6y6V6sShprxz+nRttSJ0UQqfhsh4sxJqc4zzhy2MQVwvz4hL2P2eIaxAi0bs5WmblG8ieZOWcmyRxLnEPMpENj3ZtXc3hVkSuD/Bg0OLDyzRacgwNvTLmhps71EMUkolc5um2+f6tKg6lcVqWRDumREgS7/s/7jF3Ak/OYHpUkLakTtjKGXzI4I0ff7VThxwJsBEgXRs2N3A4v/hAqVNx2ZVTvhPhI1F6k1AeAxRHisXOL/i/dscXeof6G2BMuU7+VMrh9keSW0zWcFVayzrYEgbdn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3a87517-db33-4e01-8877-08daf9d7490d X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB8106.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 04:40:26.8535 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ugmXRqfhViWMAEjI8VkReQAvj0xDiT7ze2Ve2YxaQpYpRLMtzktu43yhhTVRwLLOr38x5P71mCSzYLWAshxapA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9214 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755425240180152392?= X-GMAIL-MSGID: =?utf-8?q?1755425240180152392?= From: Wei Fang The page_pool_release_page was used when freeing rx buffers, and this function just unmaps the page (if mapped) and does not recycle the page. So after hundreds of down/up the eth0, the system will out of memory. For more details, please refer to the following reproduce steps and bug logs. To solve this issue and refer to the doc of page pool, the page_pool_put_full_page should be used to replace page_pool_release_page. Because this API will try to recycle the page if the page refcnt equal to 1. After testing 20000 times, the issue can not be reproduced anymore (about testing 391 times the issue will occur on i.MX8MN-EVK before). Reproduce steps: Create the test script and run the script. The script content is as follows: LOOPS=20000 i=1 while [ $i -le $LOOPS ] do echo "TINFO:ENET $curface up and down test $i times" org_macaddr=$(cat /sys/class/net/eth0/address) ifconfig eth0 down ifconfig eth0 hw ether $org_macaddr up i=$(expr $i + 1) done sleep 5 if cat /sys/class/net/eth0/operstate | grep 'up';then echo "TEST PASS" else echo "TEST FAIL" fi Bug detail logs: TINFO:ENET up and down test 391 times [ 850.471205] Qualcomm Atheros AR8031/AR8033 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL) [ 853.535318] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 853.541694] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 870.590531] page_pool_release_retry() stalled pool shutdown 199 inflight 60 sec [ 931.006557] page_pool_release_retry() stalled pool shutdown 199 inflight 120 sec TINFO:ENET up and down test 392 times [ 991.426544] page_pool_release_retry() stalled pool shutdown 192 inflight 181 sec [ 1051.838531] page_pool_release_retry() stalled pool shutdown 170 inflight 241 sec [ 1093.751217] Qualcomm Atheros AR8031/AR8033 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL) [ 1096.446520] page_pool_release_retry() stalled pool shutdown 308 inflight 60 sec [ 1096.831245] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 1096.839092] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 1112.254526] page_pool_release_retry() stalled pool shutdown 103 inflight 302 sec [ 1156.862533] page_pool_release_retry() stalled pool shutdown 308 inflight 120 sec [ 1172.674516] page_pool_release_retry() stalled pool shutdown 103 inflight 362 sec [ 1217.278532] page_pool_release_retry() stalled pool shutdown 308 inflight 181 sec TINFO:ENET up and down test 393 times [ 1233.086535] page_pool_release_retry() stalled pool shutdown 103 inflight 422 sec [ 1277.698513] page_pool_release_retry() stalled pool shutdown 308 inflight 241 sec [ 1293.502525] page_pool_release_retry() stalled pool shutdown 86 inflight 483 sec [ 1338.110518] page_pool_release_retry() stalled pool shutdown 308 inflight 302 sec [ 1353.918540] page_pool_release_retry() stalled pool shutdown 32 inflight 543 sec [ 1361.179205] Qualcomm Atheros AR8031/AR8033 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL) [ 1364.255298] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 1364.263189] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 1371.998532] page_pool_release_retry() stalled pool shutdown 310 inflight 60 sec [ 1398.530542] page_pool_release_retry() stalled pool shutdown 308 inflight 362 sec [ 1414.334539] page_pool_release_retry() stalled pool shutdown 16 inflight 604 sec [ 1432.414520] page_pool_release_retry() stalled pool shutdown 310 inflight 120 sec [ 1458.942523] page_pool_release_retry() stalled pool shutdown 308 inflight 422 sec [ 1474.750521] page_pool_release_retry() stalled pool shutdown 16 inflight 664 sec TINFO:ENET up and down test 394 times [ 1492.830522] page_pool_release_retry() stalled pool shutdown 310 inflight 181 sec [ 1519.358519] page_pool_release_retry() stalled pool shutdown 308 inflight 483 sec [ 1535.166545] page_pool_release_retry() stalled pool shutdown 2 inflight 724 sec [ 1537.090278] eth_test2.sh invoked oom-killer: gfp_mask=0x400dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO), order=0, oom_score_adj=0 [ 1537.101192] CPU: 3 PID: 2379 Comm: eth_test2.sh Tainted: G C 6.1.1+g56321e101aca #1 [ 1537.110249] Hardware name: NXP i.MX8MNano EVK board (DT) [ 1537.115561] Call trace: [ 1537.118005] dump_backtrace.part.0+0xe0/0xf0 [ 1537.122289] show_stack+0x18/0x40 [ 1537.125608] dump_stack_lvl+0x64/0x80 [ 1537.129276] dump_stack+0x18/0x34 [ 1537.132592] dump_header+0x44/0x208 [ 1537.136083] oom_kill_process+0x2b4/0x2c0 [ 1537.140097] out_of_memory+0xe4/0x594 [ 1537.143766] __alloc_pages+0xb68/0xd00 [ 1537.147521] alloc_pages+0xac/0x160 [ 1537.151013] __get_free_pages+0x14/0x40 [ 1537.154851] pgd_alloc+0x1c/0x30 [ 1537.158082] mm_init+0xf8/0x1d0 [ 1537.161228] mm_alloc+0x48/0x60 [ 1537.164368] alloc_bprm+0x7c/0x240 [ 1537.167777] do_execveat_common.isra.0+0x70/0x240 [ 1537.172486] __arm64_sys_execve+0x40/0x54 [ 1537.176502] invoke_syscall+0x48/0x114 [ 1537.180255] el0_svc_common.constprop.0+0xcc/0xec [ 1537.184964] do_el0_svc+0x2c/0xd0 [ 1537.188280] el0_svc+0x2c/0x84 [ 1537.191340] el0t_64_sync_handler+0xf4/0x120 [ 1537.195613] el0t_64_sync+0x18c/0x190 [ 1537.199334] Mem-Info: [ 1537.201620] active_anon:342 inactive_anon:10343 isolated_anon:0 [ 1537.201620] active_file:54 inactive_file:112 isolated_file:0 [ 1537.201620] unevictable:0 dirty:0 writeback:0 [ 1537.201620] slab_reclaimable:2620 slab_unreclaimable:7076 [ 1537.201620] mapped:1489 shmem:2473 pagetables:466 [ 1537.201620] sec_pagetables:0 bounce:0 [ 1537.201620] kernel_misc_reclaimable:0 [ 1537.201620] free:136672 free_pcp:96 free_cma:129241 [ 1537.240419] Node 0 active_anon:1368kB inactive_anon:41372kB active_file:216kB inactive_file:5052kB unevictable:0kB isolated(anon):0kB isolated(file):0kB s [ 1537.271422] Node 0 DMA free:541636kB boost:0kB min:30000kB low:37500kB high:45000kB reserved_highatomic:0KB active_anon:1368kB inactive_anon:41372kB actiB [ 1537.300219] lowmem_reserve[]: 0 0 0 0 [ 1537.303929] Node 0 DMA: 1015*4kB (UMEC) 743*8kB (UMEC) 417*16kB (UMEC) 235*32kB (UMEC) 116*64kB (UMEC) 25*128kB (UMEC) 4*256kB (UC) 2*512kB (UC) 0*1024kBB [ 1537.323938] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB [ 1537.332708] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=32768kB [ 1537.341292] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB [ 1537.349776] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=64kB [ 1537.358087] 2939 total pagecache pages [ 1537.361876] 0 pages in swap cache [ 1537.365229] Free swap = 0kB [ 1537.368147] Total swap = 0kB [ 1537.371065] 516096 pages RAM [ 1537.373959] 0 pages HighMem/MovableOnly [ 1537.377834] 17302 pages reserved [ 1537.381103] 163840 pages cma reserved [ 1537.384809] 0 pages hwpoisoned [ 1537.387902] Tasks state (memory values in pages): [ 1537.392652] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name [ 1537.401356] [ 201] 993 201 1130 72 45056 0 0 rpcbind [ 1537.409772] [ 202] 0 202 4529 1640 77824 0 -250 systemd-journal [ 1537.418861] [ 222] 0 222 4691 801 69632 0 -1000 systemd-udevd [ 1537.427787] [ 248] 994 248 20914 130 65536 0 0 systemd-timesyn [ 1537.436884] [ 497] 0 497 620 31 49152 0 0 atd [ 1537.444938] [ 500] 0 500 854 77 53248 0 0 crond [ 1537.453165] [ 503] 997 503 1470 160 49152 0 -900 dbus-daemon [ 1537.461908] [ 505] 0 505 633 24 40960 0 0 firmwared [ 1537.470491] [ 513] 0 513 2507 180 61440 0 0 ofonod [ 1537.478800] [ 514] 990 514 69640 137 81920 0 0 parsec [ 1537.487120] [ 533] 0 533 599 39 40960 0 0 syslogd [ 1537.495518] [ 534] 0 534 4546 148 65536 0 0 systemd-logind [ 1537.504560] [ 535] 0 535 690 24 45056 0 0 tee-supplicant [ 1537.513564] [ 540] 996 540 2769 168 61440 0 0 systemd-network [ 1537.522680] [ 566] 0 566 3878 228 77824 0 0 connmand [ 1537.531168] [ 645] 998 645 1538 133 57344 0 0 avahi-daemon [ 1537.540004] [ 646] 998 646 1461 64 57344 0 0 avahi-daemon [ 1537.548846] [ 648] 992 648 781 41 45056 0 0 rpc.statd [ 1537.557415] [ 650] 64371 650 590 23 45056 0 0 ninfod [ 1537.565754] [ 653] 61563 653 555 24 45056 0 0 rdisc [ 1537.573971] [ 655] 0 655 374569 2999 290816 0 -999 containerd [ 1537.582621] [ 658] 0 658 1311 20 49152 0 0 agetty [ 1537.590922] [ 663] 0 663 1529 97 49152 0 0 login [ 1537.599138] [ 666] 0 666 3430 202 69632 0 0 wpa_supplicant [ 1537.608147] [ 667] 0 667 2344 96 61440 0 0 systemd-userdbd [ 1537.617240] [ 677] 0 677 2964 314 65536 0 100 systemd [ 1537.625651] [ 679] 0 679 3720 646 73728 0 100 (sd-pam) [ 1537.634138] [ 687] 0 687 1289 403 45056 0 0 sh [ 1537.642108] [ 789] 0 789 970 93 45056 0 0 eth_test2.sh [ 1537.650955] [ 2355] 0 2355 2346 94 61440 0 0 systemd-userwor [ 1537.660046] [ 2356] 0 2356 2346 94 61440 0 0 systemd-userwor [ 1537.669137] [ 2358] 0 2358 2346 95 57344 0 0 systemd-userwor [ 1537.678258] [ 2379] 0 2379 970 93 45056 0 0 eth_test2.sh [ 1537.687098] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-0.slice/user@0.service,tas0 [ 1537.703009] Out of memory: Killed process 679 ((sd-pam)) total-vm:14880kB, anon-rss:2584kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:72kB oom_score_ad0 [ 1553.246526] page_pool_release_retry() stalled pool shutdown 310 inflight 241 sec Fixes: 95698ff6177b ("net: fec: using page pool to manage RX buffers") Signed-off-by: Wei Fang Reviewed-by: shenwei wang Reviewed-by: Jesse Brandeburg --- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 644f3c963730..2341597408d1 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3191,7 +3191,7 @@ static void fec_enet_free_buffers(struct net_device *ndev) for (q = 0; q < fep->num_rx_queues; q++) { rxq = fep->rx_queue[q]; for (i = 0; i < rxq->bd.ring_size; i++) - page_pool_release_page(rxq->page_pool, rxq->rx_skb_info[i].page); + page_pool_put_full_page(rxq->page_pool, rxq->rx_skb_info[i].page, false); for (i = 0; i < XDP_STATS_TOTAL; i++) rxq->stats[i] = 0;