From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (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 772A71A0712; Thu, 27 Nov 2025 12:49:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764247769; cv=fail; b=EV7RZ3xClDeSm+GTMNeLkwue80mwWxVD8z/EeMLqKcIQ8whQzhsGpASGsfNkIv4GCSmJXZNtKaMPEjoMEZAWHYssm/2rlM1eqeAkV5oMKh+gSM5phbVgu/1M5cEGyvCglk0zWehWm3foUV/5CI4lKbKtB/LhJNUQKG+/v7/32zs= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764247769; c=relaxed/simple; bh=pV4k+d8opEfAHQ87a4ehaj4iwB5UO/rTTw/6zgm5uXs=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=sAwcKfQuglhJ45YZN7PMM/gUexnVsh5kNWfquZOs7Dmv/dm7E/jklle3TLSwOrPBjPW9L3mCjFtNx7eLgWdjkRvxHW4A4ddznUVN716SZ6mKCxJAd/MNJmnRRA0As/u6DkPc+1lFOz4wPWeanLx/ipih8fagWCXmp3Kj1BEtitc= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=eWq3vUQ+; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=x176uusF; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="eWq3vUQ+"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="x176uusF" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AR9fZxd356107; Thu, 27 Nov 2025 12:48:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=corp-2025-04-25; bh=n9q5VOXnfR6V9LlOUo gGwX+MhDDdVJ0SvgLk0+PBh2s=; b=eWq3vUQ+UC9iDGDpTuwCRZlLYMTDZCHD5r hHgwOuU0kiIpWeIy7sY272tki3MJ7Iam+F73QNzEw3vPCijCEwxSdSqQCtUXd0Gw BVyFSCtwGW7sSPyPVqIb8GqlzG05sxoPnUwxfdl/A/sdRMkGRdQRB4Mdk3tScXIN 4pIbmWKXXGdJZo5jHG2Q/R5p5oXPLM1m26+40KzMAJe3a3qDLuIyOHhgaIRDjOeO vQ9EAahCY3Cu30qVGgZ9lwRUGRoosiR8+jzTfBAvydC1X8OsyRNLSKPsV5iVH9MX IlwnlUwAsEF+ZehSzNUjV/GDN4TprTSC60ZsoaAZQ90gPAtn96rw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4apm7ug920-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Nov 2025 12:48:57 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 5ARAaC8b032791; Thu, 27 Nov 2025 12:48:56 GMT Received: from bl2pr02cu003.outbound.protection.outlook.com (mail-eastusazon11011025.outbound.protection.outlook.com [52.101.52.25]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 4ak3mc8fac-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Nov 2025 12:48:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JydJ9POwvlfRVbYO6uxUrTVwfZYziPgjbdj/NkjrPxFAmJBEZHG7f8ezTn2OBYrR0B+aaZSAWfTMR9grcmxvhLlfAnJGHYJXFIRBR3QqjHsN8qDeG42URCN2VbgCZwjLMpmMYK0tfngD9oxvMahuhOBZkxG+ufVAeOWtSL6XpsNTSiwdtuCC0EeftH2FjtiuT2vL5nqcmQgTsFCd9bFN4KYqwpD1kNFuUxV2HLfpDmulCAJplem/trFhCtp9F2X+sAMqJVliidvBP2fpb4V3B6FaRbIW3DwHMAXnL/dWPTeGQzycwy6oQ7P0H4dQ8pEGDmZRQH8VKvMbh+fEfsmN7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=n9q5VOXnfR6V9LlOUogGwX+MhDDdVJ0SvgLk0+PBh2s=; b=dHvG0+bt/2Ko1+SCjWC3/AxWe3LFUqQlA//C5kf8Ale/PMlrLAB8xDyElaKbqI3yuqFZG9OLYjtlMWPyn0C6RPkCXa0cKxAGMbUx/esarhQGLkV1oaDa5Xphwg+OG/6zHcDWvGmnW2k9K9dVOVsrKjULgmBWPbGrKRwAUtfgkO93lbGhSWXsC9jquUQT78m+5DXh6WCECJ8HKQaBHyg3U670hQbCD2HYT89grHRhyY8cIyotHQ7c7A0X6VTiMh7bIrAUldrSVWk6kcOAd0DrH0eRYDbS3VD5iSHr7uEY+p1eBIEfi6NJrjGCBAK8HIOMXrK5TfB62okBQqcwe3Q+EQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n9q5VOXnfR6V9LlOUogGwX+MhDDdVJ0SvgLk0+PBh2s=; b=x176uusF5LK9hWsbPG0lDcedRn8nde7khIfzXhC90OxGYl4QESYVbGoZLTvW+7p97lLvLk4f7nj2x81hwDYR5Ab6u8/fDiFSLfq+lUtBwcl2Zr0NU00H4C038hj4cs24/2oyZERf7jWma9zXrZ47vTMf4+RTnsv9krOyLCEENfE= Received: from CH3PR10MB7329.namprd10.prod.outlook.com (2603:10b6:610:12c::16) by PH7PR10MB7036.namprd10.prod.outlook.com (2603:10b6:510:274::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9366.12; Thu, 27 Nov 2025 12:48:52 +0000 Received: from CH3PR10MB7329.namprd10.prod.outlook.com ([fe80::c2a4:fdda:f0c2:6f71]) by CH3PR10MB7329.namprd10.prod.outlook.com ([fe80::c2a4:fdda:f0c2:6f71%6]) with mapi id 15.20.9343.016; Thu, 27 Nov 2025 12:48:52 +0000 Date: Thu, 27 Nov 2025 21:48:41 +0900 From: Harry Yoo To: Jon Hunter Cc: Daniel Gomez , Vlastimil Babka , Suren Baghdasaryan , "Liam R. Howlett" , Christoph Lameter , David Rientjes , Roman Gushchin , Uladzislau Rezki , Sidhartha Kumar , linux-mm@kvack.org, linux-kernel@vger.kernel.org, rcu@vger.kernel.org, maple-tree@lists.infradead.org, linux-modules@vger.kernel.org, Luis Chamberlain , Petr Pavlu , Sami Tolvanen , Aaron Tomlin , Lucas De Marchi , "linux-tegra@vger.kernel.org" Subject: Re: [PATCH v8 04/23] slab: add sheaf support for batching kfree_rcu() operations Message-ID: References: <20250910-slub-percpu-caches-v8-0-ca3099d8352c@suse.cz> <20250910-slub-percpu-caches-v8-4-ca3099d8352c@suse.cz> <0406562e-2066-4cf8-9902-b2b0616dd742@kernel.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: SE2P216CA0068.KORP216.PROD.OUTLOOK.COM (2603:1096:101:118::11) To CH3PR10MB7329.namprd10.prod.outlook.com (2603:10b6:610:12c::16) Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR10MB7329:EE_|PH7PR10MB7036:EE_ X-MS-Office365-Filtering-Correlation-Id: 3471c8c3-6d00-42c5-c977-08de2db3516c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|7416014|366016; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?MfAgfy58Yqrh/2OMH6LEGPGgh4JP0bNK/USwXc7SbfZ+O5VIFOLe1TL0m8Od?= =?us-ascii?Q?JE2VEEWw0RL11zQYVrAwbRMp698An0zZE2gEAI0IJ934+EdNMPCzZsekxNHg?= =?us-ascii?Q?JLuB5SjAJq5KHusKZLTIf6g7jLF81Lvn+5hwbmg0ZlwHpdMjyXArd62RAAE3?= =?us-ascii?Q?t0bnXa/1Keti2pUvpv6ZW52oHLByPeU/4VUIIqJB1Wf5RStifr1iaaSBU+on?= =?us-ascii?Q?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OvPfHelhFcwa8uMQDU0foEasVOe?= =?us-ascii?Q?L2sf/nlTeGjZKBt5rhAcraK25riGEJUwZCBIGor/tGmSi/a91ECIyGv0s0Dm?= =?us-ascii?Q?0cviakq3RpTg+ECHETU5kNopaW8UtQbk3Yr4shMEYth8nBiZ6T4tPG22gWU5?= =?us-ascii?Q?pTLL3lv03HNKRljDLNrTYBjAh2fyGG1IVR59myPpGFzM825HvrTh0oFehtn1?= =?us-ascii?Q?MOeiH6WUHdvLs77rD1IYdaW69RKjiP6V9hpnreEX/pi20GLZbKJ5kuglFRlH?= =?us-ascii?Q?dWU7j4NODkuJCPBSFhG+yHGQ2neFe0oKJNbDKOxM9EuCWqNYJlw15NBk+f0n?= =?us-ascii?Q?EvD4xf2THy0yO84UJhRiFfDKXxj86HvO?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH3PR10MB7329.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(7416014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?I58uubpp6jjHXJOKInD5mrGq5x/inKKhZSmiE4xsDLsG7kI48RzZyfRslXc2?= =?us-ascii?Q?DYlFqx0s75VHQiChqG6/Vy1EAQUrIlI2obwhoDEy2VFyCv1zPwzlH/BBLmvH?= =?us-ascii?Q?mIv9TcY9drMmFGW9jhhG3vPksO7a8GU+2gOLNtkJzduPszUPDR4u1/EXQwps?= =?us-ascii?Q?kGZoO/wzsTxZELMXU2VlMu3otZLwclR2wGV4flD26L+9dQqoCAF6F+Sqsv46?= =?us-ascii?Q?rQ66voAR2yMOTqIbuI5w4iNMq2hXHHsiTNLbj4aIqsiuzDgIkoXsAS9yynay?= =?us-ascii?Q?dTtnFuQMktKvXWqwDV4pUDXe2/A8P4/Dws11c2VpZfBFiQeNj07nlWk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WD4yUrXT+EOU6K5djIve2gs+tN9rchQv7WZaQro2Q2N61r?= =?us-ascii?Q?9jpsqW3ZopsQ82FIeScjUowMz7/J3n6Va/fw+UUiV/uihq/NtdPCXvgDeHXj?= =?us-ascii?Q?F5ql2Wu7B3VA7c6h6W+bIOz/n1vhi94n9KPNA/koolFGL3GCggB8vN6dWvf6?= =?us-ascii?Q?Cj4PuJ84l/jDF/lgsusTgyeTJMNP7aulFnjMQa9KsDv/IVUrYtBZc9flvyet?= =?us-ascii?Q?FQXrPYEBs8+bX0spfrjLLJlEttEdQS7+fJULVVFYoST9+SPsEJ2urUJROngB?= =?us-ascii?Q?B95S82apxF4Hcj0BQof4WwLwo2a6nl4kFc5v2exd1FAczKkNL3rvImwoF7MQ?= =?us-ascii?Q?xfi5xSuqq58k1FYDwBBM8Xx68x7TwQw3HGrUhb30?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: I4JB0KDCJj8h32aWGQfz3M0de65t/XrSHw0qBxhC/LXZcpPvXI7fsfdxIlgJW3osO12j3tTGg6dm2BO1yDdfPakiDk11UNbQhcCcWUGvVtJp3M9dxO81WJxjhdYOGWkzFT/H/d58GX56IFpkGyrCwLwfbJLaV5rmc1kpYMB7h7spQCDbYqhfU1LfMAwO7f5Pnsfk/w1q8YXpGJz/KxsxA7c5wHDE4+peKITreLhNKRPoP+f7z7/Pe5pTV/gSq7IHIljGqaSnc2LlMmtRw+0XJxFQPdJnlAnkgIOXvtjgwyr7WSGMNpSg40NPZALtX2jqjqh2IkJbBI/J+tyktGeKlzc5N99Fn6RtFowLwvz2e3GVU1+q4hOGRTylCSL24H4YZ9zbnHS2kcgM/U6F4cCfmiMUU/95cQIrWIgU2YvfV4aCKCt9sl/aMhq/1ffjTrg4+5cGKSK4FrWQQ6Qh+qTgb2L73qpkpa/ZEzuL7YokfwimBnGVCqIHQKpvhUQtbxDPQfdPe5ROH/44ABAcIrW/J+00gMVKpLg329mQIjgQEEYptNWj9gi1I3OGnhFt2cheDr4r8sFsIuqesyH/+RCGGclqbiGix8FzZGT3x80abWw= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3471c8c3-6d00-42c5-c977-08de2db3516c X-MS-Exchange-CrossTenant-AuthSource: CH3PR10MB7329.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2025 12:48:52.4843 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gtmKLdr3zckkXZeBDE7JwPeWJmK9BNxO5cyrbnN5kh9NPn24kwG3EjWMTmkqlzeff48acyiUVOdbhdJAI3+6nQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7036 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-25_02,2025-11-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 phishscore=0 mlxscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2510240000 definitions=main-2511270094 X-Authority-Analysis: v=2.4 cv=RuHI7SmK c=1 sm=1 tr=0 ts=692848b9 cx=c_pps a=XiAAW1AwiKB2Y8Wsi+sD2Q==:117 a=XiAAW1AwiKB2Y8Wsi+sD2Q==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=6UeiqGixMTsA:10 a=GoEa3M9JfhUA:10 a=VkNPw1HP01LnGYTKEx00:22 a=yfD7rJDz0UvptAvCqdMA:9 a=CjuIK1q_8ugA:10 X-Proofpoint-ORIG-GUID: l_KxT3fpNlocDJKd0QKmil_Tw3Ae5l0H X-Proofpoint-GUID: l_KxT3fpNlocDJKd0QKmil_Tw3Ae5l0H X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI3MDA5NCBTYWx0ZWRfXwxjzMzXcAL2X ymTnBvBFba+GRuoFKPZZeViV6P3KXGWmf390Va46t2iAswwFjqtVDEqDFJo4K2iV5Dx3RFaVqoa 1xREGfI4piTFNVFiSx3feVbSoUCcfHZJd1DASjo1AxjhZNx7PXQYwvncyqmUqMNQaZrtXDvoizl 6zbdgS4qb61IVg1z/ZJElkw9clpth+gXjBnfSRVLhpmYS4rXEZRRrbHOCjRDuvGnXivxdDUJZFh wKynUAq8EGdTcmoMDxr1/e6baJ58Aqf4wlognZOy7obc/QJf5OsJBYzeaQe+V/6cxH2udZSClUo yNGM9jnR4P3zhvekhzh96/LQJ78UboKeqTK6iKXFXleDLyAqr04Ff9zKM+X0hZaN0W4V9vKIAOI 8dZeFB+gcGcxt2WlaOI2yLq2TYPK7Q== On Thu, Nov 27, 2025 at 09:33:46PM +0900, Harry Yoo wrote: > On Thu, Nov 27, 2025 at 11:38:49AM +0000, Jon Hunter wrote: > > > > > > On 31/10/2025 21:32, Daniel Gomez wrote: > > > > > > > > > On 10/09/2025 10.01, Vlastimil Babka wrote: > > > > Extend the sheaf infrastructure for more efficient kfree_rcu() handling. > > > > For caches with sheaves, on each cpu maintain a rcu_free sheaf in > > > > addition to main and spare sheaves. > > > > > > > > kfree_rcu() operations will try to put objects on this sheaf. Once full, > > > > the sheaf is detached and submitted to call_rcu() with a handler that > > > > will try to put it in the barn, or flush to slab pages using bulk free, > > > > when the barn is full. Then a new empty sheaf must be obtained to put > > > > more objects there. > > > > > > > > It's possible that no free sheaves are available to use for a new > > > > rcu_free sheaf, and the allocation in kfree_rcu() context can only use > > > > GFP_NOWAIT and thus may fail. In that case, fall back to the existing > > > > kfree_rcu() implementation. > > > > > > > > Expected advantages: > > > > - batching the kfree_rcu() operations, that could eventually replace the > > > > existing batching > > > > - sheaves can be reused for allocations via barn instead of being > > > > flushed to slabs, which is more efficient > > > > - this includes cases where only some cpus are allowed to process rcu > > > > callbacks (Android) > > > > > > > > Possible disadvantage: > > > > - objects might be waiting for more than their grace period (it is > > > > determined by the last object freed into the sheaf), increasing memory > > > > usage - but the existing batching does that too. > > > > > > > > Only implement this for CONFIG_KVFREE_RCU_BATCHED as the tiny > > > > implementation favors smaller memory footprint over performance. > > > > > > > > Also for now skip the usage of rcu sheaf for CONFIG_PREEMPT_RT as the > > > > contexts where kfree_rcu() is called might not be compatible with taking > > > > a barn spinlock or a GFP_NOWAIT allocation of a new sheaf taking a > > > > spinlock - the current kfree_rcu() implementation avoids doing that. > > > > > > > > Teach kvfree_rcu_barrier() to flush all rcu_free sheaves from all caches > > > > that have them. This is not a cheap operation, but the barrier usage is > > > > rare - currently kmem_cache_destroy() or on module unload. > > > > > > > > Add CONFIG_SLUB_STATS counters free_rcu_sheaf and free_rcu_sheaf_fail to > > > > count how many kfree_rcu() used the rcu_free sheaf successfully and how > > > > many had to fall back to the existing implementation. > > > > > > > > Signed-off-by: Vlastimil Babka > > > > > > Hi Vlastimil, > > > > > > This patch increases kmod selftest (stress module loader) runtime by about > > > ~50-60%, from ~200s to ~300s total execution time. My tested kernel has > > > CONFIG_KVFREE_RCU_BATCHED enabled. Any idea or suggestions on what might be > > > causing this, or how to address it? > > > > > > > I have been looking into a regression for Linux v6.18-rc where time taken to > > run some internal graphics tests on our Tegra234 device has increased from > > around 35% causing the tests to timeout. Bisect is pointing to this commit > > and I also see we have CONFIG_KVFREE_RCU_BATCHED=y. > > Thanks for reporting! Uh, this has been put aside while I was busy working > on other stuff... but now that we have two people complaining about this, > I'll allocate some time to investigate and improve it. > > It'll take some time though :) By the way, how many CPUs do you have on your system, and does your kernel have CONFIG_CODE_TAGGING enabled? -- Cheers, Harry / Hyeonggon