Message ID | 20230317212128.21424-8-eric.devolder@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2418wrt; Fri, 17 Mar 2023 14:38:10 -0700 (PDT) X-Google-Smtp-Source: AK7set9IZxAkRq8p0Uxrte8Im9QFTrs6wjHHsZNVcqBV+VLWxlrySFAHPuebi7tpK/HdH8yzcbUS X-Received: by 2002:a17:90a:2a0f:b0:233:b57f:23c5 with SMTP id i15-20020a17090a2a0f00b00233b57f23c5mr7620896pjd.2.1679089090214; Fri, 17 Mar 2023 14:38:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679089090; cv=pass; d=google.com; s=arc-20160816; b=W9+YT/Y6E5Mr/8+fJC5noFVWHKikIPgJWmIJGByED8KTyAxPX/ylR5uj86cQPa8ZU/ OsdGd/2sqCSQ1ZoJglmI1nO3IsHIdPH8KH92oV8j7yXtlbYLlMM4Cg24SGTuMaaJ5dEV x76SSyI5wDfKSzJcwTCTwMYRHfcByaf2owy7E3462iIwch5v85zvV8zeOsY6Rjbp4PjH wEO0dgaPp35IjVaDR/6GTh9In91eUQBgM6CJVgAuh8OnFiWvNPtJNVrKHFlEMSyT4XUW NDOQnkKOUQWGR8DQUKCmE2yVT3TnchXjtOoRiWEe+eumgI/kVyghVv/s3qyYlLaJoSvh nunw== 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=g1wxY3LICoo5vWQ+zWVRd+wf6XK2Gcx/FSKiBxH+Ieg=; b=ZG6c+iPFVQwDoEKMUm/s6lrC4SumT0HyWtBwYbzqnf2BpUOQSgojDBS4IlBtxTS2Hr myWwpV7SRKW2txAKT5DFoq5OVuOQ2jAq0x4q552pjBNxyYLJRonFrNcCchh3LPOFwe9h J8/7j5QgnwfkIeUfn+9fTAHQa1lD1L1DvxqqE6QYztR62b5ITOSEChXheDpUXFNjtdyo EFYh4JjbRryU847hMTY9Uqo4Q+g4JKOfi2KRgHKtd6jNsvWwxuGCtDf0UcQbXYO9t2u6 Dl17QLkgSnka76BvFtzCRZFmEyg961sULxmnzubblifOObcZ+/ZJSwf+xKKL/GMesWaQ fS6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=GyHNPqaK; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=UmJ9SKyj; 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 n4-20020a170902e54400b0019b0c650267si3599575plf.510.2023.03.17.14.37.57; Fri, 17 Mar 2023 14:38:10 -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-2022-7-12 header.b=GyHNPqaK; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=UmJ9SKyj; 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 S229647AbjCQVXP (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 17 Mar 2023 17:23:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230002AbjCQVXB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 17 Mar 2023 17:23:01 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB7FACA785 for <linux-kernel@vger.kernel.org>; Fri, 17 Mar 2023 14:22:35 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32HJUQ03020643; Fri, 17 Mar 2023 21:22:01 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-2022-7-12; bh=g1wxY3LICoo5vWQ+zWVRd+wf6XK2Gcx/FSKiBxH+Ieg=; b=GyHNPqaKnNIfqcWCYBYj0AC7YpWOEmYV8zyFcWLYrm3ktRTIhdZRBRPE3a0Sq2Gcy1sq 6/JpSl+eo3533RwK3EaWv4p2XFqDwg506B32RIVwBPf6sWJI3b1YELrrbQzSPCESS0IG tye9GRdK2DLaZlBzifDRzIClHs27NOctVxsmwAlk4h/5F+V3tYLJ1BsPaMmxWuxCrHVb voXcH3vSJAzAwP3mwWw7tR3fjL4Au/y2lVTIwra+UssZ93dCtMKovFUaW3X8030Oqrxa a65pHUjybneSCsJV419SzKlH+pb/kAOaqr2IqPQ/CWWIOYP7T143cGx++nLq6QPTJZgN vg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3pbs2651q3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Mar 2023 21:22:01 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 32HJAVhh002489; Fri, 17 Mar 2023 21:22:00 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3pch08j9q1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Mar 2023 21:22:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lPIha0LgA/u3GqH+WrEhnEYOzAwVzpzV5EJHYJyqiuujvvgqFE2fV7AOvs98Me4Lelg+agX2/SJW8xenn8zPfXzsaMCI6+GhBrDJ3Qou0Xr3lZMjHzZP1nG8n1ZbNPd06Bz/gEov4X9K0gYVgMFRhTtxXLlhabYQ+dw/Zn/XDHu7qJHAzv8oRxXPjaE9zpbj+A2D5w7ZS0sNwjGWvNMdJ9n31sbZE8Wt5YtfW03K7mM7cmcFkkcDJzzyvcY6Taou7ch+tfIo2gfGkJGI+61EdyUTo2ntjBAtMjjVuYnPQH56RcC4KTitko6JoKC869xAEl39MHnSfWcVskHCQ+kLPg== 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=g1wxY3LICoo5vWQ+zWVRd+wf6XK2Gcx/FSKiBxH+Ieg=; b=K8xF2pWb+qMFw6G8dgzPtn52SQD37ug12+Z8mprjR5Mom81BOozN2iBZILTw73Wzr/e7ZQd2lwpEsgyDQpckxcec5s4Ai/RnX2l2wpW20iiLHzvejFuiyP5zgHG2wwep892r9BEYqE2Z+vkyu+hfuLdqrfRiSW7UuPYifw6wdZmHbyB5imv+dtirt8sXsOW/Bo4otTTcjBjpbXNQHqqmNdRp5ZrlP4EF8mbKky2iOrp/CnGzq1NUMK+fN3Rcr2QQFVcaKiCJoRbm3MW/KnUDPyUK8mkSvhf7h/qIoKVYL3SSvhIji5oWDeQDnap3rz5l6z/iRioYK0msvBygLW6yVg== 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=g1wxY3LICoo5vWQ+zWVRd+wf6XK2Gcx/FSKiBxH+Ieg=; b=UmJ9SKyjQuL7UA+FDaeFIoLwnnOH2tE2d9QAeMZZ40nakRu/TAwgI2evlGN1aAVapzOW11f31Vj4xczodqkJTZVtow1OCrCAYa3J1jGbev2Na1kLPFZlIxJKwOWZxZWMGvn7ok8h2uoMzM7LCK0j95FYS+0l6oGljQgbBED/aw0= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by DS7PR10MB5901.namprd10.prod.outlook.com (2603:10b6:8:87::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.35; Fri, 17 Mar 2023 21:21:58 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::671e:6486:6996:c38]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::671e:6486:6996:c38%9]) with mapi id 15.20.6178.035; Fri, 17 Mar 2023 21:21:58 +0000 From: Eric DeVolder <eric.devolder@oracle.com> To: linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, bhe@redhat.com, vgoyal@redhat.com Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, nramas@linux.microsoft.com, thomas.lendacky@amd.com, robh@kernel.org, efault@gmx.de, rppt@kernel.org, david@redhat.com, sourabhjain@linux.ibm.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, eric.devolder@oracle.com Subject: [PATCH v20 7/8] x86/crash: optimize cpu changes Date: Fri, 17 Mar 2023 17:21:28 -0400 Message-Id: <20230317212128.21424-8-eric.devolder@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230317212128.21424-1-eric.devolder@oracle.com> References: <20230317212128.21424-1-eric.devolder@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: DS7PR05CA0054.namprd05.prod.outlook.com (2603:10b6:8:2f::28) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4531:EE_|DS7PR10MB5901:EE_ X-MS-Office365-Filtering-Correlation-Id: 1006161c-94c9-42b7-b0ed-08db272da41a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5wjmQOqC/i3ucJWBjhhxN4B/KIXqNDckkAIIJzXs+/3A25iEF8NWvvpZjzxfFcdX2k/Y5s1V/gK92njGsiXF7aOAzQ17Q2jkBaT/8hQJg9EbXIqFnwdtqXoP916u8G+VsMw9TUw0sGG10EWjZvtOanUBDg3aI3AVqmwDf4dFs4uCkGrELg6D4H4ipTElxO2o0T6Ds7J8ua6Z1Pvmyd4CsC05UYZw+9PEKEg80qtiipCzerGu05VhKUOsFnWjePs6FuHMQHtk9Eg14vacHO1P+HxwzW/OyVFjLFX9WgrdE++lPguvhVGMFpGo6eLt5UQ+T5kFTLFGZrphX4H0fu/tsY+ZRb8SoaFBhJPocGHIJFsPG7oTB6LJTJUOa29+5hHdFESSDD3yFtdPZGYedx3zkmXTAiBRAImWjn5zlLc+U4luAjQur1kgRs/xm3cJo6670y6p3/XyosGsGkj7AaZ5I59UM76YxeVJEDb0vcMqYt+6JVZu91Cxmd5V8l8I1IJcUZgQ5oyB4CUK2cpFGCGQ4XHhTr1mkgI6dgAZHJj0IhrbPEI1MRWyCWwUsMHyyyiGTRkhgb6c2a4VS4VQV+iBw8Tb+qx1lDrGjrI+jmTe6XVDGWs6adtkFb6HjH3FDKEyhCups9q7Pfen1pq823tlAA== 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:(13230025)(136003)(39860400002)(396003)(376002)(346002)(366004)(451199018)(86362001)(36756003)(2906002)(38100700002)(41300700001)(5660300002)(7416002)(8936002)(4326008)(2616005)(6512007)(186003)(6506007)(26005)(1076003)(83380400001)(107886003)(316002)(8676002)(66556008)(6666004)(478600001)(6486002)(66946007)(66476007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6OaSFJpWu3CdwIwTDrOTPcOR914oDEb4iKZeOQi+v2bOPcxJOn0ukEvn+ZHOc2KjvubXAU8kd7GRiRQyV8ks4xVwRO8rLwTSytJAbcTq6onCjM+x+qy3zOum/qUFVJyQLu3nvf2X8CuMrE6Hr15yFSAaKQ19nLNLNJ3qrQLekbbEvsr8IBenm+jdfkzvY66LJMinJcQQPm6ulySn8zDZk7nkMX1FL78Z0sSQu2oO2lEA6NrRD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7MsceCRsMXmohpHeOMvXXf5mrgyX4dHXh7+/ik8cWnw6PR5eT18WrsTzCOkOKnEqikyEyO5bE8bkqp35X7zVmk8XjXbw7JsJmzzNBNZBfLxKN4CjmpfvgNyHX6oyNEL8Nv8uGf5xSoliuM70SxHWCRE5yzDVhnEgAQArVMsWwq7L68zBdVEPsfYOWg8el213DAWlW+s8Hsmy1A9I9wdDLMsutBpHau5PJP4rhV+3+e+MXZi/gR2gRODG98tHlBBOwg7gTricKSC9bR+GmJXnMt/d//c/QpoZ5HkJedt8njaX6ugIyG27c/SUghDFDRD+K/OPs1qms3f/kCxJ8afo2z6FGXjstCAOaktliCERod+xD0RhEv3dSLYvfjdgFpebOQKxFzHLezugwKnMAYXClCId577cyqucdvK6gePXT8OpityBKpDnQWlQfrve5BGwySH8lb0PlIYZ0OeGXn+jnS5ZKRvooxkN2M= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1006161c-94c9-42b7-b0ed-08db272da41a X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2023 21:21:58.5156 (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: HY6AeWuQgiaIGHwjB/NLlgyLEBqIMa5WooeMuVofPkHL1ZsdjxMJvC9yfDhA15Zs6rTHKGI6F9EcdcmGOeZoI2gssCEH3Cg7/t2Smpd8ovc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5901 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-17_17,2023-03-16_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 bulkscore=0 adultscore=0 phishscore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303170150 X-Proofpoint-ORIG-GUID: 8Zlx89WUXmEXL5fSB-2NI3gezei0pgKl X-Proofpoint-GUID: 8Zlx89WUXmEXL5fSB-2NI3gezei0pgKl X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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: <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?1760652521861428413?= X-GMAIL-MSGID: =?utf-8?q?1760652521861428413?= |
Series |
crash: Kernel handling of CPU and memory hot un/plug
|
|
Commit Message
Eric DeVolder
March 17, 2023, 9:21 p.m. UTC
This patch is dependent upon the patch 'crash: change crash_prepare_elf64_headers() to for_each_possible_cpu()'. With that patch, crash_prepare_elf64_headers() writes out an ELF cpu PT_NOTE for all possible cpus, thus further cpu changes to the elfcorehdr are not needed. This change works for kexec_file_load() and kexec_load() syscalls. For kexec_file_load(), crash_prepare_elf64_headers() is utilized directly and thus all ELF cpu PT_NOTEs are in the elfcorehdr already. This is the kimage->file_mode term. For kexec_load() syscall, one cpu or memory change will cause the elfcorehdr to be updated via crash_prepare_elf64_headers() and at that point all ELF cpu PT_NOTEs are in the elfcorehdr. This is the kimage->elfcorehdr_updated term. 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> --- 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 0c9d496cf7ce..8f7b0b7fba90 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -456,6 +456,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. This works for both kexec_load() + * and kexec_file_load() syscalls. + */ + 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.