Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3220272rwd; Fri, 16 Jun 2023 14:10:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7uZL9o7T+ZkbYkjVA6Gydqsm0mOCnNn8Pn41D4FhRLnryHJm6nXODLIy2DJ8CcZADcZlnQ X-Received: by 2002:a92:d452:0:b0:331:3fe4:f2ec with SMTP id r18-20020a92d452000000b003313fe4f2ecmr402073ilm.26.1686949835789; Fri, 16 Jun 2023 14:10:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686949835; cv=pass; d=google.com; s=arc-20160816; b=vxMlQIKePS5lPYst29R4S9hs6hZ5p6cIW3eN6E6BGfkb52zsq3dI0mPhoyV3OqypL7 i8wZemABdzBY8ILIzlvaeV1bhZ6zpkAsQpCic/yUDGBK8OPyiDHaGTJAfZ7tfG550Dzz 2DjPwdrE3P8jGerFmNyDjNkeqN9kN+9rWnieesgXQzlvmxZbjiNNHn3F+eII8+ZNbFCF UpyyoI9PWggLzfrGRli2+uVD3BfpNOCOyUrr8Iu6g00+dMnChQGSc9LHVXUTjbzSwdfl mGm0SAegDlEIyINm/yNwGPp0UAwa/+gJGsRI8ZPC15ImBDQOMWbh0elF6uq5j0pjINqP ULLQ== 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 :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=FVRYkNYp7O2zzPKQAlsWaH5BwcccTNYSaWp65RYt8YI=; b=g9NxlpUUnjQ1IqNS88QHsjbNsbiDPyU81QC5sULdI7HVDTi9guOeKxFmesPMM/3dhp KiCxKbiFqc5WuzUDqI5Aheexw1oE2OALgQQ9+HDCIGI/sUYpkMF5Y1UBvmJQEhEoYzxS uFgX7otgEDidLfw4I6FP2vtmnmUtWc19WOflJ2LfXMlvOS0hw+gWvsnwnp5nQpGIroaT z1ViiQ0dXu/oZsILrFHWsoBDJQqlYD9D9J2kIv8azEh8qgbO+kMPnXsNHcxAGHW2x1ma 7NTNp7oB14kxBIELMf8mkOsEeoh3F+s6+Vzgl2f363tNGFwkOWInVOVu+PFasSsdd0RL 10Rw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=KXlaULBR; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=rcyXOs8L; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 193-20020a6302ca000000b0054fcfc40fc3si6575616pgc.683.2023.06.16.14.10.21; Fri, 16 Jun 2023 14:10:35 -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=KXlaULBR; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=rcyXOs8L; 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 S233002AbjFPU5U (ORCPT + 99 others); Fri, 16 Jun 2023 16:57:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjFPU5S (ORCPT ); Fri, 16 Jun 2023 16:57:18 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E49430F1; Fri, 16 Jun 2023 13:57:17 -0700 (PDT) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35GCi78P026624; Fri, 16 Jun 2023 20:56:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=FVRYkNYp7O2zzPKQAlsWaH5BwcccTNYSaWp65RYt8YI=; b=KXlaULBRYzeZwTgPZnkmP4f3q8N1Ss3lH7yhS4RtsIqthtkeJdgiFFNvyy38RsN0MXAQ wzI+22Nr3sz4E5BFlrJGWT4l9XsKjTtbn02d7b9UlzTJEbbnW9N15YiLgdJOrz5qbRg7 0/twnyf7MCyMWcZxZRwIjLX8HLRv/XdxX7c6Fv7wjncy7QrMv1HQ/XKiFcmbXmgyfiPe j2am03pyh9qWJ2jkPWs5KhdrT0ZXqez63eX5LHw5eeSMMN0EntA7MjLTDijUHmVrTDLN 8O7XjjXa5lMmvQrfUus2r2RRTa9iwKMpYx1zS0qKqf0mM/h41bTlz8dkNKApjI43f9ph EQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r4fy3n2ur-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Jun 2023 20:56:35 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 35GKFVJX039213; Fri, 16 Jun 2023 20:56:34 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3r4fm8dx38-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Jun 2023 20:56:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IHGiqsKlHSogCw7J5fX7nlchzw57BN053ayvmfmTti/mVr0htrj0AaTCk5kL14QhmRvWpBUYRajfGlT5bHUsU/W1RYjh0xJsB2Spr0ivN/jVxmWsxeSRJVw+rGVJPVsMAQcKoBqYOMXBCJt+YWzuLyCoCBWGcZ7ZS6XqYZgql345Yvb83zSOiPWP1jm5bHUgzliyUyE3vtMOMY8K5JgWwmeX9+ykhrjfl38TQ5so5XLSo4ohbT7Ohy7s33jHOIwgCKPD7G+NhKC81b/CNvT1ProS86yuAsMG2PlSa/Y1yupxKs7eYaW6i+Zyfz9teivfPJXYe/YrcVkU7HpgOaRiGA== 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=FVRYkNYp7O2zzPKQAlsWaH5BwcccTNYSaWp65RYt8YI=; b=eDr1H776nRmsBhNREZesJ3rfEG0bAXS7psPBZkkyr++1DpyVCpBgItCcoliOCZdEVJq9EpgP7oZPImHiuNSGhq5WQdjYZym7Na4p2Zv4Pf0bBjjbpMDDMTvB9lOTK6Is/QSuDdN0CP9xlF3M8AKRXvLm7L1xrigTtRuVEjjhdT46Ka7tBtFydo0T2leGF97ioJjSfBDwz9jXxbDLsAdinj2nO8xw3Wm/d14vIg6LhgHRpmj0t3peu8Dcy0Q1L+bF4vTvM06IC16NkNrdDOuFdwRAYV5vG+X1pSHAgTG6zr9qJOJvXAoXCp5nsC80L2qVNCqxTnVKA8i/PiS60oNHLQ== 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=FVRYkNYp7O2zzPKQAlsWaH5BwcccTNYSaWp65RYt8YI=; b=rcyXOs8LP4YIgKg+6xMvHdHFreR2nLgfPhnI9aM/kunPhwefu/W4RGhiGDYBjjTn3kVDDD5C95F1DOYLpWa3Cp9tJ7mjnC6yi+EARpwqJjpxp2vZ/7HTowrpQVMDGWFEXAXi/TG7EnKgYAF2oOFduvilFx8xYmR1cPEP+XjIGOs= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by PH7PR10MB7850.namprd10.prod.outlook.com (2603:10b6:510:30c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.25; Fri, 16 Jun 2023 20:56:30 +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.6500.029; Fri, 16 Jun 2023 20:56:30 +0000 Message-ID: <7c2e90c4-6ef0-c1d2-8a0d-655adc265547@oracle.com> Date: Fri, 16 Jun 2023 15:56:23 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v23 4/8] crash: memory and CPU hotplug sysfs attributes Content-Language: en-US To: Greg KH Cc: 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, hpa@zytor.com, 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 References: <20230612210712.683175-1-eric.devolder@oracle.com> <20230612210712.683175-5-eric.devolder@oracle.com> <2023061320-vindicate-usual-6643@gregkh> From: Eric DeVolder In-Reply-To: <2023061320-vindicate-usual-6643@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR03CA0374.namprd03.prod.outlook.com (2603:10b6:a03:3a1::19) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4531:EE_|PH7PR10MB7850:EE_ X-MS-Office365-Filtering-Correlation-Id: 211895fd-461f-481f-f7ea-08db6eac28d2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qZJ1vSQ9l5/yHGtIGd/o49s5wX982Qk0vVxpgRPGEZph8naKBoJ1StL6ZEt5npq4cb2RFgA4k4zYWOByxUEBIqdQ1oPRf9XHXskT0yW2EZej7u2AXF7fUSoWkaqFCneydBUiZheavgjMP0iDV46sppLYQTfaKbZDy7TFlTLU/Q1zomqQVnZOdy3+oJ/+L/9lnZaSwWNhauLL9uBdPVq3n02Wg9m052z7ibLuwGZalYw02nYpr9g8CNDsutzidoy8R4PTpMzHkaARyvqagJF5vaNa064j78H7EtTlzM8Vc/yzP95jW2jfmeRoB6kMA7QJyCviyBvavB895un3m8IPkiqL+Dw3ADr//5iEx3H1aE2jY7Dim5st4rNhcgziVLCutxjjx8aN3nDBLMt2P32g3o+062hS1EYJmXH1x/Ot5OK3Ja1YlTy2PYWobLh/O7YikhLNXd10SFurmfmZz4drTs/Rqinvv4m7euP1blXkS8FIjfS1BxgGCxodAS7B6doFIby9hCtiRt2T6rODnC74fxrlrLluD/oNN3kfKcCtBYqOTeGxvdKViq+4S5rn4t/ps9/monoFmsiainG9r42p/GvepUlaixhnF16xLITq7t+9dFOrjB0VVXeuyKWpuO14AdPHLrnIzVmKyt2nJWcGxw== 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)(396003)(39860400002)(376002)(136003)(366004)(346002)(451199021)(36756003)(38100700002)(86362001)(478600001)(8676002)(8936002)(41300700001)(6486002)(31686004)(4326008)(31696002)(6666004)(316002)(107886003)(5660300002)(7416002)(7406005)(53546011)(6506007)(6512007)(186003)(30864003)(26005)(2906002)(2616005)(66476007)(66946007)(66556008)(6916009)(83380400001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TGhja2JNb3lSY3ovNCsrQllVb0lRZmo5dU1ieU1mdm90blZlanZpOXBnTmNn?= =?utf-8?B?L3Nld0RIYkRwckJ6Zm5tOVgxc3NUbTl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?utf-8?B?RWF1L2tNR2d5SURTaUlYVmdlQkMxVzFzclQvZWMzdVpkUDVya2o2K3phS3Uv?= =?utf-8?B?NU1KVWV4TnFoUHdnc2lGL3NnRndSMjVNQ2M5YkNnQXp1am1HeWMxeVhHZlJJ?= =?utf-8?B?bUgrTU52QTBPNG5yalpxWEg2enpPMFpBK0JpSDkvTnhnSUl5MmtMNFhNcjVi?= =?utf-8?B?OEpjQXBYTEZwQlJvMnFSc0w5eFRHOHFLTXVtbjlCeW5jY0hJL2NQTDkxbjNR?= =?utf-8?B?enNEZ2g4RWJKUkF1S1lsYTl0d00wWHNyRGs2dnQvdDNBcDBwTXppZTZiTU1r?= =?utf-8?B?cXRHNGhqeHlzbElBb093YVRTZ096aE1WcEpxZW02NEg3UVdKL3R3dkRFdnJr?= =?utf-8?B?ejFseG1vcS9KTVZIcjBxNUlXUC9ueHljU2RjWER2SFJSeCtxMFc4dWtaZUVE?= =?utf-8?B?Zy9JZk5kbEF1WS9JT3B6Q1dCRDAvemFFK3dNQ21sN2FmdURGSVdhMXBpQnRB?= =?utf-8?B?Q05NVm81VVNMc04zY0dlOU9HakNScGtySFNJOU9ONjBKQ1Q3S05sVnUweGR6?= =?utf-8?Q?k6GNozLJyS4=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 211895fd-461f-481f-f7ea-08db6eac28d2 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2023 20:56:30.3185 (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: Bl/045UduvxRJlA2QIBKrZuTKUX2BZknOKcsSlgmh+vaJAQL/1Kklpw5Pg3/lhUV6rUTo/U5wh5278iKH8rKZdgNAjpkP5z0jOxbXcS9Qh8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7850 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-16_14,2023-06-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 mlxscore=0 adultscore=0 spamscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306160189 X-Proofpoint-GUID: VGHe44fpbmrCc7XNSa7BUCj39NKX72_0 X-Proofpoint-ORIG-GUID: VGHe44fpbmrCc7XNSa7BUCj39NKX72_0 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 On 6/13/23 03:03, Greg KH wrote: > On Mon, Jun 12, 2023 at 05:07:08PM -0400, Eric DeVolder wrote: >> Introduce the crash_hotplug attribute for memory and CPUs for >> use by userspace. These attributes directly facilitate the udev >> rule for managing userspace re-loading of the crash kernel upon >> hot un/plug changes. >> >> For memory, expose the crash_hotplug attribute to the >> /sys/devices/system/memory directory. For example: >> >> # udevadm info --attribute-walk /sys/devices/system/memory/memory81 >> looking at device '/devices/system/memory/memory81': >> KERNEL=="memory81" >> SUBSYSTEM=="memory" >> DRIVER=="" >> ATTR{online}=="1" >> ATTR{phys_device}=="0" >> ATTR{phys_index}=="00000051" >> ATTR{removable}=="1" >> ATTR{state}=="online" >> ATTR{valid_zones}=="Movable" >> >> looking at parent device '/devices/system/memory': >> KERNELS=="memory" >> SUBSYSTEMS=="" >> DRIVERS=="" >> ATTRS{auto_online_blocks}=="offline" >> ATTRS{block_size_bytes}=="8000000" >> ATTRS{crash_hotplug}=="1" >> >> For CPUs, expose the crash_hotplug attribute to the >> /sys/devices/system/cpu directory. For example: >> >> # udevadm info --attribute-walk /sys/devices/system/cpu/cpu0 >> looking at device '/devices/system/cpu/cpu0': >> KERNEL=="cpu0" >> SUBSYSTEM=="cpu" >> DRIVER=="processor" >> ATTR{crash_notes}=="277c38600" >> ATTR{crash_notes_size}=="368" >> ATTR{online}=="1" >> >> looking at parent device '/devices/system/cpu': >> KERNELS=="cpu" >> SUBSYSTEMS=="" >> DRIVERS=="" >> ATTRS{crash_hotplug}=="1" >> ATTRS{isolated}=="" >> ATTRS{kernel_max}=="8191" >> ATTRS{nohz_full}==" (null)" >> ATTRS{offline}=="4-7" >> ATTRS{online}=="0-3" >> ATTRS{possible}=="0-7" >> ATTRS{present}=="0-3" >> >> With these sysfs attributes in place, it is possible to efficiently >> instruct the udev rule to skip crash kernel reloading for kernels >> configured with crash hotplug support. >> >> For example, the following is the proposed udev rule change for RHEL >> system 98-kexec.rules (as the first lines of the rule file): >> >> # The kernel updates the crash elfcorehdr for CPU and memory changes >> SUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end" >> SUBSYSTEM=="memory", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end" >> >> When examined in the context of 98-kexec.rules, the above rules >> test if crash_hotplug is set, and if so, the userspace initiated >> unload-then-reload of the crash kernel is skipped. >> >> CPU and memory checks are separated in accordance with >> CONFIG_HOTPLUG_CPU and CONFIG_MEMORY_HOTPLUG kernel config options. >> If an architecture supports, for example, memory hotplug but not >> CPU hotplug, then the /sys/devices/system/memory/crash_hotplug >> attribute file is present, but the /sys/devices/system/cpu/crash_hotplug >> attribute file will NOT be present. Thus the udev rule skips >> userspace processing of memory hot un/plug events, but the udev >> rule will evaluate false for CPU events, thus allowing userspace to >> process CPU hot un/plug events (ie the unload-then-reload of the kdump >> capture kernel). >> >> Signed-off-by: Eric DeVolder >> Reviewed-by: Sourabh Jain >> Acked-by: Hari Bathini >> Acked-by: Baoquan He >> --- >> .../admin-guide/mm/memory-hotplug.rst | 8 ++++++++ >> Documentation/core-api/cpu_hotplug.rst | 18 ++++++++++++++++++ >> drivers/base/cpu.c | 14 ++++++++++++++ >> drivers/base/memory.c | 13 +++++++++++++ >> include/linux/kexec.h | 8 ++++++++ >> 5 files changed, 61 insertions(+) >> >> diff --git a/Documentation/admin-guide/mm/memory-hotplug.rst b/Documentation/admin-guide/mm/memory-hotplug.rst >> index 1b02fe5807cc..eb99d79223a3 100644 >> --- a/Documentation/admin-guide/mm/memory-hotplug.rst >> +++ b/Documentation/admin-guide/mm/memory-hotplug.rst >> @@ -291,6 +291,14 @@ The following files are currently defined: >> Availability depends on the CONFIG_ARCH_MEMORY_PROBE >> kernel configuration option. >> ``uevent`` read-write: generic udev file for device subsystems. >> +``crash_hotplug`` read-only: when changes to the system memory map >> + occur due to hot un/plug of memory, this file contains >> + '1' if the kernel updates the kdump capture kernel memory >> + map itself (via elfcorehdr), or '0' if userspace must update >> + the kdump capture kernel memory map. >> + >> + Availability depends on the CONFIG_MEMORY_HOTPLUG kernel >> + configuration option. >> ====================== ========================================================= >> >> .. note:: >> diff --git a/Documentation/core-api/cpu_hotplug.rst b/Documentation/core-api/cpu_hotplug.rst >> index f75778d37488..0c8dc3fe5f94 100644 >> --- a/Documentation/core-api/cpu_hotplug.rst >> +++ b/Documentation/core-api/cpu_hotplug.rst >> @@ -750,6 +750,24 @@ will receive all events. A script like:: >> >> can process the event further. >> >> +When changes to the CPUs in the system occur, the sysfs file >> +/sys/devices/system/cpu/crash_hotplug contains '1' if the kernel >> +updates the kdump capture kernel list of CPUs itself (via elfcorehdr), >> +or '0' if userspace must update the kdump capture kernel list of CPUs. >> + >> +The availability depends on the CONFIG_HOTPLUG_CPU kernel configuration >> +option. >> + >> +To skip userspace processing of CPU hot un/plug events for kdump >> +(ie the unload-then-reload to obtain a current list of CPUs), this sysfs >> +file can be used in a udev rule as follows: >> + >> + SUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end" >> + >> +For a cpu hot un/plug event, if the architecture supports kernel updates >> +of the elfcorehdr (which contains the list of CPUs), then the rule skips >> +the unload-then-reload of the kdump capture kernel. >> + >> Kernel Inline Documentations Reference >> ====================================== >> >> diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c >> index c1815b9dae68..06a0c22b37b8 100644 >> --- a/drivers/base/cpu.c >> +++ b/drivers/base/cpu.c >> @@ -282,6 +282,17 @@ static ssize_t print_cpus_nohz_full(struct device *dev, >> static DEVICE_ATTR(nohz_full, 0444, print_cpus_nohz_full, NULL); >> #endif >> >> +#ifdef CONFIG_HOTPLUG_CPU >> +#include >> +static ssize_t crash_hotplug_show(struct device *dev, >> + struct device_attribute *attr, >> + char *buf) >> +{ >> + return sprintf(buf, "%d\n", crash_hotplug_cpu_support()); >> +} >> +static DEVICE_ATTR_ADMIN_RO(crash_hotplug); >> +#endif >> + >> static void cpu_device_release(struct device *dev) >> { >> /* >> @@ -469,6 +480,9 @@ static struct attribute *cpu_root_attrs[] = { >> #ifdef CONFIG_NO_HZ_FULL >> &dev_attr_nohz_full.attr, >> #endif >> +#ifdef CONFIG_HOTPLUG_CPU >> + &dev_attr_crash_hotplug.attr, >> +#endif >> #ifdef CONFIG_GENERIC_CPU_AUTOPROBE >> &dev_attr_modalias.attr, >> #endif >> diff --git a/drivers/base/memory.c b/drivers/base/memory.c >> index b456ac213610..24b8ef4c830c 100644 >> --- a/drivers/base/memory.c >> +++ b/drivers/base/memory.c >> @@ -490,6 +490,16 @@ static ssize_t auto_online_blocks_store(struct device *dev, >> >> static DEVICE_ATTR_RW(auto_online_blocks); >> >> +#ifdef CONFIG_MEMORY_HOTPLUG >> +#include >> +static ssize_t crash_hotplug_show(struct device *dev, >> + struct device_attribute *attr, char *buf) >> +{ >> + return sprintf(buf, "%d\n", crash_hotplug_memory_support()); >> +} > > This sysfs file has to be documented in Documentation/ABI/ right? > > And did you use checkpatch? It should have told you to use sysfs_emit() > instead... > >> +static DEVICE_ATTR_RO(crash_hotplug); >> +#endif > > All of these #ifdefs should all be removed and instead use the > is_visible() callback to determine if the attribute is shown or not, > using the IS_ENABLED() test in the function. > > thanks, > > greg k-h Greg, I've been examining this request, and could use a bit more guidance. Taking a look at just drivers/base/cpu.c for the purposes of this discussion, I need to add the .is_visible method to the following: static const struct attribute_group cpu_root_attr_group = { .attrs = cpu_root_attrs, }; ok, that makes sense. The request is to remove the #ifdefs from the following in cpu_root_attrs[]: static struct attribute *cpu_root_attrs[] = { #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE &dev_attr_probe.attr, &dev_attr_release.attr, #endif &cpu_attrs[0].attr.attr, &cpu_attrs[1].attr.attr, &cpu_attrs[2].attr.attr, &dev_attr_kernel_max.attr, &dev_attr_offline.attr, &dev_attr_isolated.attr, #ifdef CONFIG_NO_HZ_FULL &dev_attr_nohz_full.attr, #endif #ifdef CONFIG_GENERIC_CPU_AUTOPROBE &dev_attr_modalias.attr, #endif NULL }; In order to remove the #ifdefs in this struct, as requested, that means these attributes need to be always compiled-in. So I can move the declarations of these outside of the #ifdef which contain them, but these all contain a callback function for show()/store(), which is inside the #ifdef. The struct device-attribute .show/.store pointer to the callback function must point to something linkable. Is an acceptable solution to place nop callback functions for show()/store() on an #else part of the code blocks in the file? Ie: #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE static ssize_t cpu_probe_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { ... real function contents ... } #else static ssize_t cpu_probe_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { return 0; } #endif I've been looking around the source tree for examples, but I find most are either groups that are all strongly related and thus compiled-in/out together (ie drivers/base/cacheinfo.c, drivers/acpi/nfit/core.c), or utilize #ifdefs (ie this file, drivers/base/topology.c) . I may not understand the goal of the request either, as it appears it would result in a kernel slightly larger (struct attribute containing entries for items that are not configured in the kernel) than a kernel utilizing the #ifdefs as-is currently. Thanks, eric