Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7760924ybi; Tue, 9 Jul 2019 03:59:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkxf+I19E1ITkqbH6KAVt73u1GV71g5DEdFztLy2axXBvdaCO/YW/Uvp/9CJeK4nCS0k8x X-Received: by 2002:a17:90a:26ea:: with SMTP id m97mr32036123pje.59.1562669990875; Tue, 09 Jul 2019 03:59:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562669990; cv=none; d=google.com; s=arc-20160816; b=PYXxpY+xxxVn2xtefsuBT2R0MNpdgblPU5lmzb+CO1PVakcYxuMopADRCyl9Ab2rN4 bUh1QTnobMdRdWy1PnB0Nai6I7LHwt3h9IOhDO/CM+Sqzy9s0UwelK/y055u/cunD4yt Lz+hRoK9bwwxmUBMEhYKZN5lsE7Xee7JU+tkkWGfakO/OHXRK660M3BAefFHjcTvINwI iH/nR8h6FAZei1zNSVwJ/vnHp/1yD0zt/ttSU92TmFx0RNb43vjvqeWNpTaAkevOSbTl RppeTbc/RMBIvIZnQ09d8t1lAPBTroCkp+NAhmnBkAmt8Xmo0SLkhA79UmX3YuRA27xZ RgnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=2WJ4m/DGadKDJn7LI59T/jmaK1sNDv+NLzWApQUyooQ=; b=wUNAFHAS4U7X15pZHgPH9L4GA/qTp4ClR//4dmdpWja6FMbDE+Ee85FOPUdO7DiZ++ zlmKPs7ZfI7WcxWuE4EoLm0n52eMwBfNXq7uDE2hRsV0QNVqmkjca107RQ356jLUAezm yEu2MvlMhFgvLmQS0qBgxnbu2rnDfDD53Vth9MkA1UHNYytEuPbNlGj3LbKIxFj++GEe OA3Y8cshYzb2wkG9V4t5vIjL0VBaN7YMxwODsMQoj9iYYHM3N2WJjPcCKnRXdC4GXrd8 5+dvZ93p1y+WepAbNcDod8SlJrCzibhsYP+NWdMgxqNIVQg+xQOTEB3hkQLIclwfMN77 sjCA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si20802423pgq.13.2019.07.09.03.59.24; Tue, 09 Jul 2019 03:59:50 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726218AbfGIKgT (ORCPT + 99 others); Tue, 9 Jul 2019 06:36:19 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:43067 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbfGIKgS (ORCPT ); Tue, 9 Jul 2019 06:36:18 -0400 Received: by mail-lj1-f193.google.com with SMTP id 16so19011010ljv.10 for ; Tue, 09 Jul 2019 03:36:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2WJ4m/DGadKDJn7LI59T/jmaK1sNDv+NLzWApQUyooQ=; b=p/RyByyP29692VJpuKJfNzwifP+BtOwwwveLcTYpAj/SjEgpxp3fIR/o1bAwBYpa8o z5pxAiMFMniixQnICjyKMyL9duNQFfpE8lWctIJQgM/y8YN0Su1ZhG280Dzr45sCTHpX +rd+BPXO477nQkJwoG7n5eyqffC2zKAsWG3RT2JgeAL0LKOXI1X4BcbOfMxRWqrYyf4E ksNWP6GJ2g5KAuLidVxWYbwgblkbJprpRDJvR4lH0UAjnb+P0oeRWaY2TRgwnsVz67T9 jhHPTbu+cHv9wGOdXil25jLkmm1RgVDy4fAFrG9r/HLcKn9qLHlaoX8ZASgDNYLIa87I 2zyA== X-Gm-Message-State: APjAAAWaaT7KBZOkLcLCKTuZW6cVSfM0fTPU0Sd6nuaWVNmyGNVmuWg0 xXApFhmJk4nMdqIl1LVL1yupaUy1FJ7mOWn+Cfzqig== X-Received: by 2002:a2e:8945:: with SMTP id b5mr13056704ljk.93.1562668577294; Tue, 09 Jul 2019 03:36:17 -0700 (PDT) MIME-Version: 1.0 References: <20190708211528.12392-1-pasha.tatashin@soleen.com> In-Reply-To: <20190708211528.12392-1-pasha.tatashin@soleen.com> From: Bhupesh Sharma Date: Tue, 9 Jul 2019 16:06:05 +0530 Message-ID: Subject: Re: [v1 0/5] allow to reserve memory for normal kexec kernel To: Pavel Tatashin Cc: James Morris , sashal@kernel.org, Eric Biederman , kexec mailing list , Linux Kernel Mailing List , Jonathan Corbet , Catalin Marinas , will@kernel.org, Linux Doc Mailing List , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pavel, On Tue, Jul 9, 2019 at 2:46 AM Pavel Tatashin wrote: > > 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 This seems like an issue with time spent while doing sha256 verification while in purgatory. Can you please try the following two patches which enable D-cache in purgatory before SHA verification and disable it before switching to kernel: http://lists.infradead.org/pipermail/kexec/2017-May/018839.html http://lists.infradead.org/pipermail/kexec/2017-May/018840.html Note that these were not accepted upstream but are included in several distros in some form or the other :) Thanks, Bhupesh