public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
	Andrea Arcangeli <aarcange@redhat.com>, kvm <kvm@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: mmu_notifiers: turn off lockdep around mm_take_all_locks
Date: Tue, 07 Jul 2009 21:04:02 +0200	[thread overview]
Message-ID: <1246993442.5197.15.camel@laptop> (raw)
In-Reply-To: <20090707183741.GA8393@amt.cnet>

On Tue, 2009-07-07 at 15:37 -0300, Marcelo Tosatti wrote:
> >>>
> >>> Is there any way around this other than completly shutting down lockdep?
> >>>      
> >>
> >> When we created this the promise was that kvm would only do this on a
> >> fresh mm with only a few vmas, has that changed
> >
> > The number of vmas did increase, but not materially.  We do link with  
> > more shared libraries though.
> 
> Yeah, see attached /proc/pid/maps just before the ioctl thats ends up in 
> mmu_notifier_register.
> 
> mm_take_all_locks: file_vma=79 anon_vma=40

Another issue, at about >=256 vmas we'll overflow the preempt count. So
disabling lockdep will only 'fix' this for a short while, until you've
bloated beyond that ;-)

Although you could possibly disable preemption and use
__raw_spin_lock(), that would also side-step the whole lockdep issue,
but it feels like such a horrid hack.

Alternatively we would have to modify the rmap locking, but that would
incur overhead on the regular code paths, so that's probably not worth
the trade-off.

Linus, Ingo, any opinions?


  reply	other threads:[~2009-07-07 19:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07 18:06 mmu_notifiers: turn off lockdep around mm_take_all_locks Marcelo Tosatti
2009-07-07 18:15 ` Peter Zijlstra
2009-07-07 18:18   ` Avi Kivity
2009-07-07 18:37     ` Marcelo Tosatti
2009-07-07 19:04       ` Peter Zijlstra [this message]
2009-07-07 19:25         ` Linus Torvalds
2009-07-07 20:00           ` Peter Zijlstra
2009-07-07 23:30             ` Andrea Arcangeli

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=1246993442.5197.15.camel@laptop \
    --to=peterz@infradead.org \
    --cc=aarcange@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mtosatti@redhat.com \
    --cc=torvalds@linux-foundation.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