From: Will Deacon <will.deacon@arm.com>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH kvmtool] Skip a few messages by default: command line args; flat binary; earlyprintk.
Date: Tue, 6 Oct 2015 17:16:03 +0100 [thread overview]
Message-ID: <20151006161602.GC2416@arm.com> (raw)
In-Reply-To: <560C09A3.3060503@arm.com>
On Wed, Sep 30, 2015 at 05:11:15PM +0100, Andre Przywara wrote:
> On 29/09/15 17:59, Dimitri John Ledkov wrote:
> > The partial command line args & earlyprintk=serial are still enabled
> > in the debug mode. Warning that a flat binary kernel image is attemped
> > to be loaded is completely dropped. These are not that informative,
> > once one is past intial debugging, and only polute the console.
> >
> > Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
> > ---
> > builtin-run.c | 10 ++++++----
> > kvm.c | 1 -
> > x86/kvm.c | 8 ++++++--
> > 3 files changed, 12 insertions(+), 7 deletions(-)
> >
> > diff --git a/builtin-run.c b/builtin-run.c
> > index e0c8732..8edbf88 100644
> > --- a/builtin-run.c
> > +++ b/builtin-run.c
> > @@ -613,10 +613,12 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv)
> >
> > kvm->cfg.real_cmdline = real_cmdline;
> >
> > - printf(" # %s run -k %s -m %Lu -c %d --name %s\n", KVM_BINARY_NAME,
> > - kvm->cfg.kernel_filename,
> > - (unsigned long long)kvm->cfg.ram_size / 1024 / 1024,
> > - kvm->cfg.nrcpus, kvm->cfg.guest_name);
> > + if (do_debug_print) {
> > + printf(" # %s run -k %s -m %Lu -c %d --name %s\n", KVM_BINARY_NAME,
> > + kvm->cfg.kernel_filename,
> > + (unsigned long long)kvm->cfg.ram_size / 1024 / 1024,
> > + kvm->cfg.nrcpus, kvm->cfg.guest_name);
> > + }
>
> I like the general idea. In fact I have this very patch (among others)
> in my tree too. I applied similar guarding to other messages as well
> (mostly those that only show up on ARM, but also the "ended normally"
> message). Like any good UNIX tool kvmtool should keep quiet if it has
> nothing worthwhile to say ;-)
> But looking at it more closely, I see that there is pr_debug() defined
> doing that "if (do_debug_print)" already. The only issue is that is
> prints source line information, which is not really useful here. But
> then again there does not seem to be any user of it?
>
> So what about the following:
> - We avoid printing pr_info() messages in the default case. Looking at
> its current users in the tree this information is not really useful for
> normal users. We enable pr_info() output only if do_debug_print is
> enabled or introduce another command line flag (--verbose?) for that.
> - We check each user of pr_info() to see whether this information is
> actually "informational" or whether it should be converted to pr_warn.
> - We change the above line to use pr_info instead of printf.
> - We fix the EOL mayhem we have atm while at it.
>
> If you don't mind I will give this a try later this week.
Sounds good to me.
Will
prev parent reply other threads:[~2015-10-06 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-29 16:59 [PATCH kvmtool] Skip a few messages by default: command line args; flat binary; earlyprintk Dimitri John Ledkov
2015-09-30 16:11 ` Andre Przywara
2015-10-06 9:21 ` Dimitri John Ledkov
2015-10-06 16:16 ` Will Deacon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151006161602.GC2416@arm.com \
--to=will.deacon@arm.com \
--cc=andre.przywara@arm.com \
--cc=dimitri.j.ledkov@intel.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.