Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1975621imm; Sun, 15 Jul 2018 23:04:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdzrQekZtzAIw9b9kq4K9QHc3K231rXQZowQbMqGvngyDtusPYeVIZ/ROOTjobEZ/1Pi2uW X-Received: by 2002:a63:704f:: with SMTP id a15-v6mr14328155pgn.443.1531721052156; Sun, 15 Jul 2018 23:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531721052; cv=none; d=google.com; s=arc-20160816; b=eQxq923Gux10jBa5W6u0pp0DoUdJG6Oez2R0vpHccHNwlBIQfv500FtZu605nFsDvu J4IWai1EpQsaOdwPecoNrhpGj5DjZLwH5HjObnUFz0RrhjA7HRUHRIUuZuSW6QZ0Cv1d fXpHTVg0U+HRXmTs8Qg+enjCkRQf/fOyUXY7PHNHs0OmCw6YxxcOQuNIlIMaYArsIkqR LUBgnaoKjrWXr31s13vuVHOiaYYT4lFx/dxcpIZ+f+3kb1fw/360iRlZJ7PVZXKgx544 CtYimaFDVFlCBRcktoVLGWzkeztzGdJ6wHAZCcX4hOPZuCwI6FuFFdc4uW0r5NkGbjfs fOsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:user-agent:date:cc:to:from:subject :arc-authentication-results; bh=NG6Nhm4d6QjFX2ePRRJrY0Ju/Z7DDXpx+Ur+GwxkFsA=; b=P1VCd0he7gW18/IgbhpnLHWx3bHpymz9tx8av9zJPY/bzl63V5sGd800iziG3IQI8n iKYGq3ASDBuxtD6ZaG6sJIi2EmT6axJkred+9391u4jxmzdl1iqMGQz06jyDQ1evwopr Nq6AK8pfLjANHd6NOCBi6qErDMmxoorkynEq4Ksb7/oIYBMnOfOiQ2MIGeJ5ceL+NJ2/ 6JDV1XarzSg5CgeIytn9TTxdkEQc8EFeWuxPT8C1Ycs1bnhvz/5nWi91mB2uiPmRE8/V zv5vdtz95LdiaONzV/0JKrnesynwbYEIXjD/OOkogVa/zwaHuQ5myLPtMTqp11Mf0EEC p08A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g185-v6si28197198pgc.151.2018.07.15.23.03.57; Sun, 15 Jul 2018 23:04:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728079AbeGPG2u (ORCPT + 99 others); Mon, 16 Jul 2018 02:28:50 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:57676 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727163AbeGPG2u (ORCPT ); Mon, 16 Jul 2018 02:28:50 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6G5wwMQ138521 for ; Mon, 16 Jul 2018 02:03:06 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2k8fwbjw7s-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 16 Jul 2018 02:03:06 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Jul 2018 07:03:04 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 16 Jul 2018 07:03:00 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6G62xtd13959326 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 16 Jul 2018 06:02:59 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6B4F6A4059; Mon, 16 Jul 2018 09:03:18 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 22260A4065; Mon, 16 Jul 2018 09:03:16 +0100 (BST) Received: from jupiter.in.ibm.com (unknown [9.109.202.229]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 16 Jul 2018 09:03:15 +0100 (BST) Subject: [RFC PATCH v6 0/4] powerpc/fadump: Improvements and fixes for firmware-assisted dump. From: Mahesh J Salgaonkar To: linuxppc-dev , Linux Kernel Cc: Hari Bathini , Ananth N Mavinakayanahalli , Srikar Dronamraju , "Aneesh Kumar K.V" , Anshuman Khandual , Andrew Morton , Joonsoo Kim , Michal Hocko , Hari Bathini , Ananth Narayan , kernelfans@gmail.com Date: Mon, 16 Jul 2018 11:32:56 +0530 User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18071606-0008-0000-0000-000002537A0F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18071606-0009-0000-0000-000021B9C274 Message-Id: <153172096333.29252.4376707071382727345.stgit@jupiter.in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-16_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=909 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807160072 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org One of the primary issues with Firmware Assisted Dump (fadump) on Power is that it needs a large amount of memory to be reserved. This reserved memory is used for saving the contents of old crashed kernel's memory before fadump capture kernel uses old kernel's memory area to boot. However, This reserved memory area stays unused until system crash and isn't available for production kernel to use. Instead of setting aside a significant chunk of memory that nobody can use, take advantage ZONE_MOVABLE to mark a significant chunk of reserved memory as ZONE_MOVABLE, so that the kernel is prevented from using, but applications are free to use it. Patch 1 introduces an interface to mark reserved memory as ZONE_MOVABLE. Patch 2 uses the above interface to mark reserved memory movable so that it can be used for applications usage, making fadump reservationless. Patch 3 and 4 fixes minor issues. Changes in V6: - Introduce an interface to mark reserved memory as ZONE_MOVABLE. Hence sending this series as RFC again. - Mark reserved area as ZONE_MOVABLE instead of CMA. - Add fadump=nonmovable parameter for user who don't want to use ZONE_MOVABLE. Changes in V5: - Drop the patch that does metadata movement. - Move the kexec fix patch to top (patch 1) - Fold CMA documenation patch into patch 2 - Fix the compilation issues when CONFIG_CMA is not set reported by Hari. - Use the approach of using boot memory size for CMA as suggested by Hari except the movement of sections. Thanks to Hari. Changes in V4: - patch 1: Make fadump compatible irrespective of kernel versions. - patch 4: moved out of the series and been posted seperatly at http://patchwork.ozlabs.org/patch/896716/ - Documentation update about CMA reservation. Changes in V3: - patch 1 & 2: move metadata region and documentation update. - patch 7: Un-register the faudmp on kexec path --- Mahesh Salgaonkar (4): mm/page_alloc: Introduce an interface to mark reserved memory as ZONE_MOVABLE powerpc/fadump: Reservationless firmware assisted dump powerpc/fadump: throw proper error message on fadump registration failure. powerpc/fadump: Do not allow hot-remove memory from fadump reserved area. Documentation/powerpc/firmware-assisted-dump.txt | 18 +++ arch/powerpc/include/asm/fadump.h | 7 + arch/powerpc/kernel/fadump.c | 123 +++++++++++++++++-- arch/powerpc/platforms/pseries/hotplug-memory.c | 7 + include/linux/mmzone.h | 2 mm/page_alloc.c | 146 ++++++++++++++++++++++ 6 files changed, 290 insertions(+), 13 deletions(-) -- Signature