Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp3445253imc; Sun, 24 Feb 2019 05:26:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IbkKH2h8ZIxvFXE8/XVfhgKJNKnExJVcK1cMh5f8zPf/ikKnksH8c49zgMgil2FsBc0WWDP X-Received: by 2002:a17:902:2702:: with SMTP id c2mr4218411plb.239.1551014794238; Sun, 24 Feb 2019 05:26:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551014794; cv=none; d=google.com; s=arc-20160816; b=XiHJ404C6OtpYTqq6H0mAdaebr1Dxm2zDxXI+j9Hr/B/VwZoX/lEILE4ktZ2K2+Vlt tt0xzLUDEjmBrDX3oTiTuO85EhXbaL9hLIbH10OL71BbTDu4gLV84TZJ4/z/FmLWIpe8 MQytqgug3NC3SAvMGoq1QbZJ8eyBzsLuCI7ftLc84dIJv8jX6Q/vd4Jm2lhimES10GOV hUMJnvUH0dbAdGOBq9UubNHsfdkpxtQsK+IyrUyGaIV0/O2Ygzyu2LpzDtvKjOK2M0U2 T8Ju8CW2OtcRoLfiCP87JoUOStAetZlyY9wCZS1n6txa7ySW76irObEslvPnviMCSARZ nAtA== 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:dkim-signature; bh=raoGjtVydweLfy9alzAvY9fR1DdrLhL84ZW1qOvnacs=; b=b9IDvGgrnZAjYVfZiH3LfRQClEVnxY5milcJMPCjXrCwYU6NmsiTe3c1voy/djDH89 /EHw6B4t0soplOCuff1GP1/xuHFTmCpVQ+Yn6ITBRx5DX9ldxr80ifbp9C3o4zfeKzLu qEIN8qUzt/S83fUgZQiPluf1/tSydU2nSc0Nbev9ejP8twE3eK9deulL/Jq+tMlXfsvO i0s2DIprzrMwBVDJuvqAKHJSyE4xWOrC6x4+7GLZXwaZ0RglaL9+iPHFZQHk9m1dJhb8 8ETBL/+27G/5AOsM5B/Q4sXnqywfqY/hZ8VDFwEmMVFhhGXeXau3o3BkyurcT5pRK6XX Ubaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FG3V+47j; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18si6365789pfg.99.2019.02.24.05.26.19; Sun, 24 Feb 2019 05:26:34 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=FG3V+47j; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728313AbfBXNZb (ORCPT + 99 others); Sun, 24 Feb 2019 08:25:31 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:53305 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728121AbfBXNZb (ORCPT ); Sun, 24 Feb 2019 08:25:31 -0500 Received: by mail-it1-f194.google.com with SMTP id v2so3450062ith.3 for ; Sun, 24 Feb 2019 05:25:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=raoGjtVydweLfy9alzAvY9fR1DdrLhL84ZW1qOvnacs=; b=FG3V+47jExM1M8gF/1NFIFkl/lZOe4gPD6vqtzPTgIQ1LNaHnhMnxSz6V6SRaaUI2g niny6GwwYhMuTzuF3p/Oix76KRhXGgWZpxXXYWRWQacg2b3aqUE4UBBek9e6hPz1RYu2 pMc+DsEIQc++3Hh+jT4idlghxf3Wl8qC4IFw/xUvyWH3hhuizH08mDB6s+eVh+P8fjc0 9Aih6OFwBjuLgTFSLoyEOJZqBamf7NSsnkEafnXbuaaavt7KtNm2z0zv3wwHChJc8DZ2 1e/LS5OoOYWb8L23zLOEwzNBggDYm1CP2WNTaQKp9YMegWavroPBfKRyCLdFPV9L/5ry vd5w== 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=raoGjtVydweLfy9alzAvY9fR1DdrLhL84ZW1qOvnacs=; b=lc0aH8AHew8uocDoR2mLfET/fx040y3gw8yuXp0QNqxieZdpJAwDcecatdjShrTgdT E1yb/zS2NKMXQt9KwpRg7oHQ8qGe566DiH64RLuGWZgTVgShEs8xieVMSJGYHZSyfy4p dvyC5ycHsvcgq02VsUY92Ho7z/6GlQ0qeAp7xc0rDe2KgyPhnLyiQ0st0BsmPCyrYNzh TsLvIx/S65rzRAt2ufgIg9BorzptvknTM9FvckYSOWBb1K9+hskfZkqEzzxGfeSm729x hNfcrlZABoTBaLxZKPdku9BQtmequf0+hHpWTVZBLHOKEfcPRcJYiAzbCwWeA0hoQLAm NRZw== X-Gm-Message-State: AHQUAubhWBO0lmTZucyfKhECJ/C29rfeP3hxHn7GpeutAVTRazBIeInc YK7AMG9f8rNKfi2A+PYQ/MiIs5ANvx0xza8DLHRUOy+5mg== X-Received: by 2002:a24:4650:: with SMTP id j77mr7142052itb.6.1551014730072; Sun, 24 Feb 2019 05:25:30 -0800 (PST) MIME-Version: 1.0 References: <20190205081552.GG21801@zn.tnic> <20190206120804.GC10062@dhcp-128-65.nay.redhat.com> <20190211204816.GB21473@dhcp-128-65.nay.redhat.com> <20190215102458.GD10433@zn.tnic> <20190218014820.GA10711@dhcp-128-65.nay.redhat.com> <20190220083241.GA3447@zn.tnic> <20190220094146.GA8597@dhcp-128-65.nay.redhat.com> <20190221171321.GD12997@zn.tnic> <20190222021101.GA11654@dhcp-128-65.nay.redhat.com> <20190222084241.GC8380@suse.de> <20190222130026.GA30766@zn.tnic> In-Reply-To: <20190222130026.GA30766@zn.tnic> From: Pingfan Liu Date: Sun, 24 Feb 2019 21:25:18 +0800 Message-ID: Subject: Re: [PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr To: Borislav Petkov Cc: Joerg Roedel , Dave Young , Baoquan He , Jerry Hoemann , x86@kernel.org, Randy Dunlap , kexec@lists.infradead.org, LKML , Mike Rapoport , Andrew Morton , Yinghai Lu , vgoyal@redhat.com, iommu@lists.linux-foundation.org, konrad.wilk@oracle.com 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 On Fri, Feb 22, 2019 at 9:00 PM Borislav Petkov wrote: > > On Fri, Feb 22, 2019 at 09:42:41AM +0100, Joerg Roedel wrote: > > The current default of 256MB was found by experiments on a bigger > > number of machines, to create a reasonable default that is at least > > likely to be sufficient of an average machine. > > Exactly, and this is what makes sense. > > The code should try the requested reservation and if it fails, it should > try high allocation with default swiotlb size because we need to reserve > *some* range. > > If that reservation succeeds, we should say something along the lines of > > "... requested range failed, reserved range instead." > Maybe I misunderstood you, but does "requested range failed" mean that user specify the range? If yes, then it should be the duty of user as you said later, not the duty of kernel" > And then in Documentation/admin-guide/kernel-parameters.txt above the > crashkernel= explanations, the allocation strategy of best effort should > be explained in short. That the kernel will try to allocate high if the > requested allocation didn't succeed and that the user can tweak the > allocation with the below options. > Yes, it should be improved. > Bottom line is: the kernel should assist the user and try harder to > allocate *some* range for a crash kernel when there's no detailed > specification what that range should be. > > *If* the user adds ,low, high, then the kernel should try only that > specified range because the assumption is that the user knows what she's > doing. > > But if the user simply wants a range for a crash kernel without stating > where that range should be in particular and it's placement is a don't > care - as long as there is a range - then the kernel should simply try > high, etc. > We do not know the memory layout of a system, maybe a system with memory less than 4GB. So it is better to try all the range of system memory Thanks, Pingfan > Makes sense? > > -- > Regards/Gruss, > Boris. > > Good mailing practices for 400: avoid top-posting and trim the reply.