public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: How to avoid spurious lockdep warnings?
Date: Sat, 22 Mar 2008 14:08:22 -0700	[thread overview]
Message-ID: <47E57546.9030403@goop.org> (raw)
In-Reply-To: <20080322134656.173de045@laptopd505.fenrus.org>

Arjan van de Ven wrote:
> On Thu, 20 Mar 2008 16:02:11 -0700
> Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>
>   
>> In a Xen system, when a new pagetable is about to be put in use it is 
>> "pinned", meaning that each page in the pagetable is registered with
>> the hypervisor.  This is done in arch/x86/xen/mmu.c:pin_page().
>>
>> In order to make this efficient, the hypercalls for pinning are
>> batched, so that multiple pages are submitted at once in a single
>> multicall. While a page is batched pending the hypercall, its
>> corresponding pte_lock is held.
>>
>> This means that the code can end up holding multiple pte locks at
>> once, though it is guaranteed to never try to hold the same lock at
>> once. However, because these locks are in the same lock class, I get
>> a spurious warning from lockdep.  Is there some way I can get rid of
>> this warning?
>>     
>
>
> what's the ordering guarantee between these locks ?
>   

Pagetable virtual address order.  move_ptes can also lock two ptes 
within one pagetable, without regard to order, but they're protected by 
mmap_sem, which is also held during pinning.

    J

      reply	other threads:[~2008-03-22 21:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-20 23:02 How to avoid spurious lockdep warnings? Jeremy Fitzhardinge
2008-03-20 23:44 ` Peter Zijlstra
2008-03-21  5:35   ` Jeremy Fitzhardinge
2008-03-22 20:46 ` Arjan van de Ven
2008-03-22 21:08   ` Jeremy Fitzhardinge [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=47E57546.9030403@goop.org \
    --to=jeremy@goop.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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