lkml.org 
[lkml]   [2008]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to avoid spurious lockdep warnings?
Peter Zijlstra wrote:
> On Thu, 2008-03-20 at 16:02 -0700, Jeremy Fitzhardinge 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?
>>
>
> How many locks at once?

(We discussed this, but for the record...)

The main limit is the batch size, which is currently 32. There's
nothing magic about this number, so it may change (I can't imagine it
getting much larger however, since a 32x mitigation of hypercall
overhead is already pretty good).

J


\
 
 \ /
  Last update: 2008-03-21 06:41    [W:0.063 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site