lkml.org 
[lkml]   [2009]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RESEND PATCH 01/11] kernel:lockdep:print the shortest dependency chain if finding a circle
    From
    Date
    On Mon, 2009-07-13 at 09:01 +0200, Ingo Molnar wrote:
    >
    > It's a nice byproduct, beyond the primary advantage of not being a
    > stack based recursion check.
    >
    > I think this patch-set is great, and there's just one more step
    > needed to make it round: it would be nice to remove the limitation
    > of maximum number of locks held per task. (MAX_LOCK_DEPTH)
    >
    > The way we could do it is to split out this bit of struct task:
    >
    > #ifdef CONFIG_LOCKDEP
    > # define MAX_LOCK_DEPTH 48UL
    > u64 curr_chain_key;
    > int lockdep_depth;
    > unsigned int lockdep_recursion;
    > struct held_lock held_locks[MAX_LOCK_DEPTH];
    > gfp_t lockdep_reclaim_gfp;
    > #endif
    >
    > into a separate 'struct lockdep_state' structure, and allocate it
    > dynamically during fork with a initial pre-set size of say 64 locks
    > depth. If we hit that limit, we'd double the allocation threshold,
    > which would cause a larger structure to be allocated for all newly
    > allocated tasks.

    Right, except allocating stuff while in the middle of lockdep is very
    hard since it involves taking more locks :-)

    I've tried it several times but never quite managed it in a way that I
    felt comfortable with.

    It would require having a reserve and serializing over that reserve.



    \
     
     \ /
      Last update: 2009-07-13 11:17    [W:4.555 / U:0.656 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site