Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7187024ybi; Mon, 8 Jul 2019 16:28:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYYc0xN2umKt/1fDVkgV9+sdKKV+TKlqIWqLTXfcYQf5HHpS7cb8MWGzwNP5gplKZNw9Af X-Received: by 2002:a17:90a:9386:: with SMTP id q6mr28479257pjo.81.1562628514497; Mon, 08 Jul 2019 16:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562628514; cv=none; d=google.com; s=arc-20160816; b=qvD4CwMgH1bfMfjp1Od5bZSuTE6K+0vqSutCLNHhQHN79LDSEPHkM4FwKY0skQYC1f dey5mLUFygu+OKQAkGSQY53uMbi1K1v4vkWHGHtUHhXfJ7sKlN1/kMKtBn3Cn5XS29Vd Natrfc2DcVju0afY1ROjb2jCEPvkPo+D2gPOwBIScXVSO8PoB/fipPL3wwSaxCaspWNq dmQoZs9jZovHWcFQ3pjnIeAI7G5sddupL4v8p3C169HSfhu85zolNBOpn8C6AASEIvzb QvCNgxB70Aw6eTRoqLOBsiVVUIFBRELCxS5tFHbIzHdWEcYr1mo10/A0U0Xg+YST2l9+ Di/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=9LBn+IrpD1vlilot1sDuhm5JaXmsdy7FeGQpNbYaEeU=; b=FxXcAWG91s+4Bc7PCd9oM6tXXeRRuwWrvNpkbUkzCE/ONjXAmVvylMXPeFsyxq3gIQ akNFdWJZKbMtl02p3PCKdtpg7hNRwOjGkJI1EGJD6Isl4zc6yd3Bc1HxdPloZBMZyacD ZRfieg+Ng5TBjA5ozmQog/Zz29VX9f0Lt07eNF8onuc8pbmR77bM9XU1RgnDfb9IiN3q 4zUSWPREZKl04QRWPY/5gwG5tqqqPIIJeBoU4qN2aZPiOTgqpRbd4VVFeA8Eun2ix6gJ rQ2gqOI3L+OzJyg1sIwLTy6YjhmaoSiPzF2f/+7ffPoSGsnjEcCtGfLdr4uNLNn5HENg ndPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=FJLVGEkB; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc10si18577324plb.43.2019.07.08.16.28.20; Mon, 08 Jul 2019 16:28:34 -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; dkim=pass header.i=@soleen.com header.s=google header.b=FJLVGEkB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405272AbfGHVPc (ORCPT + 99 others); Mon, 8 Jul 2019 17:15:32 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:35453 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727662AbfGHVPc (ORCPT ); Mon, 8 Jul 2019 17:15:32 -0400 Received: by mail-qk1-f194.google.com with SMTP id r21so14175440qke.2 for ; Mon, 08 Jul 2019 14:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=9LBn+IrpD1vlilot1sDuhm5JaXmsdy7FeGQpNbYaEeU=; b=FJLVGEkBkaIWGq+BYeDm49b/d/5s8UkKFjcHQ3Pj9CIeR9WqFVBFK83oylM3vbGySY a/yz6JrxbrlxhkRBTTrMs0C2J/W6nlJ1vQjELf2Bdegk1pBajKXLyTOo73BGyhhwmgCp hpSOTkjSZ/m5LO73UP1Taf9WGt0Yjjcdf1SdEKLTO8Y9GwUwaOY9BZsOvoYDKw0JDWcj fPVVkLf6OQU8ckKMzR+Is03XGjLfH5O8FgfInnivtbaF6/BRHFciiuGjsy5dJM/sQZBZ zekQZpRlJY9hAgDxbXYaBw7Kc+lfhEPpvhBlKGrW2AWK3kgug85CfDgVzblJ1cXVS5Ot BVyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=9LBn+IrpD1vlilot1sDuhm5JaXmsdy7FeGQpNbYaEeU=; b=taA+jcgRLLDHElDCoPRhb8kwHpDxJ+8P4wRgA3pWBAGpZk5/KRrh4A9N4oLtoaVAnr wEiE3r32waUsR1QD68DQIJXpqakTnIrR8IPRcem/GQXlzOG28ovURP5dwbyMD8MKwDX2 /4dJPrQznCm8d6ago7cim9TlXUxtUBbRfjaI39++X8r1p9cVwYOhDu+HjiIxx4FVjAwo NR20H7L0roK3QjSXwwz/cyiPZMzoYNDn1J1BLt/+ajzFfaUTOSsLlxKXP8qdAJYihpTf orf0ptlERZqWqf9wnwkIP0Zo1wuDfU1WcRl/jFFlg/YjahifreT8Im3lGf73eWM2FFnQ CIlQ== X-Gm-Message-State: APjAAAUPed92IJIY3g8e/LAByYImbJ1u0Pzz/TWuc+BhPtPM7sQHWgdE Z5qVHnxU7qLhHWPx1uQHOj+P0Q== X-Received: by 2002:a37:bac2:: with SMTP id k185mr15419295qkf.211.1562620531230; Mon, 08 Jul 2019 14:15:31 -0700 (PDT) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id b67sm8335620qkd.82.2019.07.08.14.15.29 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 08 Jul 2019 14:15:30 -0700 (PDT) From: Pavel Tatashin To: pasha.tatashin@soleen.com, jmorris@namei.org, sashal@kernel.org, ebiederm@xmission.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [v1 0/5] allow to reserve memory for normal kexec kernel Date: Mon, 8 Jul 2019 17:15:23 -0400 Message-Id: <20190708211528.12392-1-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, it is only allowed to reserve memory for crash kernel, because it is a requirement in order to be able to boot into crash kernel without touching memory of crashed kernel is to have memory reserved. The second benefit for having memory reserved for kexec kernel is that it does not require a relocation after segments are loaded into memory. If kexec functionality is used for a fast system update, with a minimal downtime, the relocation of kernel + initramfs might take a significant portion of reboot. In fact, on the machine that we are using, that has ARM64 processor it takes 0.35s to relocate during kexec, thus taking 52% of kernel reboot time: kernel shutdown 0.03s relocation 0.35s kernel startup 0.29s Image: 13M and initramfs is 24M. If initramfs increases, the relocation time increases proportionally. While, it is possible to add 'kexeckernel=' parameters support to other architectures by modifying reserve_crashkernel(), in this series this is done for arm64 only. Pavel Tatashin (5): kexec: quiet down kexec reboot kexec: add resource for normal kexec region kexec: export common crashkernel/kexeckernel parser kexec: use reserved memory for normal kexec reboot arm64, kexec: reserve kexeckernel region .../admin-guide/kernel-parameters.txt | 7 ++ arch/arm64/kernel/setup.c | 5 ++ arch/arm64/mm/init.c | 83 ++++++++++++------- include/linux/crash_core.h | 6 ++ include/linux/ioport.h | 1 + include/linux/kexec.h | 6 +- kernel/crash_core.c | 27 +++--- kernel/kexec_core.c | 50 +++++++---- 8 files changed, 127 insertions(+), 58 deletions(-) -- 2.22.0