Received: by 10.223.148.5 with SMTP id 5csp6708311wrq; Wed, 17 Jan 2018 17:58:24 -0800 (PST) X-Google-Smtp-Source: ACJfBoudU4CHHq+Y68O+6x5BkPUWojZrVzMV8fJxLS3QqtS9qY4rFxTlWVO6Zh47H22k6JCNL1c+ X-Received: by 10.98.82.68 with SMTP id g65mr25689777pfb.212.1516240704170; Wed, 17 Jan 2018 17:58:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516240704; cv=none; d=google.com; s=arc-20160816; b=P+23RYDuRIr95pB6SLCzL00PPT77diPbN4zTpQAOs5pbVYJQNExcVa8MJ0krd1KpX5 bbyPw2gHeffSA9j+51Jz5pQaZcx8wxgW3UshNl8pHRvDAwnC62FDAF8pHnN+5ZTdTDud gR/wGR16cHOqejHMfu6K8jEYVp/L54KmeEJrUcilP8usiFdTHM8ImNvvBWHyq6N7deMP ysZbD/2yxxp0n+LFzz4uo2KmeJcnqG/rq5X16EYWp2/bXReBTmpv0uWoFbzG08MNnSxv ALSRyBJ0DD29EVAmCfsdh/4nhbYMKFK48ElzzKQldJdtvqLRPu0s9dtFroqLxo+jC4lL RAfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=QLOWCgpnD4C5smi2FlrRhlnvhSnUrDbAibmHumeWLww=; b=xvPFf5Jq4i27AiXDKdGbmQ6f4BJLk75KVhIxQWVKs+PLLwzqPDCCkA6ykwBJxq2nlD JyvJO25Kf+5dDsPbPXezRmtJ0Zld3y5Fny09/axSV+gvMo6qRVd4DVvwoknlo5qsISy/ V5HR7czBOrXbu3+G7IJw3oE8cCYzOwW2MEsJT1iag9axQHr688bAQLCazVYA1nP/uAaS uSLNcaJ0MF/sstjz88jqAi4w2gTZyaJX7di80qFIIJCe51GcDi5MQebAQ/HFA+Wif7XZ 4EMIQ2VkqI3YNVCam9gSJiTmfDwR0ToYnPObMyIsoSn92tigkEydKwOLUL8UKs5nfnkf Z3Xg== 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 b84si5457968pfk.366.2018.01.17.17.58.10; Wed, 17 Jan 2018 17:58:24 -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; 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 S1753397AbeARB5a (ORCPT + 99 others); Wed, 17 Jan 2018 20:57:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58490 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752062AbeARB53 (ORCPT ); Wed, 17 Jan 2018 20:57:29 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B9F7F8763C; Thu, 18 Jan 2018 01:57:28 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-17.pek2.redhat.com [10.72.12.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 871445D6A8; Thu, 18 Jan 2018 01:57:25 +0000 (UTC) Date: Thu, 18 Jan 2018 09:57:21 +0800 From: Dave Young To: Petr Mladek Cc: sergey.senozhatsky@gmail.com, rostedt@goodmis.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, kexec@lists.infradead.org Subject: Re: [PATCH] print kdump kernel loaded status in stack dump Message-ID: <20180118015721.GC1812@dhcp-128-65.nay.redhat.com> References: <20180117045057.GA4994@dhcp-128-65.nay.redhat.com> <20180117085734.jx77p3brjykk3ude@pathway.suse.cz> <20180117123244.GA1503@dhcp-128-65.nay.redhat.com> <20180117134217.6gjr5ep3g2ns2v3w@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180117134217.6gjr5ep3g2ns2v3w@pathway.suse.cz> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 18 Jan 2018 01:57:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/17/18 at 02:42pm, Petr Mladek wrote: > On Wed 2018-01-17 20:32:44, Dave Young wrote: > > Hi, > > > > Thanks for your comments. > > On 01/17/18 at 09:57am, Petr Mladek wrote: > > > On Wed 2018-01-17 12:50:57, Dave Young wrote: > > > > It is useful to print kdump kernel loaded status in dump_stack() > > > > especially when panic happens so that we can differenciate > > > > kdump kernel early hang and a normal panic in a bug report. > > > > > > > > Signed-off-by: Dave Young > > > > --- > > > > kernel/printk/printk.c | 3 +++ > > > > 1 file changed, 3 insertions(+) > > > > > > > > --- linux-x86.orig/kernel/printk/printk.c > > > > +++ linux-x86/kernel/printk/printk.c > > > > @@ -48,6 +48,7 @@ > > > > #include > > > > #include > > > > #include > > > > +#include > > > > > > > > #include > > > > #include > > > > @@ -3127,6 +3128,8 @@ void dump_stack_print_info(const char *l > > > > if (dump_stack_arch_desc_str[0] != '\0') > > > > printk("%sHardware name: %s\n", > > > > log_lvl, dump_stack_arch_desc_str); > > > > + if (kexec_crash_loaded()) > > > > + printk("%skdump kernel loaded\n", log_lvl); > > > > > > IMHO, it would be better to do it like for the workqueues. > > > I mean to call printk_kexec_info(log_lv1, current) here > > > that would be impletemented in kexec sources. > > > Then it could be maintained by kexec people. > > > > > > Anyway, I wonder if the info about kexec_crash_loaded() is > > > enough. I am not much familiar with kexec. AFAIK, > > > the image might be loaded long time before it > > > is acutally used. > > > > kexec_crash_loaded is enough, we only care if kdump kernel being > > loaded or not, nothing else, no matter how long it has been loaded. > > In Fedora/RHEL a kdump service takes care of loading the kernel but > > it runs after networking is ready. If people want to save > > the vmcore to nfs/ssh then we need detect network and build the > > initramfs. In the nfs/ssh case if some networking code panicked it > > is possible that kdump service has not started, but sometimes bug > > can not be easily reproduced thus nobody can know if kdump is active > > or not. > > I see. > > > Since kexec_crash_loaded() is already in kexec souce code, and it > > is the only thing need to know, do you think it is really necessary > > to add a printk_kexec_info()? I can do it if you strongly suggest > > to do so. > > No, the original approach is fine if it is really that simple ;-) > > > > > > > Finally, the style of the other lines is: > > > > > > Name: details > > > > > > I would suggest to print something like: > > > > > > Kexec: details > > > > > > , where the details might be whether the image is loaded, > > > whether the loaded kernel is being executed, and > > > other kexec-related flags. > > > > Will do, it can be something like: > > Kexec: kdump kernel loaded > > Looks good to me. With this message, I could give this > patch even > > Reviewed-by: Petr Mladek > > I could update the string when pushing into printk.git. > I am just going to wait a bit for more feedback if any. Cool, thank you! > > Best Regards, > Petr Thanks Dave