Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1742134rbb; Mon, 26 Feb 2024 22:29:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWl6LuLyclHYc3qQVi7wA8ImAU27jaLTVYAA2EvNXzBMN5R3jYu3G7a8896eRL08qHSIAEed3YEbzcC0RhRsQGb3IM+p1L0BkSXzxPkhg== X-Google-Smtp-Source: AGHT+IHEUqMqwtyOBiJxe5hsomy151D/81Y849EEMZBmPVqgun4k0OAzwJBZFgeW3h10d3ts29Pr X-Received: by 2002:a05:6902:52:b0:dc7:45df:a04c with SMTP id m18-20020a056902005200b00dc745dfa04cmr1358827ybh.43.1709015374530; Mon, 26 Feb 2024 22:29:34 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z6-20020aa79e46000000b006d9bb8e9e5esi4887535pfq.356.2024.02.26.22.29.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 22:29:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82745-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=niz9uMWf; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-82745-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82745-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 31CAC286CA6 for ; Tue, 27 Feb 2024 06:29:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB18A535A2; Tue, 27 Feb 2024 06:29:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b="niz9uMWf" Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2126.outbound.protection.outlook.com [40.107.93.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CB6C5336F; Tue, 27 Feb 2024 06:29:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.126 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709015357; cv=fail; b=pBjpnMa/fJnXSAmdxVMGjR13zGR4VCerHsuOps5Wun4B0IG8qqX39I/4UCyV6MUOGsIdRwrWvl9Xrqsc78sFOtz90K+G+uEM2bb6NmXZqms93Lh63DbbH+cmb2JD8K9pv3dOQI9BpSKjQk99dnPFTOZ2qXHPMwxfDYmR5gRTk7M= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709015357; c=relaxed/simple; bh=fqYCtsSsZk/MGcEz9WjUR8TZFULim2ZHZGCw6omxD8s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=aDiXLYsPA4iUpKHExwnvycmG7Q5R7i9InPkBXEs7poCr3St2W2LvhFm+P8Yry2o4dTF6Kr6Th4tfShcDoyDoWJ4qYK0UUzssVoGdRXaCsxR+XFp5WStKR3f4IEo5I579sOhReXoo83YJYQeVUUf8O5GifNtHhruJsAhvycWAcHQ= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com; spf=pass smtp.mailfrom=os.amperecomputing.com; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b=niz9uMWf; arc=fail smtp.client-ip=40.107.93.126 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=os.amperecomputing.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XTdMrDD1fNOycqJw0mlnLgJHLmYCaglmYsTd+XcA9i4tYTf+LtpE5KHQI6cmcxT4XPkxc6dfk8TL24Hn/hDl1mnwUrAIBpkHPOWAlehs3vZ9dQUzZeq/seBeQJ8I6ZYzGNylQmjI8gckJ1TsNQ2hwOGrMbd1LmaapJWFoCRp1XJSjFlKv3IoJuvX8CY4yCD1pKSmFIgV3folkJovXfSfRo4eYCcOr/tO3u1I/RJcGYtwBt8GgBKkstSge82Dsk1F9TKLMJCS4xeZVap5uDdYlv/jxUhwTfbPpSrbVQepUggYZAbKQiiG47a4euC08u2Y+0eaFRMj+hdSQY3gJec/lw== 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=9D/ByiUYB9Nmz29bMpCmqOTAa4W6ItsbRyMEzRnE76k=; b=WuwRQzJdncrehHn2pn4y+BZE+kZ01XeitBwLBcue1QDw7VvIrY2OMkqlluLIf3kU6mY8g2OUTb8h1NJUcfX/xJBBK+h+52V1J5FfyjjAdAmhYaPZwHLnKdsKl89OPyWXejjgUkUcnAR9A7Iinlk0SOpVw4AOZyi00UuctH/R9zuXrCipsRm3DR5aOXD0oBCXs2JtAJks9eWR4/fptXaQr7FegbbNwGPQ8dFSHY2YAhSJR2aSrLcFtFqNwyr+MB+Q3kSK2X8RABVLKsWgsuh0Mob7K0Q+59xnSOF/IELpJ9gGhmTFYqP1iNklut1eF0fWVIMsHaiC+3ScZH9BEN5m1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9D/ByiUYB9Nmz29bMpCmqOTAa4W6ItsbRyMEzRnE76k=; b=niz9uMWffNeY2PNnFh+CbPDJQo9E1SSF3VkLYzZxL2dtZdDroOBfW07W1G3VZFFwdjwMfFA5I1ZHjyGpezVC/jZ96Id0v8TQdSRqSOjzyG7Y+ebXhypSZ8lxi782n+x90+mchYLfVmsQ9dR0PM8NVSVdTWGCBujZGsicb1U01c4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) by SA0PR01MB6172.prod.exchangelabs.com (2603:10b6:806:ef::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.36; Tue, 27 Feb 2024 06:29:12 +0000 Received: from PH0PR01MB7975.prod.exchangelabs.com ([fe80::91c:92f:45a5:e68a]) by PH0PR01MB7975.prod.exchangelabs.com ([fe80::91c:92f:45a5:e68a%6]) with mapi id 15.20.7316.018; Tue, 27 Feb 2024 06:29:12 +0000 From: Huang Shijie To: kuba@kernel.org Cc: patches@amperecomputing.com, davem@davemloft.net, horms@kernel.org, edumazet@google.com, ast@kernel.org, dhowells@redhat.com, linyunsheng@huawei.com, aleksander.lobakin@intel.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, cl@os.amperecomputing.com, Huang Shijie Subject: [PATCH v2] net: skbuff: set FLAG_SKB_NO_MERGE for skbuff_fclone_cache Date: Tue, 27 Feb 2024 14:28:33 +0800 Message-Id: <20240227062833.7404-1-shijie@os.amperecomputing.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: CH0P220CA0023.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:ef::25) To PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7975:EE_|SA0PR01MB6172:EE_ X-MS-Office365-Filtering-Correlation-Id: 54bebe46-5258-4e70-7d89-08dc375d692a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6+iHwamwwk+dAH8WRpgbFPm02DFLs2yEON1JsW5p6Fup8PauWe26115xPaytP+VMMy4GUvY8XVHTb5+T3MA0sebPRjrdY9kkvM1eeyokdAiRrzdz+ox7F6eTpkFjE3eierLf8F3w4RTK+++sOTlBdY+DKh0e+BpbAn2eowECbrEzZWdR1H1rIarlcQT1F4BFwL5UtuH8AQz6cNbZWPlvY8FuE4QWZyG+wqN5IUWypUfI74Iv8Uptsd4aKOMGh4/Co1jWiVeinKVBuWEhOxXWP2oPvIJcU7NObPGLkX3NJEB6yq8dQuHRzT523JVa7p9icmBF9d7d1MAgfhVu+RrRBMRGVHcaX90w2DR+cwJ7cpsgmyNEyuHXfXM/wxlymfLFUhGBRESjd1Q420yIFs8P3AnMP8WwLT2Xv3yKxnzWb4KgjpIOrxnwq7zl3pqyAGQKE5CUuT3TXSHkQOyJ6/uX67VxfvSOm3lWeQ6syuB2+7QyGRJ/cDiAs9JDWs/DdN34wov8jqtb1J/wpzsYyRFshq6EjWKwmkdjBPq4OIoXYoaFfEwlQd+0T7ciEgXe9SoftOLRsIEezZOYmw5sc422QwONGkWtrHtq2VF+oEozIyjld1gF7Xzf4rN1avtVM0OWw0VyQlB/376h78bTBvBNRoGesF/6xrgS3YaSi5Mv1tLG+ecJP5ZVRBDJY1VVRKb/qdznGkXqsw3pTaaQWX5i4Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB7975.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ab3DLWXeLqikx9aXFqx31ShbKio8+ibLrXFNcJJNNlZG7CtbAMsXSciYMAIS?= =?us-ascii?Q?ZwKs3Y+DxMifG9jJ49aMR3GSNpTqXGME+C8B+TmVsywMWx3Zoba2R9Np5C/s?= =?us-ascii?Q?1N78iutJNouURoCV29ICY98K+6Rl44V658e2IqE3srOUfYKObRMVTcWxqgb/?= =?us-ascii?Q?J+TgEbWDb48RouMIwOOv3ZLVLgMY6m2ualny7LK4PhRCAxtDHmeB1lpAxuKP?= =?us-ascii?Q?19Gun1DY/fXgj/IESEQLo+pcnOsf8cW8VUGBGZzpSmT27VEN+BNT4KE4D/7w?= =?us-ascii?Q?sCVbrq4+2AY3pgepcR32tKhv3piSaxpkGk+FNY2ONraYEAs5QzXLzw9qEzVv?= =?us-ascii?Q?eFXwbbdrQ9d+edw55T0Rf0BfgZPl/kZyqTM90g7QUFf9iAItjrvWIvMMV37u?= =?us-ascii?Q?RrKq9XKMwJuDG5/eEoZjoJyHIJt1YcfbEZ1hdZZWV+Cwj2DslXzjPZgHzqm/?= =?us-ascii?Q?xs7hyAuEYZV1UQjq1eaJxvivhkIcw5VLSqGpB5FKhvavyd05We7IogFj0Feb?= =?us-ascii?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ujcjnrF?= =?us-ascii?Q?p+1ITDLeoWfND7jQIGrtZtXGX8w7Hv3F1FpOEetsdFTK7GpzpCmS/WIaM7eR?= =?us-ascii?Q?jIMZO6exk3txvnlteoO15bVpCBpmCdpvaLQZrnIpeL8quI+5f8dip/2u+DTo?= =?us-ascii?Q?9EzMuWFERg/AKR3CTQa510p6lOZNqgUBeQFk4QtbioGPTbhLpz049gfdZBx3?= =?us-ascii?Q?gw=3D=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54bebe46-5258-4e70-7d89-08dc375d692a X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7975.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 06:29:11.9634 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EoipA8JqLKQ9ldPD4SfO4kW9SVlM3+bgmP+QHbg4gIRk/w9z2aDSuVuFAUZRPGhsFgQpyrw0ejtAWC+r/pgeTIA97hbzakXekHbMPNaiZtMGhw7CqzIXIYxJ5iS89kBi X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR01MB6172 Since we do not set FLAG_SKB_NO_MERGE for skbuff_fclone_cache, the current skbuff_fclone_cache maybe not really allocated, it maybe used an exist old kmem_cache. In NUMA, the fclone allocated by alloc_skb_fclone() maybe in remote node. So set FLAG_SKB_NO_MERGE for skbuff_fclone_cache to fix it. Signed-off-by: Huang Shijie --- v1 --> v2: set FLAG_SKB_NO_MERGE for skbuff_fclone_cache in initialization. v1: https://lkml.org/lkml/2024/2/20/121 --- net/core/skbuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1f918e602bc4..5e3e130fb57a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -5013,7 +5013,8 @@ void __init skb_init(void) skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache", sizeof(struct sk_buff_fclones), 0, - SLAB_HWCACHE_ALIGN|SLAB_PANIC, + SLAB_HWCACHE_ALIGN|SLAB_PANIC| + FLAG_SKB_NO_MERGE, NULL); /* usercopy should only access first SKB_SMALL_HEAD_HEADROOM bytes. * struct skb_shared_info is located at the end of skb->head, -- 2.40.1