Message ID | 20230628185215.40707-11-eric.devolder@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9140013vqr; Wed, 28 Jun 2023 11:57:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4FWKku05fZQiexqNQs4qv4UUk1l+Gee+dxiaJE3GXcoapQfLjqmPKNH8nNaW2oim5ZQoLD X-Received: by 2002:a17:902:b788:b0:1b7:f3e6:5727 with SMTP id e8-20020a170902b78800b001b7f3e65727mr13777277pls.2.1687978643978; Wed, 28 Jun 2023 11:57:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687978643; cv=pass; d=google.com; s=arc-20160816; b=glXUlbn++4WquuwFT5okF/qjmOnVLzjwMWIM0+Pm0qiVaZ/ze9Z8RJ9l9fD9sS76w6 7zOaYTnKcacJNaNW0bgXtGzsWyUmdFZZdy+sgaS1Yz19A80LQNxuNg2KUafkdD8TP5Ni xeEBqULPFsTpGT9Z5G1M9yrHauAN8Ku7oFWqys8us3CSMfSrIURYMek+Q9Fm8gIVRGto fxLKtK8KODyy7pdlAzX9NOcWP0D9JuLswJHaoD4q6k1bdo/cUQzklJVAf9zk/jn3S4pj 4zYMao0BWaMIogEm+MqBiYW3GlDqH6kcxjxy2kGjStcHKFhc/VQ4eGA5hlO2CWCj5V13 eu0Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=o+McSM2gKtujfwRfyeOsaE02Y4bKTLqqTyQF/lTUOqg=; fh=j+K5GuuLTbxxisV+wJRNZBqbr6zhGMwAghI8ANXi4rw=; b=zXzlTtgd6FTiSwiwmyKr7V+3KV4p+mzM1dPk6YLdancS/aZl/+h/3onOrO1lXupdvy AGlDrXmsR3As3iCNgI/ICJAMatDUxWpwxtB22nBtTUjaiNibYVkREcLBSqpqZFehghA1 jMw1Axwsfyv+HXsayUMq/qn/EW+B44bLl+eWgi9zvZM/9jfRgIP9Cr+6Ig8Yqv5BtVyk eXWnykPLmZvt+uWe+RSg9PdIRJRFT3G1SThH+vTur6XF/z2UR21B8zjhzKFD87lUnwdJ /JE2BjA4qZOHnBs2zxXM8ZAf+H4GOoCD+SFEKZqzWi/H1IXaF7FogwMMFWsJciS0qIg0 iMqg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=UH13J6Xg; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Y5vLPveY; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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=oracle.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jc13-20020a17090325cd00b001b8052bdd3esi5987731plb.631.2023.06.28.11.57.11; Wed, 28 Jun 2023 11:57:23 -0700 (PDT) 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=@oracle.com header.s=corp-2023-03-30 header.b=UH13J6Xg; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Y5vLPveY; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233037AbjF1Syp (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Wed, 28 Jun 2023 14:54:45 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:6328 "EHLO mx0a-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231835AbjF1Sxg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 28 Jun 2023 14:53:36 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35SGx4EC000647; Wed, 28 Jun 2023 18:52:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=o+McSM2gKtujfwRfyeOsaE02Y4bKTLqqTyQF/lTUOqg=; b=UH13J6XgCVSJZdDvEd712RT4XBu0/jCLHfsA42mmFNUh9dOyb8x3vUwF5Zt2fpPg0JHm Qz08NxwT9ibcPBLgFeKhijatvri4R3VzQSwgeZH77cb9HRrMj/idqi4pZ1cgICIZ5nk3 wRWz1CT/7neumMnmRSykQT6+bfdt/63ks7vQjiW4v8+UdkZQBtcn6RMOwyAZZ35u+wgv vMT2FiHOOifEnnJ6U9xFP8Dts6FS4DxZORUJ3nJ1+D7NUzHUhpydLEEcuEKfuFIhdJ+g ALnLOZNd+jRUTWkhyBorEqlZqmvTnXlCh6ioGuptS+3mk4EDKxVAjE/WaVCjdYKJU80J Uw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3rds1u8gmj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Jun 2023 18:52:58 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 35SHbpmi003961; Wed, 28 Jun 2023 18:52:56 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3rdpxce51n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Jun 2023 18:52:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bKkMBfWCYHZZl18ZJhXaZVeQzDj3JVTKdY5DcqXFSZ2k2vW/M4r7bqgCsX7wOJgOX2chbXTLMaQUi/faznXEHktcd4b/9LIp1oXaiuLPu/202k1dqEP8vLJEtwEeO7YAE/ctPLNLhMnWMez9xZo+5Yl1i7/t0nOAPpt5WUfMftLl5VkjC2nw9GvLN/QXVfuExNyvJof9LZHh9ka/QYwkeGkfuGZdoIKH+6/4d3Lks9e+M20o/N1/mXa+i5Bl1tI8KrD88FE6NtqiE+bVgBwm6bTPbsQEu84CiadkXB2WW1gtdPBdPwrzqZN4EI20JUvAw7IMuYLJ4PijMjdkHSXPQQ== 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=o+McSM2gKtujfwRfyeOsaE02Y4bKTLqqTyQF/lTUOqg=; b=doxrrkOKoav2oz3h8M1+QE3bM8PfSws2rEMBcPFsTa0qV7qViPH2U6wIPAq5f5aRRXBXemkuOfHBmHNWtyuWkMt5CvJpjFz8SXIq5LTyHaJpg+y5WsoFtzX9cl2wzwffk5HyARELeoYrOXYixbbF4/NOZoRp1Yj9OAMm4rA8lRQmZ1TbBUc+8Mk/l5eOwjEwmQnSmLovDlcHq4/M148HcLcnsgErXU98jA+kRw//tQ6dR7VMi6kprU46rP1hFIGihyslopzayrFU9DlIQY+J6c7gJw5hFDlpFhJjWIAyEwC4XCUUrFQ9A3okJ/HVgyz5xJSSTgluCLVjXN6yQ5eehw== 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=o+McSM2gKtujfwRfyeOsaE02Y4bKTLqqTyQF/lTUOqg=; b=Y5vLPveY2QUDx6KfKBhflOtt+Oz8RyeacYFYLdpIzW+8+btIshN5+lX5ezGw8mN9mH+lgH1Oxbx3ZTxOj4QWXMZNiovZOFhVtg7rEycCm8fAvL63Wqwnd8AJpWEWmfd5GIdZsetxwZd4pxRCm2PxraAel1HraUBtd3UCHXknjj4= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by LV3PR10MB7820.namprd10.prod.outlook.com (2603:10b6:408:1b4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Wed, 28 Jun 2023 18:52:54 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::8b8f:b4b1:bb78:b048]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::8b8f:b4b1:bb78:b048%5]) with mapi id 15.20.6521.024; Wed, 28 Jun 2023 18:52:53 +0000 From: Eric DeVolder <eric.devolder@oracle.com> To: linux-kernel@vger.kernel.org, david@redhat.com, osalvador@suse.de, corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, bhe@redhat.com, ebiederm@xmission.com, kexec@lists.infradead.org Cc: hpa@zytor.com, gregkh@linuxfoundation.org, rafael@kernel.org, vgoyal@redhat.com, dyoung@redhat.com, lf32.dev@gmail.com, akpm@linux-foundation.org, naveen.n.rao@linux.vnet.ibm.com, zohar@linux.ibm.com, bhelgaas@google.com, vbabka@suse.cz, tiwai@suse.de, seanjc@google.com, linux@weissschuh.net, vschneid@redhat.com, linux-mm@kvack.org, linux-doc@vger.kernel.org, sourabhjain@linux.ibm.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, eric.devolder@oracle.com Subject: [PATCH v24 10/10] x86/crash: optimize CPU changes Date: Wed, 28 Jun 2023 14:52:15 -0400 Message-Id: <20230628185215.40707-11-eric.devolder@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230628185215.40707-1-eric.devolder@oracle.com> References: <20230628185215.40707-1-eric.devolder@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ2PR07CA0019.namprd07.prod.outlook.com (2603:10b6:a03:505::21) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4531:EE_|LV3PR10MB7820:EE_ X-MS-Office365-Filtering-Correlation-Id: e85c2bcc-b5f7-4902-dde9-08db7808e13a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ImAFtW6JXEJr9uTwQOfkGTHfkj2SSzV+S5ZXBCJoC+y/92l7kAaF4ZeAEkJxll1DRt7AgSsGCgOwI4D1oaugcEKxZk0mP2NR33BUuz+/nKQVektqN286aVCe3DH5pvzDguk0v7NNyDK1+paRQn9iB/v+8ywAH5/Yp9Fdf9zpN89/jPecYQtT89pNmr+Yt6LlpEPdM6AY/tACuUqGIqHi+R+vdBK84lYlfuqav4tB0IORdb2kxGuQBpszPoBTezjXq3d8SxMO5pMaoc/MsZQfBBaKADvCSHXA141qjDYfSqYGernHWhpBtWKGLGsI97DIqUWHAGiOw8U3+4DLlrgWh8OlC+wxgMsvoytxnB/wWPHh7PY77wRYDqokRn+nBhghzjIxjYd1O1MqinlkG5EPyU7Y8IXa5JyZYxWpcKu1uWr6mIAvaQx9wtEw26yzHS8VBXte/spidjHT93jojAYhnmGWo/QCMRqVU/eU+Dcrw1bNhGvvHIER2eOR+OxLR7zMODstUU7SdQH7yGxxFKtmvyhtCKIviVmAb2oX9WqKEEwyYMYlrDikP/1l1x0d8vUt/iQbs/rEjn/+0NTsBOOtlP9diYf92O1QKwqZaOVd1+E= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR10MB4531.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199021)(2906002)(83380400001)(316002)(26005)(6506007)(6512007)(1076003)(6666004)(6486002)(186003)(478600001)(86362001)(107886003)(921005)(2616005)(66476007)(41300700001)(8936002)(7406005)(7416002)(4326008)(66556008)(66946007)(8676002)(36756003)(38100700002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LJerea/3+BNz5KRRpLhJyeQrNcl095YWDm6BfQthYXVnNBdewKdI4UYKQYNolHU/r8DzdlK2iIJt0AgKfwOw1gdPswCMx0tbbXmJTNy453kv1ZRU/gXl9pIyXQm1/rj9/tUDCqUllv/rzHZVYXKbobi2Hnno9RN7XVVi2+9tqYcdNE+vdcxdrReTPszdDWUaXMeFOfWlvTN1wEe0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3VUwikchfsSqZrHo25VAJoSsF5YgQUenWmilDyP8pv0gNJCp4pemLELbr73/ZG5OQEtQ47ukcHiKgg0v29ZSgtI8rgdz7HLZQsnMbKwRcKvqtRuBWebzxTKIRF/2tyOHKhOyouJ/yHrQWigARJbyoavS8q3b3+MoxsT/Khe3HqEtRbqfyspmfrPASl2/sBTlNLwWUd0uxRyeF7W0RbiUPBehinf98PYtUw5p/2CJlgqAFiBago9S4jGBdzYDlVw+ViyPbeu2nj3LEcOSwFK5H7mi7rc8vtUES0pPVFDoiq94WP/z7bEG5Nh0jtGJRXTHJRGgM4iPKSYOVvEoOF+oL4vQ8uZiFrpcU5YVUxlVIjcfDAMZ/v+eSfhSiZCgbRM28utGkuRtxB32DcwJUqytLEXyP8fy0DtaUPECkWHJQMUa2oRRXa5vpOb8mU8hdx7zbM0qdSg6Nc5xiyvBKBIBbtz4tzTFtOauBus16z/tv0t0B4joIZ89ZNz/WIVUaoftAeFysdI16609RpqfxacuaOju03BW4fiv+8UD7MdytFhMC7QqUTknnZiOT5gxJm1J6NfCq3jqXTpSqCqwfV6F0GV6AKrAImXUlzqbmtFC/4+XUT8rKJQhaAmAxw3+hKtgbh4cdzFB5tDa+QvHf6ewQjUEBo6C4bqX1kQBFGRGvD80LA9z4pcwCs3fCWlPkqFX/jhpKEi91rhTs7bDDBps4K0rUthlUgXCbU1INXyjRRIyKhUfaWBh/cgTcgoXlIxgwx97QM9ayw6caI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e85c2bcc-b5f7-4902-dde9-08db7808e13a X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2023 18:52:53.8648 (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: Xku8gPtmRl+UAboMmG/ZI+rtftAEaLZh0FeeV7K48K0IsrWZKdgHSSqpxC0p7B+Tz9qG7nZDAuJeM2Zel+NdTmzzawT1nkMdiqlHGTQeD/o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB7820 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-28_13,2023-06-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 spamscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306280168 X-Proofpoint-GUID: YeSnm4XcdNd5j4J4e_3Dd3VpNl7vUEaY X-Proofpoint-ORIG-GUID: YeSnm4XcdNd5j4J4e_3Dd3VpNl7vUEaY Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769973894364086708?= X-GMAIL-MSGID: =?utf-8?q?1769973894364086708?= |
Series |
crash: Kernel handling of CPU and memory hot un/plug
|
|
Commit Message
Eric DeVolder
June 28, 2023, 6:52 p.m. UTC
crash_prepare_elf64_headers() writes into the elfcorehdr an ELF PT_NOTE for all possible CPUs. As such, subsequent changes to CPUs (ie. hot un/plug, online/offline) do not need to rewrite the elfcorehdr. The kimage->file_mode term covers kdump images loaded via the kexec_file_load() syscall. Since crash_prepare_elf64_headers() wrote the initial elfcorehdr, no update to the elfcorehdr is needed for CPU changes. The kimage->elfcorehdr_updated term covers kdump images loaded via the kexec_load() syscall. At least one memory or CPU change must occur to cause crash_prepare_elf64_headers() to rewrite the elfcorehdr. Afterwards, no update to the elfcorehdr is needed for CPU changes. This code is intentionally *NOT* hoisted into crash_handle_hotplug_event() as it would prevent the arch-specific handler from running for CPU changes. This would break PPC, for example, which needs to update other information besides the elfcorehdr, on CPU changes. Signed-off-by: Eric DeVolder <eric.devolder@oracle.com> Reviewed-by: Sourabh Jain <sourabhjain@linux.ibm.com> Acked-by: Hari Bathini <hbathini@linux.ibm.com> Acked-by: Baoquan He <bhe@redhat.com> --- arch/x86/kernel/crash.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index caf22bcb61af..18d2a18d1073 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -467,6 +467,16 @@ void arch_crash_handle_hotplug_event(struct kimage *image) unsigned long mem, memsz; unsigned long elfsz = 0; + /* + * As crash_prepare_elf64_headers() has already described all + * possible CPUs, there is no need to update the elfcorehdr + * for additional CPU changes. + */ + if ((image->file_mode || image->elfcorehdr_updated) && + ((image->hp_action == KEXEC_CRASH_HP_ADD_CPU) || + (image->hp_action == KEXEC_CRASH_HP_REMOVE_CPU))) + return; + /* * Create the new elfcorehdr reflecting the changes to CPU and/or * memory resources.