mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Stephen Zhang <stephenzhangzsd@gmail.com>,
	seanjc@google.com, vkuznets@redhat.com, wanpengli@tencent.com,
	jmattson@google.com, joro@8bytes.org, tglx@linutronix.de,
	mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86/mmu: Add '__func__' in rmap_printk()
Date: Wed, 27 Jan 2021 10:28:26 -0800	[thread overview]
Message-ID: <10805faed4d19ce842cef277b74479a883514afe.camel@perches.com> (raw)
In-Reply-To: <854ee6dc-2299-3897-c4af-3f7058f195af@redhat.com>

On Wed, 2021-01-27 at 19:23 +0100, Paolo Bonzini wrote:
> On 27/01/21 18:25, Joe Perches wrote:
> > 
> > -#ifdef MMU_DEBUG
> > -bool dbg = 0;
> > -module_param(dbg, bool, 0644);
> > -#endif
> > -
> >  #define PTE_PREFETCH_NUM		8
> >  
> > 
> >  #define PT32_LEVEL_BITS 10
> > @@ -844,17 +839,17 @@ static int pte_list_add(struct kvm_vcpu *vcpu, u64 *spte,
> >  	int i, count = 0;
> >  
> > 
> >  	if (!rmap_head->val) {
> > -		rmap_printk("pte_list_add: %p %llx 0->1\n", spte, *spte);
> > +		pr_debug("%p %llx 0->1\n", spte, *spte);
> >  		rmap_head->val = (unsigned long)spte;
> >  	} else if (!(rmap_head->val & 1)) {
> > -		rmap_printk("pte_list_add: %p %llx 1->many\n", spte, *spte);
> > +		pr_debug("%p %llx 1->many\n", spte, *spte);
> >  		desc = mmu_alloc_pte_list_desc(vcpu);
> 
> This would be extremely slow.  These messages are even too verbose for 
> tracepoints.

There's no real object change.

It's not enabled unless DEBUG is defined (and it's not enabled by default)
or CONFIG_DYNAMIC_DEBUG is enabled and then dynamic_debug jump points are
used when not enabled so I think any slowdown, even when dynamic_debug is
enabled is trivial. 



  reply	other threads:[~2021-01-27 18:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  2:08 Stephen Zhang
2021-01-27 10:54 ` Paolo Bonzini
2021-01-27 17:25   ` Joe Perches
2021-01-27 18:23     ` Paolo Bonzini
2021-01-27 18:28       ` Joe Perches [this message]
2021-01-28  8:24         ` Paolo Bonzini
2021-02-02 16:07     ` Paolo Bonzini

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=10805faed4d19ce842cef277b74479a883514afe.camel@perches.com \
    --to=joe@perches.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=stephenzhangzsd@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®