[lkml]   [2009]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject[PATCH 0/8] kernel:lockdep:replace DFS with BFS

    Currently lockdep uses recursion DFS(depth-first search) algorithm to
    search target in checking lock circle(check_noncircular()),irq-safe
    -> irq-unsafe(check_irq_usage()) and irq inversion when adding a new
    lock dependency. This patches replace the current DFS with BFS, based on
    the following consideration:

    1,no loss of efficiency, no matter DFS or BFS, the running time
    are O(V+E) (V is vertex count, and E is edge count of one

    2,BFS may be easily implemented by circular queue and consumes
    much less kernel stack space than DFS for DFS is implemented by

    3, The shortest path can be obtained by BFS if the target is
    found, but can't be got by DFS. By the shortest path, we can
    shorten the lock dependency chain and help to troubleshoot lock
    problem easier than before.

     \ /
      Last update: 2009-05-31 16:53    [W:0.018 / U:4.612 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site