2009-06-08 12:22:18

by Peter Zijlstra

[permalink] [raw]
Subject: Re: [PATCH 0/8] kernel:lockdep:replace DFS with BFS

On Sun, 2009-05-31 at 22:49 +0800, [email protected] wrote:
> Hi,
> 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
> graph);
>
> 2,BFS may be easily implemented by circular queue and consumes
> much less kernel stack space than DFS for DFS is implemented by
> recursion.
>
> 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.
>

OK, so I applied the patches and the cleanup below.

mostly little style nits and moving the circular queue into lockdep.c
(nobody else uses it, so why share it?).

One thing though, macros with return statements?! that's seriously bad
style, don't do that.

One thing that worries me a little is that we loose DaveM's
lockdep_dependency_visit() optimization. My brain seems unwilling to
co-operate on determining if BFS would make that redundant, so a little
word on that would be appreciated.

Then I booted it and all hell broke loose, so either I wrecked something
or you did :-), would you terribly mind poking at that a little?

Over all I like that patches, but they need a little more work. Could
you send delta patches from now on?

---

[ 0.000999] =================================
[ 0.000999] [ BUG: bad contention detected! ]
[ 0.000999] ---------------------------------
[ 0.000999] swapper/0 is trying to contend lock (old_style_seqlock_init) at:
[ 0.000999] [<ffffffff8133a795>] _spin_lock+0x6d/0x75
[ 0.000999] but there are no locks held!
[ 0.000999]
[ 0.000999] other info that might help us debug this:
[ 0.000999] 1 lock held by swapper/0:
[ 0.000999] #0: (xtime_lock){-.....}, at: [<ffffffff8106a360>] tick_periodic+0x1d/0x74
[ 0.000999]
[ 0.000999] stack backtrace:
[ 0.000999] Pid: 0, comm: swapper Not tainted 2.6.30-rc8-tip #1049
[ 0.000999] Call Trace:
[ 0.000999] <IRQ> [<ffffffff81071bd8>] print_lock_contention_bug+0x100/0x110
[ 0.000999] [<ffffffff81071ce0>] lock_acquired+0xf8/0x2b4
[ 0.000999] [<ffffffff81010221>] ? update_vsyscall+0x2d/0xd0
[ 0.000999] [<ffffffff8133a795>] _spin_lock+0x6d/0x75
[ 0.000999] [<ffffffff81010221>] ? update_vsyscall+0x2d/0xd0
[ 0.000999] [<ffffffff81010221>] update_vsyscall+0x2d/0xd0
[ 0.000999] [<ffffffff81067469>] update_wall_time+0x4c1/0x4cc
[ 0.000999] [<ffffffff8105274b>] do_timer+0x15/0x1c
[ 0.000999] [<ffffffff8106a37e>] tick_periodic+0x3b/0x74
[ 0.000999] [<ffffffff8106a3db>] tick_handle_periodic+0x24/0x71
[ 0.000999] [<ffffffff8100ea23>] timer_interrupt+0x1f/0x26
[ 0.000999] [<ffffffff8109348b>] handle_IRQ_event+0x8e/0x19c
[ 0.000999] [<ffffffff8109501e>] handle_level_irq+0x9d/0xf3
[ 0.000999] [<ffffffff8100e24b>] handle_irq+0x24/0x2c
[ 0.000999] [<ffffffff8133f55b>] do_IRQ+0x63/0xc2
[ 0.000999] [<ffffffff8100c713>] ret_from_intr+0x0/0xf
[ 0.000999] <EOI> [<ffffffff8133a538>] ? _spin_unlock_irqrestore+0x47/0x6d
[ 0.000999] [<ffffffff81093eea>] ? __setup_irq+0x1ea/0x277
[ 0.000999] [<ffffffff81094120>] ? setup_irq+0x25/0x2a
[ 0.000999] [<ffffffff8158e63e>] ? hpet_time_init+0x20/0x22
[ 0.000999] [<ffffffff8158bbcc>] ? start_kernel+0x2ee/0x37a
[ 0.000999] [<ffffffff8158b29a>] ? x86_64_start_reservations+0xaa/0xae
[ 0.000999] [<ffffffff8158b37f>] ? x86_64_start_kernel+0xe1/0xe8

And ended in a stuck boot at:

[ 65.411804] rmmod R running task 0 616 1 0x00000008
[ 65.411804] ffff8800023c41a0 ffffea0003336ba8 ffff88007e3a3c08 ffffffff8106f71a
[ 65.411804] ffff88007e3a3c48 0000000000000202 ffff88007f821600 0000000000001823
[ 65.411804] ffff88007e109d20 ffff88007f8b5c80 0000000000000000 ffff88007e3a3d18
[ 65.411804] Call Trace:
[ 65.411804] [<ffffffff8106f71a>] ? trace_hardirqs_on+0xd/0xf
[ 65.411804] [<ffffffff8113f1b6>] ? release_sysfs_dirent+0x91/0xb1
[ 65.411804] [<ffffffff81071af6>] ? print_lock_contention_bug+0x1e/0x110
[ 65.411804] [<ffffffff81071af6>] ? print_lock_contention_bug+0x1e/0x110
[ 65.411804] [<ffffffff8113eff3>] ? sysfs_addrm_start+0x7d/0xaa
[ 65.411804] [<ffffffff81071af6>] ? print_lock_contention_bug+0x1e/0x110
[ 65.411804] [<ffffffff810113ff>] ? alternatives_smp_module_del+0x37/0xd0
[ 65.411804] [<ffffffff810e61ee>] ? free_percpu+0x38/0xf8
[ 65.411804] [<ffffffff8106f71a>] ? trace_hardirqs_on+0xd/0xf
[ 65.411804] [<ffffffff8133a542>] ? _spin_unlock_irqrestore+0x51/0x6d
[ 65.411804] [<ffffffff810e62a5>] ? free_percpu+0xef/0xf8
[ 65.411804] [<ffffffff8107ade5>] ? free_module+0x104/0x118
[ 65.411804] [<ffffffff8107b0a8>] ? sys_delete_module+0x20c/0x22e
[ 65.411804] [<ffffffff81339f88>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 65.411804] [<ffffffff8100bcdb>] ? system_call_fastpath+0x16/0x1b

( I can send you my .config if you cannot reproduce, but I don't think
its anything special )

---

Subject: lockdep: clean up after BFS patches
From: Peter Zijlstra <[email protected]>
Date: Mon Jun 08 13:32:31 CEST 2009


LKML-Reference: <new-submission>
Signed-off-by: Peter Zijlstra <[email protected]>
---
include/linux/lockdep.h | 7 -
kernel/lockdep.c | 232 +++++++++++++++++++++++++++------------------
kernel/lockdep_internals.h | 97 ------------------
3 files changed, 147 insertions(+), 189 deletions(-)
===================================================================
===================================================================
--- linux-2.6.orig/include/linux/lockdep.h
+++ linux-2.6/include/linux/lockdep.h
@@ -58,7 +58,6 @@ struct lock_class {

struct lockdep_subclass_key *key;
unsigned int subclass;
- unsigned int dep_gen_id;

/*
* IRQ/softirq usage tracking bits:
@@ -150,9 +149,9 @@ struct lock_list {
struct stack_trace trace;
int distance;

- /*The parent field is used to implement breadth-first search,and
- *the bit 0 is reused to indicate if the lock has been accessed
- *in BFS.
+ /*
+ * The parent field is used to implement breadth-first search, and the
+ * bit 0 is reused to indicate if the lock has been accessed in BFS.
*/
struct lock_list *parent;
};
===================================================================
--- linux-2.6.orig/kernel/lockdep.c
+++ linux-2.6/kernel/lockdep.c
@@ -43,6 +43,7 @@
#include <linux/ftrace.h>
#include <linux/stringify.h>
#include <linux/bitops.h>
+
#include <asm/sections.h>

#include "lockdep_internals.h"
@@ -118,7 +119,7 @@ static inline int debug_locks_off_graph_
static int lockdep_initialized;

unsigned long nr_list_entries;
-struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
+static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];

/*
* All data structures here are protected by the global debug_lock.
@@ -390,19 +391,6 @@ unsigned int nr_process_chains;
unsigned int max_lockdep_depth;
unsigned int max_recursion_depth;

-static unsigned int lockdep_dependency_gen_id;
-
-static bool lockdep_dependency_visit(struct lock_class *source,
- unsigned int depth)
-{
- if (!depth)
- lockdep_dependency_gen_id++;
- if (source->dep_gen_id == lockdep_dependency_gen_id)
- return true;
- source->dep_gen_id = lockdep_dependency_gen_id;
- return false;
-}
-
#ifdef CONFIG_DEBUG_LOCKDEP
/*
* We cannot printk in early bootup code. Not even early_printk()
@@ -575,64 +563,6 @@ static void print_lock_class_header(stru
print_ip_sym((unsigned long)class->key);
}

-/*
- * printk the shortest lock dependencies from @start to @end in reverse order:
- */
-static void __used
-print_shortest_lock_dependencies(struct lock_list *leaf,
- struct lock_list *root)
-{
- struct lock_list *entry = leaf;
- int depth;
-
- /*compute depth from generated tree by BFS*/
- depth = get_lock_depth(leaf);
-
- do {
- print_lock_class_header(entry->class, depth);
- printk("%*s ... acquired at:\n", depth, "");
- print_stack_trace(&entry->trace, 2);
- printk("\n");
-
- if (depth == 0 && (entry != root)) {
- printk("lockdep:%s bad BFS generated tree\n", __func__);
- break;
- }
-
- entry = get_lock_parent(entry);
- depth--;
- } while (entry && (depth >= 0));
-
- return;
-}
-/*
- * printk all lock dependencies starting at <entry>:
- */
-static void __used
-print_lock_dependencies(struct lock_class *class, int depth)
-{
- struct lock_list *entry;
-
- if (lockdep_dependency_visit(class, depth))
- return;
-
- if (DEBUG_LOCKS_WARN_ON(depth >= 20))
- return;
-
- print_lock_class_header(class, depth);
-
- list_for_each_entry(entry, &class->locks_after, entry) {
- if (DEBUG_LOCKS_WARN_ON(!entry->class))
- return;
-
- print_lock_dependencies(entry->class, depth + 1);
-
- printk("%*s ... acquired at:\n",depth,"");
- print_stack_trace(&entry->trace, 2);
- printk("\n");
- }
-}
-
static void print_kernel_version(void)
{
printk("%s %.*s\n", init_utsname()->release,
@@ -927,14 +857,106 @@ static int add_lock_to_list(struct lock_
return 1;
}

-unsigned long bfs_accessed[BITS_TO_LONGS(MAX_LOCKDEP_ENTRIES)];
-static struct circular_queue lock_cq;
+/*For good efficiency of modular, we use power of 2*/
+#define MAX_CIRCULAR_QUEUE_SIZE 4096UL
+#define CQ_MASK (MAX_CIRCULAR_QUEUE_SIZE-1)
+
+/* The circular_queue and helpers is used to implement the
+ * breadth-first search(BFS)algorithem, by which we can build
+ * the shortest path from the next lock to be acquired to the
+ * previous held lock if there is a circular between them.
+ * */
+struct circular_queue {
+ unsigned long element[MAX_CIRCULAR_QUEUE_SIZE];
+ unsigned int front, rear;
+};
+
+static struct circular_queue lock_cq;
+static unsigned long bfs_accessed[BITS_TO_LONGS(MAX_LOCKDEP_ENTRIES)];
+
unsigned int max_bfs_queue_depth;
+
+static inline void __cq_init(struct circular_queue *cq)
+{
+ cq->front = cq->rear = 0;
+ bitmap_zero(bfs_accessed, MAX_LOCKDEP_ENTRIES);
+}
+
+static inline int __cq_empty(struct circular_queue *cq)
+{
+ return (cq->front == cq->rear);
+}
+
+static inline int __cq_full(struct circular_queue *cq)
+{
+ return ((cq->rear + 1) & CQ_MASK) == cq->front;
+}
+
+static inline int __cq_enqueue(struct circular_queue *cq, unsigned long elem)
+{
+ if (__cq_full(cq))
+ return -1;
+
+ cq->element[cq->rear] = elem;
+ cq->rear = (cq->rear + 1) & CQ_MASK;
+ return 0;
+}
+
+static inline int __cq_dequeue(struct circular_queue *cq, unsigned long *elem)
+{
+ if (__cq_empty(cq))
+ return -1;
+
+ *elem = cq->element[cq->front];
+ cq->front = (cq->front + 1) & CQ_MASK;
+ return 0;
+}
+
+static inline unsigned int __cq_get_elem_count(struct circular_queue *cq)
+{
+ return (cq->rear - cq->front) & CQ_MASK;
+}
+
+static inline void mark_lock_accessed(struct lock_list *lock,
+ struct lock_list *parent)
+{
+ unsigned long nr;
+ nr = lock - list_entries;
+ WARN_ON(nr >= nr_list_entries);
+ lock->parent = parent;
+ set_bit(nr, bfs_accessed);
+}
+
+static inline unsigned long lock_accessed(struct lock_list *lock)
+{
+ unsigned long nr;
+ nr = lock - list_entries;
+ WARN_ON(nr >= nr_list_entries);
+ return test_bit(nr, bfs_accessed);
+}
+
+static inline struct lock_list *get_lock_parent(struct lock_list *child)
+{
+ return child->parent;
+}
+
+static inline int get_lock_depth(struct lock_list *child)
+{
+ int depth = 0;
+ struct lock_list *parent;
+
+ while ((parent = get_lock_parent(child))) {
+ child = parent;
+ depth++;
+ }
+ return depth;
+}
+
static int __bfs(struct lock_list *source_entry,
- void *data,
- int (*match)(struct lock_list *entry, void *data),
- struct lock_list **target_entry,
- int forward)
+ void *data,
+ int (*match)(struct lock_list *entry, void *data),
+ struct lock_list **target_entry,
+ int forward)
{
struct lock_list *entry;
struct list_head *head;
@@ -1202,14 +1224,6 @@ check_noncircular(struct lock_list *root
* without creating any illegal irq-safe -> irq-unsafe lock dependency.
*/

-
-#define BFS_PROCESS_RET(ret) do { \
- if (ret < 0) \
- return print_bfs_bug(ret); \
- if (ret == 1) \
- return 1; \
- } while (0)
-
static inline int usage_match(struct lock_list *entry, void *bit)
{
return entry->class->usage_mask & (1 << (enum lock_usage_bit)bit);
@@ -1236,6 +1250,8 @@ find_usage_forwards(struct lock_list *ro
debug_atomic_inc(&nr_find_usage_forwards_checks);

result = __bfs_forwards(root, (void *)bit, usage_match, target_entry);
+ if (result < 0)
+ return print_bfs_bug(result);

return result;
}
@@ -1259,10 +1275,42 @@ find_usage_backwards(struct lock_list *r
debug_atomic_inc(&nr_find_usage_backwards_checks);

result = __bfs_backwards(root, (void *)bit, usage_match, target_entry);
+ if (result < 0)
+ return print_bfs_bug(result);

return result;
}

+/*
+ * printk the shortest lock dependencies from @start to @end in reverse order:
+ */
+static void __used
+print_shortest_lock_dependencies(struct lock_list *leaf,
+ struct lock_list *root)
+{
+ struct lock_list *entry = leaf;
+ int depth;
+
+ /*compute depth from generated tree by BFS*/
+ depth = get_lock_depth(leaf);
+
+ do {
+ print_lock_class_header(entry->class, depth);
+ printk("%*s ... acquired at:\n", depth, "");
+ print_stack_trace(&entry->trace, 2);
+ printk("\n");
+
+ if (depth == 0 && (entry != root)) {
+ printk("lockdep:%s bad BFS generated tree\n", __func__);
+ break;
+ }
+
+ entry = get_lock_parent(entry);
+ depth--;
+ } while (entry && (depth >= 0));
+
+ return;
+}

static int
print_bad_irq_dependency(struct task_struct *curr,
@@ -1349,12 +1397,14 @@ check_usage(struct task_struct *curr, st

this.class = hlock_class(prev);
ret = find_usage_backwards(&this, bit_backwards, &target_entry);
- BFS_PROCESS_RET(ret);
+ if (!ret || ret == 1)
+ return ret;

that.parent = NULL;
that.class = hlock_class(next);
ret = find_usage_forwards(&that, bit_forwards, &target_entry1);
- BFS_PROCESS_RET(ret);
+ if (!ret || ret == 1)
+ return ret;

return print_bad_irq_dependency(curr, &this, &that,
target_entry, target_entry1,
@@ -2038,7 +2088,8 @@ check_usage_forwards(struct task_struct
root.parent = NULL;
root.class = hlock_class(this);
ret = find_usage_forwards(&root, bit, &target_entry);
- BFS_PROCESS_RET(ret);
+ if (!ret || ret == 1)
+ return ret;

return print_irq_inversion_bug(curr, &root, target_entry,
this, 1, irqclass);
@@ -2059,7 +2110,8 @@ check_usage_backwards(struct task_struct
root.parent = NULL;
root.class = hlock_class(this);
ret = find_usage_backwards(&root, bit, &target_entry);
- BFS_PROCESS_RET(ret);
+ if (!ret || ret == 1)
+ return ret;

return print_irq_inversion_bug(curr, &root, target_entry,
this, 1, irqclass);
===================================================================
--- linux-2.6.orig/kernel/lockdep_internals.h
+++ linux-2.6/kernel/lockdep_internals.h
@@ -91,6 +91,8 @@ extern unsigned int nr_process_chains;
extern unsigned int max_lockdep_depth;
extern unsigned int max_recursion_depth;

+extern unsigned int max_bfs_queue_depth;
+
#ifdef CONFIG_PROVE_LOCKING
extern unsigned long lockdep_count_forward_deps(struct lock_class *);
extern unsigned long lockdep_count_backward_deps(struct lock_class *);
@@ -136,98 +138,3 @@ extern atomic_t nr_find_usage_backwards_
# define debug_atomic_dec(ptr) do { } while (0)
# define debug_atomic_read(ptr) 0
#endif
-
-
-extern unsigned int max_bfs_queue_depth;
-extern unsigned long nr_list_entries;
-extern struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
-extern unsigned long bfs_accessed[];
-
-/*For good efficiency of modular, we use power of 2*/
-#define MAX_CIRCULAR_QUE_SIZE 4096UL
-
-/* The circular_queue and helpers is used to implement the
- * breadth-first search(BFS)algorithem, by which we can build
- * the shortest path from the next lock to be acquired to the
- * previous held lock if there is a circular between them.
- * */
-struct circular_queue{
- unsigned long element[MAX_CIRCULAR_QUE_SIZE];
- unsigned int front, rear;
-};
-
-static inline void __cq_init(struct circular_queue *cq)
-{
- cq->front = cq->rear = 0;
- bitmap_zero(bfs_accessed, MAX_LOCKDEP_ENTRIES);
-}
-
-static inline int __cq_empty(struct circular_queue *cq)
-{
- return (cq->front == cq->rear);
-}
-
-static inline int __cq_full(struct circular_queue *cq)
-{
- return ((cq->rear + 1)&(MAX_CIRCULAR_QUE_SIZE-1)) == cq->front;
-}
-
-static inline int __cq_enqueue(struct circular_queue *cq, unsigned long elem)
-{
- if (__cq_full(cq))
- return -1;
-
- cq->element[cq->rear] = elem;
- cq->rear = (cq->rear + 1)&(MAX_CIRCULAR_QUE_SIZE-1);
- return 0;
-}
-
-static inline int __cq_dequeue(struct circular_queue *cq, unsigned long *elem)
-{
- if (__cq_empty(cq))
- return -1;
-
- *elem = cq->element[cq->front];
- cq->front = (cq->front + 1)&(MAX_CIRCULAR_QUE_SIZE-1);
- return 0;
-}
-
-static inline unsigned int __cq_get_elem_count(struct circular_queue *cq)
-{
- return (cq->rear - cq->front)&(MAX_CIRCULAR_QUE_SIZE-1);
-}
-
-static inline void mark_lock_accessed(struct lock_list *lock,
- struct lock_list *parent)
-{
- unsigned long nr;
- nr = lock - list_entries;
- WARN_ON(nr >= nr_list_entries);
- lock->parent = parent;
- set_bit(nr, bfs_accessed);
-}
-
-static inline unsigned long lock_accessed(struct lock_list *lock)
-{
- unsigned long nr;
- nr = lock - list_entries;
- WARN_ON(nr >= nr_list_entries);
- return test_bit(nr, bfs_accessed);
-}
-
-static inline struct lock_list *get_lock_parent(struct lock_list *child)
-{
- return child->parent;
-}
-
-static inline int get_lock_depth(struct lock_list *child)
-{
- int depth = 0;
- struct lock_list *parent;
-
- while ((parent = get_lock_parent(child))) {
- child = parent;
- depth++;
- }
- return depth;
-}


2009-06-08 13:38:57

by Ming Lei

[permalink] [raw]
Subject: Re: [PATCH 0/8] kernel:lockdep:replace DFS with BFS

2009/6/8 Peter Zijlstra <[email protected]>:
>
> OK, so I applied the patches and the cleanup below.

Thank you for your review and feedback.

>
> mostly little style nits and moving the circular queue into lockdep.c
> (nobody else uses it, so why share it?).

Yes, I agree.

>
> One thing though, macros with return statements?! that's seriously bad
> style, don't do that.

Yes, I'll fix it.

>
> One thing that worries me a little is that we loose DaveM's
> lockdep_dependency_visit() optimization. My brain seems unwilling to
> co-operate on determining if BFS would make that redundant, so a little
> word on that would be appreciated.
>
> Then I booted it and all hell broke loose, so either I wrecked something
> or you did :-), would you terribly mind poking at that a little?

Oh, let me work out what's wrong with this, maybe I need a little time.

>
> Over all I like that patches, but they need a little more work. Could
> you send delta patches from now on?

Yes, I'd like to do it.

>
> ---
>
> [ ? ?0.000999] =================================
> [ ? ?0.000999] [ BUG: bad contention detected! ]
> [ ? ?0.000999] ---------------------------------
> [ ? ?0.000999] swapper/0 is trying to contend lock (old_style_seqlock_init) at:
> [ ? ?0.000999] [<ffffffff8133a795>] _spin_lock+0x6d/0x75
> [ ? ?0.000999] but there are no locks held!
> [ ? ?0.000999]
> [ ? ?0.000999] other info that might help us debug this:
> [ ? ?0.000999] 1 lock held by swapper/0:
> [ ? ?0.000999] ?#0: ?(xtime_lock){-.....}, at: [<ffffffff8106a360>] tick_periodic+0x1d/0x74
> [ ? ?0.000999]
> [ ? ?0.000999] stack backtrace:
> [ ? ?0.000999] Pid: 0, comm: swapper Not tainted 2.6.30-rc8-tip #1049
> [ ? ?0.000999] Call Trace:
> [ ? ?0.000999] ?<IRQ> ?[<ffffffff81071bd8>] print_lock_contention_bug+0x100/0x110
> [ ? ?0.000999] ?[<ffffffff81071ce0>] lock_acquired+0xf8/0x2b4
> [ ? ?0.000999] ?[<ffffffff81010221>] ? update_vsyscall+0x2d/0xd0
> [ ? ?0.000999] ?[<ffffffff8133a795>] _spin_lock+0x6d/0x75
> [ ? ?0.000999] ?[<ffffffff81010221>] ? update_vsyscall+0x2d/0xd0
> [ ? ?0.000999] ?[<ffffffff81010221>] update_vsyscall+0x2d/0xd0
> [ ? ?0.000999] ?[<ffffffff81067469>] update_wall_time+0x4c1/0x4cc
> [ ? ?0.000999] ?[<ffffffff8105274b>] do_timer+0x15/0x1c
> [ ? ?0.000999] ?[<ffffffff8106a37e>] tick_periodic+0x3b/0x74
> [ ? ?0.000999] ?[<ffffffff8106a3db>] tick_handle_periodic+0x24/0x71
> [ ? ?0.000999] ?[<ffffffff8100ea23>] timer_interrupt+0x1f/0x26
> [ ? ?0.000999] ?[<ffffffff8109348b>] handle_IRQ_event+0x8e/0x19c
> [ ? ?0.000999] ?[<ffffffff8109501e>] handle_level_irq+0x9d/0xf3
> [ ? ?0.000999] ?[<ffffffff8100e24b>] handle_irq+0x24/0x2c
> [ ? ?0.000999] ?[<ffffffff8133f55b>] do_IRQ+0x63/0xc2
> [ ? ?0.000999] ?[<ffffffff8100c713>] ret_from_intr+0x0/0xf
> [ ? ?0.000999] ?<EOI> ?[<ffffffff8133a538>] ? _spin_unlock_irqrestore+0x47/0x6d
> [ ? ?0.000999] ?[<ffffffff81093eea>] ? __setup_irq+0x1ea/0x277
> [ ? ?0.000999] ?[<ffffffff81094120>] ? setup_irq+0x25/0x2a
> [ ? ?0.000999] ?[<ffffffff8158e63e>] ? hpet_time_init+0x20/0x22
> [ ? ?0.000999] ?[<ffffffff8158bbcc>] ? start_kernel+0x2ee/0x37a
> [ ? ?0.000999] ?[<ffffffff8158b29a>] ? x86_64_start_reservations+0xaa/0xae
> [ ? ?0.000999] ?[<ffffffff8158b37f>] ? x86_64_start_kernel+0xe1/0xe8
>
> And ended in a stuck boot at:
>
> [ ? 65.411804] rmmod ? ? ? ? R ?running task ? ? ? ?0 ? 616 ? ? ?1 0x00000008
> [ ? 65.411804] ?ffff8800023c41a0 ffffea0003336ba8 ffff88007e3a3c08 ffffffff8106f71a
> [ ? 65.411804] ?ffff88007e3a3c48 0000000000000202 ffff88007f821600 0000000000001823
> [ ? 65.411804] ?ffff88007e109d20 ffff88007f8b5c80 0000000000000000 ffff88007e3a3d18
> [ ? 65.411804] Call Trace:
> [ ? 65.411804] ?[<ffffffff8106f71a>] ? trace_hardirqs_on+0xd/0xf
> [ ? 65.411804] ?[<ffffffff8113f1b6>] ? release_sysfs_dirent+0x91/0xb1
> [ ? 65.411804] ?[<ffffffff81071af6>] ? print_lock_contention_bug+0x1e/0x110
> [ ? 65.411804] ?[<ffffffff81071af6>] ? print_lock_contention_bug+0x1e/0x110
> [ ? 65.411804] ?[<ffffffff8113eff3>] ? sysfs_addrm_start+0x7d/0xaa
> [ ? 65.411804] ?[<ffffffff81071af6>] ? print_lock_contention_bug+0x1e/0x110
> [ ? 65.411804] ?[<ffffffff810113ff>] ? alternatives_smp_module_del+0x37/0xd0
> [ ? 65.411804] ?[<ffffffff810e61ee>] ? free_percpu+0x38/0xf8
> [ ? 65.411804] ?[<ffffffff8106f71a>] ? trace_hardirqs_on+0xd/0xf
> [ ? 65.411804] ?[<ffffffff8133a542>] ? _spin_unlock_irqrestore+0x51/0x6d
> [ ? 65.411804] ?[<ffffffff810e62a5>] ? free_percpu+0xef/0xf8
> [ ? 65.411804] ?[<ffffffff8107ade5>] ? free_module+0x104/0x118
> [ ? 65.411804] ?[<ffffffff8107b0a8>] ? sys_delete_module+0x20c/0x22e
> [ ? 65.411804] ?[<ffffffff81339f88>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> [ ? 65.411804] ?[<ffffffff8100bcdb>] ? system_call_fastpath+0x16/0x1b
>
> ( I can send you my .config if you cannot reproduce, but I don't think
> its anything special )
>
> ---
>
> Subject: lockdep: clean up after BFS patches
> From: Peter Zijlstra <[email protected]>
> Date: Mon Jun 08 13:32:31 CEST 2009
>
>
> LKML-Reference: <new-submission>
> Signed-off-by: Peter Zijlstra <[email protected]>
> ---
> ?include/linux/lockdep.h ? ?| ? ?7 -
> ?kernel/lockdep.c ? ? ? ? ? | ?232 +++++++++++++++++++++++++++------------------
> ?kernel/lockdep_internals.h | ? 97 ------------------
> ?3 files changed, 147 insertions(+), 189 deletions(-)
> ===================================================================
> ===================================================================
> --- linux-2.6.orig/include/linux/lockdep.h
> +++ linux-2.6/include/linux/lockdep.h
> @@ -58,7 +58,6 @@ struct lock_class {
>
> ? ? ? ?struct lockdep_subclass_key ? ? *key;
> ? ? ? ?unsigned int ? ? ? ? ? ? ? ? ? ?subclass;
> - ? ? ? unsigned int ? ? ? ? ? ? ? ? ? ?dep_gen_id;
>
> ? ? ? ?/*
> ? ? ? ? * IRQ/softirq usage tracking bits:
> @@ -150,9 +149,9 @@ struct lock_list {
> ? ? ? ?struct stack_trace ? ? ? ? ? ? ?trace;
> ? ? ? ?int ? ? ? ? ? ? ? ? ? ? ? ? ? ? distance;
>
> - ? ? ? /*The parent field is used to implement breadth-first search,and
> - ? ? ? ?*the bit 0 is reused to indicate if the lock has been accessed
> - ? ? ? ?*in BFS.
> + ? ? ? /*
> + ? ? ? ?* The parent field is used to implement breadth-first search, and the
> + ? ? ? ?* bit 0 is reused to indicate if the lock has been accessed in BFS.
> ? ? ? ? */
> ? ? ? ?struct lock_list ? ? ? ? ? ? ? ?*parent;
> ?};
> ===================================================================
> --- linux-2.6.orig/kernel/lockdep.c
> +++ linux-2.6/kernel/lockdep.c
> @@ -43,6 +43,7 @@
> ?#include <linux/ftrace.h>
> ?#include <linux/stringify.h>
> ?#include <linux/bitops.h>
> +
> ?#include <asm/sections.h>
>
> ?#include "lockdep_internals.h"
> @@ -118,7 +119,7 @@ static inline int debug_locks_off_graph_
> ?static int lockdep_initialized;
>
> ?unsigned long nr_list_entries;
> -struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
> +static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
>
> ?/*
> ?* All data structures here are protected by the global debug_lock.
> @@ -390,19 +391,6 @@ unsigned int nr_process_chains;
> ?unsigned int max_lockdep_depth;
> ?unsigned int max_recursion_depth;
>
> -static unsigned int lockdep_dependency_gen_id;
> -
> -static bool lockdep_dependency_visit(struct lock_class *source,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?unsigned int depth)
> -{
> - ? ? ? if (!depth)
> - ? ? ? ? ? ? ? lockdep_dependency_gen_id++;
> - ? ? ? if (source->dep_gen_id == lockdep_dependency_gen_id)
> - ? ? ? ? ? ? ? return true;
> - ? ? ? source->dep_gen_id = lockdep_dependency_gen_id;
> - ? ? ? return false;
> -}
> -
> ?#ifdef CONFIG_DEBUG_LOCKDEP
> ?/*
> ?* We cannot printk in early bootup code. Not even early_printk()
> @@ -575,64 +563,6 @@ static void print_lock_class_header(stru
> ? ? ? ?print_ip_sym((unsigned long)class->key);
> ?}
>
> -/*
> - * printk the shortest lock dependencies from @start to @end in reverse order:
> - */
> -static void __used
> -print_shortest_lock_dependencies(struct lock_list *leaf,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct lock_list *root)
> -{
> - ? ? ? struct lock_list *entry = leaf;
> - ? ? ? int depth;
> -
> - ? ? ? /*compute depth from generated tree by BFS*/
> - ? ? ? depth = get_lock_depth(leaf);
> -
> - ? ? ? do {
> - ? ? ? ? ? ? ? print_lock_class_header(entry->class, depth);
> - ? ? ? ? ? ? ? printk("%*s ... acquired at:\n", depth, "");
> - ? ? ? ? ? ? ? print_stack_trace(&entry->trace, 2);
> - ? ? ? ? ? ? ? printk("\n");
> -
> - ? ? ? ? ? ? ? if (depth == 0 && (entry != root)) {
> - ? ? ? ? ? ? ? ? ? ? ? printk("lockdep:%s bad BFS generated tree\n", __func__);
> - ? ? ? ? ? ? ? ? ? ? ? break;
> - ? ? ? ? ? ? ? }
> -
> - ? ? ? ? ? ? ? entry = get_lock_parent(entry);
> - ? ? ? ? ? ? ? depth--;
> - ? ? ? } while (entry && (depth >= 0));
> -
> - ? ? ? return;
> -}
> -/*
> - * printk all lock dependencies starting at <entry>:
> - */
> -static void __used
> -print_lock_dependencies(struct lock_class *class, int depth)
> -{
> - ? ? ? struct lock_list *entry;
> -
> - ? ? ? if (lockdep_dependency_visit(class, depth))
> - ? ? ? ? ? ? ? return;
> -
> - ? ? ? if (DEBUG_LOCKS_WARN_ON(depth >= 20))
> - ? ? ? ? ? ? ? return;
> -
> - ? ? ? print_lock_class_header(class, depth);
> -
> - ? ? ? list_for_each_entry(entry, &class->locks_after, entry) {
> - ? ? ? ? ? ? ? if (DEBUG_LOCKS_WARN_ON(!entry->class))
> - ? ? ? ? ? ? ? ? ? ? ? return;
> -
> - ? ? ? ? ? ? ? print_lock_dependencies(entry->class, depth + 1);
> -
> - ? ? ? ? ? ? ? printk("%*s ... acquired at:\n",depth,"");
> - ? ? ? ? ? ? ? print_stack_trace(&entry->trace, 2);
> - ? ? ? ? ? ? ? printk("\n");
> - ? ? ? }
> -}
> -
> ?static void print_kernel_version(void)
> ?{
> ? ? ? ?printk("%s %.*s\n", init_utsname()->release,
> @@ -927,14 +857,106 @@ static int add_lock_to_list(struct lock_
> ? ? ? ?return 1;
> ?}
>
> -unsigned long bfs_accessed[BITS_TO_LONGS(MAX_LOCKDEP_ENTRIES)];
> -static struct circular_queue ?lock_cq;
> +/*For good efficiency of modular, we use power of 2*/
> +#define MAX_CIRCULAR_QUEUE_SIZE ? ? ? ? ? ? ? ?4096UL
> +#define CQ_MASK ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(MAX_CIRCULAR_QUEUE_SIZE-1)
> +
> +/* The circular_queue and helpers is used to implement the
> + * breadth-first search(BFS)algorithem, by which we can build
> + * the shortest path from the next lock to be acquired to the
> + * previous held lock if there is a circular between them.
> + * */
> +struct circular_queue {
> + ? ? ? unsigned long element[MAX_CIRCULAR_QUEUE_SIZE];
> + ? ? ? unsigned int ?front, rear;
> +};
> +
> +static struct circular_queue lock_cq;
> +static unsigned long bfs_accessed[BITS_TO_LONGS(MAX_LOCKDEP_ENTRIES)];
> +
> ?unsigned int max_bfs_queue_depth;
> +
> +static inline void __cq_init(struct circular_queue *cq)
> +{
> + ? ? ? cq->front = cq->rear = 0;
> + ? ? ? bitmap_zero(bfs_accessed, MAX_LOCKDEP_ENTRIES);
> +}
> +
> +static inline int __cq_empty(struct circular_queue *cq)
> +{
> + ? ? ? return (cq->front == cq->rear);
> +}
> +
> +static inline int __cq_full(struct circular_queue *cq)
> +{
> + ? ? ? return ((cq->rear + 1) & CQ_MASK) == cq->front;
> +}
> +
> +static inline int __cq_enqueue(struct circular_queue *cq, unsigned long elem)
> +{
> + ? ? ? if (__cq_full(cq))
> + ? ? ? ? ? ? ? return -1;
> +
> + ? ? ? cq->element[cq->rear] = elem;
> + ? ? ? cq->rear = (cq->rear + 1) & CQ_MASK;
> + ? ? ? return 0;
> +}
> +
> +static inline int __cq_dequeue(struct circular_queue *cq, unsigned long *elem)
> +{
> + ? ? ? if (__cq_empty(cq))
> + ? ? ? ? ? ? ? return -1;
> +
> + ? ? ? *elem = cq->element[cq->front];
> + ? ? ? cq->front = (cq->front + 1) & CQ_MASK;
> + ? ? ? return 0;
> +}
> +
> +static inline unsigned int ?__cq_get_elem_count(struct circular_queue *cq)
> +{
> + ? ? ? return (cq->rear - cq->front) & CQ_MASK;
> +}
> +
> +static inline void mark_lock_accessed(struct lock_list *lock,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct lock_list *parent)
> +{
> + ? ? ? unsigned long nr;
> + ? ? ? nr = lock - list_entries;
> + ? ? ? WARN_ON(nr >= nr_list_entries);
> + ? ? ? lock->parent = parent;
> + ? ? ? set_bit(nr, bfs_accessed);
> +}
> +
> +static inline unsigned long lock_accessed(struct lock_list *lock)
> +{
> + ? ? ? unsigned long nr;
> + ? ? ? nr = lock - list_entries;
> + ? ? ? WARN_ON(nr >= nr_list_entries);
> + ? ? ? return test_bit(nr, bfs_accessed);
> +}
> +
> +static inline struct lock_list *get_lock_parent(struct lock_list *child)
> +{
> + ? ? ? return child->parent;
> +}
> +
> +static inline int get_lock_depth(struct lock_list *child)
> +{
> + ? ? ? int depth = 0;
> + ? ? ? struct lock_list *parent;
> +
> + ? ? ? while ((parent = get_lock_parent(child))) {
> + ? ? ? ? ? ? ? child = parent;
> + ? ? ? ? ? ? ? depth++;
> + ? ? ? }
> + ? ? ? return depth;
> +}
> +
> ?static int __bfs(struct lock_list *source_entry,
> - ? ? ? ? ? ? ? ? ? ? ? void *data,
> - ? ? ? ? ? ? ? ? ? ? ? int (*match)(struct lock_list *entry, void *data),
> - ? ? ? ? ? ? ? ? ? ? ? struct lock_list **target_entry,
> - ? ? ? ? ? ? ? ? ? ? ? int forward)
> + ? ? ? ? ? ? ? ?void *data,
> + ? ? ? ? ? ? ? ?int (*match)(struct lock_list *entry, void *data),
> + ? ? ? ? ? ? ? ?struct lock_list **target_entry,
> + ? ? ? ? ? ? ? ?int forward)
> ?{
> ? ? ? ?struct lock_list *entry;
> ? ? ? ?struct list_head *head;
> @@ -1202,14 +1224,6 @@ check_noncircular(struct lock_list *root
> ?* without creating any illegal irq-safe -> irq-unsafe lock dependency.
> ?*/
>
> -
> -#define ? BFS_PROCESS_RET(ret) do { \
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ret < 0) \
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return print_bfs_bug(ret); \
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ret == 1) \
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return 1; \
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? } while (0)
> -
> ?static inline int usage_match(struct lock_list *entry, void *bit)
> ?{
> ? ? ? ?return entry->class->usage_mask & (1 << (enum lock_usage_bit)bit);
> @@ -1236,6 +1250,8 @@ find_usage_forwards(struct lock_list *ro
> ? ? ? ?debug_atomic_inc(&nr_find_usage_forwards_checks);
>
> ? ? ? ?result = __bfs_forwards(root, (void *)bit, usage_match, target_entry);
> + ? ? ? if (result < 0)
> + ? ? ? ? ? ? ? return print_bfs_bug(result);
>
> ? ? ? ?return result;
> ?}
> @@ -1259,10 +1275,42 @@ find_usage_backwards(struct lock_list *r
> ? ? ? ?debug_atomic_inc(&nr_find_usage_backwards_checks);
>
> ? ? ? ?result = __bfs_backwards(root, (void *)bit, usage_match, target_entry);
> + ? ? ? if (result < 0)
> + ? ? ? ? ? ? ? return print_bfs_bug(result);
>
> ? ? ? ?return result;
> ?}
>
> +/*
> + * printk the shortest lock dependencies from @start to @end in reverse order:
> + */
> +static void __used
> +print_shortest_lock_dependencies(struct lock_list *leaf,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct lock_list *root)
> +{
> + ? ? ? struct lock_list *entry = leaf;
> + ? ? ? int depth;
> +
> + ? ? ? /*compute depth from generated tree by BFS*/
> + ? ? ? depth = get_lock_depth(leaf);
> +
> + ? ? ? do {
> + ? ? ? ? ? ? ? print_lock_class_header(entry->class, depth);
> + ? ? ? ? ? ? ? printk("%*s ... acquired at:\n", depth, "");
> + ? ? ? ? ? ? ? print_stack_trace(&entry->trace, 2);
> + ? ? ? ? ? ? ? printk("\n");
> +
> + ? ? ? ? ? ? ? if (depth == 0 && (entry != root)) {
> + ? ? ? ? ? ? ? ? ? ? ? printk("lockdep:%s bad BFS generated tree\n", __func__);
> + ? ? ? ? ? ? ? ? ? ? ? break;
> + ? ? ? ? ? ? ? }
> +
> + ? ? ? ? ? ? ? entry = get_lock_parent(entry);
> + ? ? ? ? ? ? ? depth--;
> + ? ? ? } while (entry && (depth >= 0));
> +
> + ? ? ? return;
> +}
>
> ?static int
> ?print_bad_irq_dependency(struct task_struct *curr,
> @@ -1349,12 +1397,14 @@ check_usage(struct task_struct *curr, st
>
> ? ? ? ?this.class = hlock_class(prev);
> ? ? ? ?ret = find_usage_backwards(&this, bit_backwards, &target_entry);
> - ? ? ? BFS_PROCESS_RET(ret);
> + ? ? ? if (!ret || ret == 1)
> + ? ? ? ? ? ? ? return ret;
>
> ? ? ? ?that.parent = NULL;
> ? ? ? ?that.class = hlock_class(next);
> ? ? ? ?ret = find_usage_forwards(&that, bit_forwards, &target_entry1);
> - ? ? ? BFS_PROCESS_RET(ret);
> + ? ? ? if (!ret || ret == 1)
> + ? ? ? ? ? ? ? return ret;
>
> ? ? ? ?return print_bad_irq_dependency(curr, &this, &that,
> ? ? ? ? ? ? ? ? ? ? ? ?target_entry, target_entry1,
> @@ -2038,7 +2088,8 @@ check_usage_forwards(struct task_struct
> ? ? ? ?root.parent = NULL;
> ? ? ? ?root.class = hlock_class(this);
> ? ? ? ?ret = find_usage_forwards(&root, bit, &target_entry);
> - ? ? ? BFS_PROCESS_RET(ret);
> + ? ? ? if (!ret || ret == 1)
> + ? ? ? ? ? ? ? return ret;
>
> ? ? ? ?return print_irq_inversion_bug(curr, &root, target_entry,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?this, 1, irqclass);
> @@ -2059,7 +2110,8 @@ check_usage_backwards(struct task_struct
> ? ? ? ?root.parent = NULL;
> ? ? ? ?root.class = hlock_class(this);
> ? ? ? ?ret = find_usage_backwards(&root, bit, &target_entry);
> - ? ? ? BFS_PROCESS_RET(ret);
> + ? ? ? if (!ret || ret == 1)
> + ? ? ? ? ? ? ? return ret;
>
> ? ? ? ?return print_irq_inversion_bug(curr, &root, target_entry,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?this, 1, irqclass);
> ===================================================================
> --- linux-2.6.orig/kernel/lockdep_internals.h
> +++ linux-2.6/kernel/lockdep_internals.h
> @@ -91,6 +91,8 @@ extern unsigned int nr_process_chains;
> ?extern unsigned int max_lockdep_depth;
> ?extern unsigned int max_recursion_depth;
>
> +extern unsigned int max_bfs_queue_depth;
> +
> ?#ifdef CONFIG_PROVE_LOCKING
> ?extern unsigned long lockdep_count_forward_deps(struct lock_class *);
> ?extern unsigned long lockdep_count_backward_deps(struct lock_class *);
> @@ -136,98 +138,3 @@ extern atomic_t nr_find_usage_backwards_
> ?# define debug_atomic_dec(ptr) ? ? ? ? do { } while (0)
> ?# define debug_atomic_read(ptr) ? ? ? ? ? ? ? ?0
> ?#endif
> -
> -
> -extern unsigned int max_bfs_queue_depth;
> -extern unsigned long nr_list_entries;
> -extern struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
> -extern unsigned long bfs_accessed[];
> -
> -/*For good efficiency of modular, we use power of 2*/
> -#define ?MAX_CIRCULAR_QUE_SIZE ? ? 4096UL
> -
> -/* The circular_queue and helpers is used to implement the
> - * breadth-first search(BFS)algorithem, by which we can build
> - * the shortest path from the next lock to be acquired to the
> - * previous held lock if there is a circular between them.
> - * */
> -struct circular_queue{
> - ? ? ? unsigned long element[MAX_CIRCULAR_QUE_SIZE];
> - ? ? ? unsigned int ?front, rear;
> -};
> -
> -static inline void __cq_init(struct circular_queue *cq)
> -{
> - ? ? ? cq->front = cq->rear = 0;
> - ? ? ? bitmap_zero(bfs_accessed, MAX_LOCKDEP_ENTRIES);
> -}
> -
> -static inline int __cq_empty(struct circular_queue *cq)
> -{
> - ? ? ? return (cq->front == cq->rear);
> -}
> -
> -static inline int __cq_full(struct circular_queue *cq)
> -{
> - ? ? ? return ((cq->rear + 1)&(MAX_CIRCULAR_QUE_SIZE-1)) ?== cq->front;
> -}
> -
> -static inline int __cq_enqueue(struct circular_queue *cq, unsigned long elem)
> -{
> - ? ? ? if (__cq_full(cq))
> - ? ? ? ? ? ? ? return -1;
> -
> - ? ? ? cq->element[cq->rear] = elem;
> - ? ? ? cq->rear = (cq->rear + 1)&(MAX_CIRCULAR_QUE_SIZE-1);
> - ? ? ? return 0;
> -}
> -
> -static inline int __cq_dequeue(struct circular_queue *cq, unsigned long *elem)
> -{
> - ? ? ? if (__cq_empty(cq))
> - ? ? ? ? ? ? ? return -1;
> -
> - ? ? ? *elem = cq->element[cq->front];
> - ? ? ? cq->front = (cq->front + 1)&(MAX_CIRCULAR_QUE_SIZE-1);
> - ? ? ? return 0;
> -}
> -
> -static inline unsigned int ?__cq_get_elem_count(struct circular_queue *cq)
> -{
> - ? ? ? return (cq->rear - cq->front)&(MAX_CIRCULAR_QUE_SIZE-1);
> -}
> -
> -static inline void mark_lock_accessed(struct lock_list *lock,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct lock_list *parent)
> -{
> - ? ? ? unsigned long nr;
> - ? ? ? nr = lock - list_entries;
> - ? ? ? WARN_ON(nr >= nr_list_entries);
> - ? ? ? lock->parent = parent;
> - ? ? ? set_bit(nr, bfs_accessed);
> -}
> -
> -static inline unsigned long lock_accessed(struct lock_list *lock)
> -{
> - ? ? ? unsigned long nr;
> - ? ? ? nr = lock - list_entries;
> - ? ? ? WARN_ON(nr >= nr_list_entries);
> - ? ? ? return test_bit(nr, bfs_accessed);
> -}
> -
> -static inline struct lock_list *get_lock_parent(struct lock_list *child)
> -{
> - ? ? ? return child->parent;
> -}
> -
> -static inline int get_lock_depth(struct lock_list *child)
> -{
> - ? ? ? int depth = 0;
> - ? ? ? struct lock_list *parent;
> -
> - ? ? ? while ((parent = get_lock_parent(child))) {
> - ? ? ? ? ? ? ? child = parent;
> - ? ? ? ? ? ? ? depth++;
> - ? ? ? }
> - ? ? ? return depth;
> -}
>
>
>



--
Lei Ming

2009-06-08 14:04:37

by Ming Lei

[permalink] [raw]
Subject: Re: [PATCH 0/8] kernel:lockdep:replace DFS with BFS

2009/6/8 Peter Zijlstra <[email protected]>:

>
> Then I booted it and all hell broke loose, so either I wrecked something
> or you did :-), would you terribly mind poking at that a little?

I does not reproduce the break on 2.6.30-rc8 + 2009-06-04-next + BFS patches.

I guess you touch it on the latest tip + BFS patches, right? If so,
I'll try to reproduce it on the current tip tree. If not, would you
mind provide the git
version to me?

Thanks.

>
> Over all I like that patches, but they need a little more work. Could
> you send delta patches from now on?
>
> ---
>
> [ ? ?0.000999] =================================
> [ ? ?0.000999] [ BUG: bad contention detected! ]
> [ ? ?0.000999] ---------------------------------
> [ ? ?0.000999] swapper/0 is trying to contend lock (old_style_seqlock_init) at:
> [ ? ?0.000999] [<ffffffff8133a795>] _spin_lock+0x6d/0x75
> [ ? ?0.000999] but there are no locks held!
> [ ? ?0.000999]
> [ ? ?0.000999] other info that might help us debug this:
> [ ? ?0.000999] 1 lock held by swapper/0:
> [ ? ?0.000999] ?#0: ?(xtime_lock){-.....}, at: [<ffffffff8106a360>] tick_periodic+0x1d/0x74
> [ ? ?0.000999]
> [ ? ?0.000999] stack backtrace:
> [ ? ?0.000999] Pid: 0, comm: swapper Not tainted 2.6.30-rc8-tip #1049
> [ ? ?0.000999] Call Trace:
> [ ? ?0.000999] ?<IRQ> ?[<ffffffff81071bd8>] print_lock_contention_bug+0x100/0x110
> [ ? ?0.000999] ?[<ffffffff81071ce0>] lock_acquired+0xf8/0x2b4
> [ ? ?0.000999] ?[<ffffffff81010221>] ? update_vsyscall+0x2d/0xd0
> [ ? ?0.000999] ?[<ffffffff8133a795>] _spin_lock+0x6d/0x75
> [ ? ?0.000999] ?[<ffffffff81010221>] ? update_vsyscall+0x2d/0xd0
> [ ? ?0.000999] ?[<ffffffff81010221>] update_vsyscall+0x2d/0xd0
> [ ? ?0.000999] ?[<ffffffff81067469>] update_wall_time+0x4c1/0x4cc
> [ ? ?0.000999] ?[<ffffffff8105274b>] do_timer+0x15/0x1c
> [ ? ?0.000999] ?[<ffffffff8106a37e>] tick_periodic+0x3b/0x74
> [ ? ?0.000999] ?[<ffffffff8106a3db>] tick_handle_periodic+0x24/0x71
> [ ? ?0.000999] ?[<ffffffff8100ea23>] timer_interrupt+0x1f/0x26
> [ ? ?0.000999] ?[<ffffffff8109348b>] handle_IRQ_event+0x8e/0x19c
> [ ? ?0.000999] ?[<ffffffff8109501e>] handle_level_irq+0x9d/0xf3
> [ ? ?0.000999] ?[<ffffffff8100e24b>] handle_irq+0x24/0x2c
> [ ? ?0.000999] ?[<ffffffff8133f55b>] do_IRQ+0x63/0xc2
> [ ? ?0.000999] ?[<ffffffff8100c713>] ret_from_intr+0x0/0xf
> [ ? ?0.000999] ?<EOI> ?[<ffffffff8133a538>] ? _spin_unlock_irqrestore+0x47/0x6d
> [ ? ?0.000999] ?[<ffffffff81093eea>] ? __setup_irq+0x1ea/0x277
> [ ? ?0.000999] ?[<ffffffff81094120>] ? setup_irq+0x25/0x2a
> [ ? ?0.000999] ?[<ffffffff8158e63e>] ? hpet_time_init+0x20/0x22
> [ ? ?0.000999] ?[<ffffffff8158bbcc>] ? start_kernel+0x2ee/0x37a
> [ ? ?0.000999] ?[<ffffffff8158b29a>] ? x86_64_start_reservations+0xaa/0xae
> [ ? ?0.000999] ?[<ffffffff8158b37f>] ? x86_64_start_kernel+0xe1/0xe8
>
> And ended in a stuck boot at:
>
> [ ? 65.411804] rmmod ? ? ? ? R ?running task ? ? ? ?0 ? 616 ? ? ?1 0x00000008
> [ ? 65.411804] ?ffff8800023c41a0 ffffea0003336ba8 ffff88007e3a3c08 ffffffff8106f71a
> [ ? 65.411804] ?ffff88007e3a3c48 0000000000000202 ffff88007f821600 0000000000001823
> [ ? 65.411804] ?ffff88007e109d20 ffff88007f8b5c80 0000000000000000 ffff88007e3a3d18
> [ ? 65.411804] Call Trace:
> [ ? 65.411804] ?[<ffffffff8106f71a>] ? trace_hardirqs_on+0xd/0xf
> [ ? 65.411804] ?[<ffffffff8113f1b6>] ? release_sysfs_dirent+0x91/0xb1
> [ ? 65.411804] ?[<ffffffff81071af6>] ? print_lock_contention_bug+0x1e/0x110
> [ ? 65.411804] ?[<ffffffff81071af6>] ? print_lock_contention_bug+0x1e/0x110
> [ ? 65.411804] ?[<ffffffff8113eff3>] ? sysfs_addrm_start+0x7d/0xaa
> [ ? 65.411804] ?[<ffffffff81071af6>] ? print_lock_contention_bug+0x1e/0x110
> [ ? 65.411804] ?[<ffffffff810113ff>] ? alternatives_smp_module_del+0x37/0xd0
> [ ? 65.411804] ?[<ffffffff810e61ee>] ? free_percpu+0x38/0xf8
> [ ? 65.411804] ?[<ffffffff8106f71a>] ? trace_hardirqs_on+0xd/0xf
> [ ? 65.411804] ?[<ffffffff8133a542>] ? _spin_unlock_irqrestore+0x51/0x6d
> [ ? 65.411804] ?[<ffffffff810e62a5>] ? free_percpu+0xef/0xf8
> [ ? 65.411804] ?[<ffffffff8107ade5>] ? free_module+0x104/0x118
> [ ? 65.411804] ?[<ffffffff8107b0a8>] ? sys_delete_module+0x20c/0x22e
> [ ? 65.411804] ?[<ffffffff81339f88>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> [ ? 65.411804] ?[<ffffffff8100bcdb>] ? system_call_fastpath+0x16/0x1b
>
> ( I can send you my .config if you cannot reproduce, but I don't think
> its anything special )
>
> ---
>
> Subject: lockdep: clean up after BFS patches
> From: Peter Zijlstra <[email protected]>
> Date: Mon Jun 08 13:32:31 CEST 2009
>
>
> LKML-Reference: <new-submission>
> Signed-off-by: Peter Zijlstra <[email protected]>
> ---
> ?include/linux/lockdep.h ? ?| ? ?7 -
> ?kernel/lockdep.c ? ? ? ? ? | ?232 +++++++++++++++++++++++++++------------------
> ?kernel/lockdep_internals.h | ? 97 ------------------
> ?3 files changed, 147 insertions(+), 189 deletions(-)
> ===================================================================
> ===================================================================
> --- linux-2.6.orig/include/linux/lockdep.h
> +++ linux-2.6/include/linux/lockdep.h
> @@ -58,7 +58,6 @@ struct lock_class {
>
> ? ? ? ?struct lockdep_subclass_key ? ? *key;
> ? ? ? ?unsigned int ? ? ? ? ? ? ? ? ? ?subclass;
> - ? ? ? unsigned int ? ? ? ? ? ? ? ? ? ?dep_gen_id;
>
> ? ? ? ?/*
> ? ? ? ? * IRQ/softirq usage tracking bits:
> @@ -150,9 +149,9 @@ struct lock_list {
> ? ? ? ?struct stack_trace ? ? ? ? ? ? ?trace;
> ? ? ? ?int ? ? ? ? ? ? ? ? ? ? ? ? ? ? distance;
>
> - ? ? ? /*The parent field is used to implement breadth-first search,and
> - ? ? ? ?*the bit 0 is reused to indicate if the lock has been accessed
> - ? ? ? ?*in BFS.
> + ? ? ? /*
> + ? ? ? ?* The parent field is used to implement breadth-first search, and the
> + ? ? ? ?* bit 0 is reused to indicate if the lock has been accessed in BFS.
> ? ? ? ? */
> ? ? ? ?struct lock_list ? ? ? ? ? ? ? ?*parent;
> ?};
> ===================================================================
> --- linux-2.6.orig/kernel/lockdep.c
> +++ linux-2.6/kernel/lockdep.c
> @@ -43,6 +43,7 @@
> ?#include <linux/ftrace.h>
> ?#include <linux/stringify.h>
> ?#include <linux/bitops.h>
> +
> ?#include <asm/sections.h>
>
> ?#include "lockdep_internals.h"
> @@ -118,7 +119,7 @@ static inline int debug_locks_off_graph_
> ?static int lockdep_initialized;
>
> ?unsigned long nr_list_entries;
> -struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
> +static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
>
> ?/*
> ?* All data structures here are protected by the global debug_lock.
> @@ -390,19 +391,6 @@ unsigned int nr_process_chains;
> ?unsigned int max_lockdep_depth;
> ?unsigned int max_recursion_depth;
>
> -static unsigned int lockdep_dependency_gen_id;
> -
> -static bool lockdep_dependency_visit(struct lock_class *source,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?unsigned int depth)
> -{
> - ? ? ? if (!depth)
> - ? ? ? ? ? ? ? lockdep_dependency_gen_id++;
> - ? ? ? if (source->dep_gen_id == lockdep_dependency_gen_id)
> - ? ? ? ? ? ? ? return true;
> - ? ? ? source->dep_gen_id = lockdep_dependency_gen_id;
> - ? ? ? return false;
> -}
> -
> ?#ifdef CONFIG_DEBUG_LOCKDEP
> ?/*
> ?* We cannot printk in early bootup code. Not even early_printk()
> @@ -575,64 +563,6 @@ static void print_lock_class_header(stru
> ? ? ? ?print_ip_sym((unsigned long)class->key);
> ?}
>
> -/*
> - * printk the shortest lock dependencies from @start to @end in reverse order:
> - */
> -static void __used
> -print_shortest_lock_dependencies(struct lock_list *leaf,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct lock_list *root)
> -{
> - ? ? ? struct lock_list *entry = leaf;
> - ? ? ? int depth;
> -
> - ? ? ? /*compute depth from generated tree by BFS*/
> - ? ? ? depth = get_lock_depth(leaf);
> -
> - ? ? ? do {
> - ? ? ? ? ? ? ? print_lock_class_header(entry->class, depth);
> - ? ? ? ? ? ? ? printk("%*s ... acquired at:\n", depth, "");
> - ? ? ? ? ? ? ? print_stack_trace(&entry->trace, 2);
> - ? ? ? ? ? ? ? printk("\n");
> -
> - ? ? ? ? ? ? ? if (depth == 0 && (entry != root)) {
> - ? ? ? ? ? ? ? ? ? ? ? printk("lockdep:%s bad BFS generated tree\n", __func__);
> - ? ? ? ? ? ? ? ? ? ? ? break;
> - ? ? ? ? ? ? ? }
> -
> - ? ? ? ? ? ? ? entry = get_lock_parent(entry);
> - ? ? ? ? ? ? ? depth--;
> - ? ? ? } while (entry && (depth >= 0));
> -
> - ? ? ? return;
> -}
> -/*
> - * printk all lock dependencies starting at <entry>:
> - */
> -static void __used
> -print_lock_dependencies(struct lock_class *class, int depth)
> -{
> - ? ? ? struct lock_list *entry;
> -
> - ? ? ? if (lockdep_dependency_visit(class, depth))
> - ? ? ? ? ? ? ? return;
> -
> - ? ? ? if (DEBUG_LOCKS_WARN_ON(depth >= 20))
> - ? ? ? ? ? ? ? return;
> -
> - ? ? ? print_lock_class_header(class, depth);
> -
> - ? ? ? list_for_each_entry(entry, &class->locks_after, entry) {
> - ? ? ? ? ? ? ? if (DEBUG_LOCKS_WARN_ON(!entry->class))
> - ? ? ? ? ? ? ? ? ? ? ? return;
> -
> - ? ? ? ? ? ? ? print_lock_dependencies(entry->class, depth + 1);
> -
> - ? ? ? ? ? ? ? printk("%*s ... acquired at:\n",depth,"");
> - ? ? ? ? ? ? ? print_stack_trace(&entry->trace, 2);
> - ? ? ? ? ? ? ? printk("\n");
> - ? ? ? }
> -}
> -
> ?static void print_kernel_version(void)
> ?{
> ? ? ? ?printk("%s %.*s\n", init_utsname()->release,
> @@ -927,14 +857,106 @@ static int add_lock_to_list(struct lock_
> ? ? ? ?return 1;
> ?}
>
> -unsigned long bfs_accessed[BITS_TO_LONGS(MAX_LOCKDEP_ENTRIES)];
> -static struct circular_queue ?lock_cq;
> +/*For good efficiency of modular, we use power of 2*/
> +#define MAX_CIRCULAR_QUEUE_SIZE ? ? ? ? ? ? ? ?4096UL
> +#define CQ_MASK ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(MAX_CIRCULAR_QUEUE_SIZE-1)
> +
> +/* The circular_queue and helpers is used to implement the
> + * breadth-first search(BFS)algorithem, by which we can build
> + * the shortest path from the next lock to be acquired to the
> + * previous held lock if there is a circular between them.
> + * */
> +struct circular_queue {
> + ? ? ? unsigned long element[MAX_CIRCULAR_QUEUE_SIZE];
> + ? ? ? unsigned int ?front, rear;
> +};
> +
> +static struct circular_queue lock_cq;
> +static unsigned long bfs_accessed[BITS_TO_LONGS(MAX_LOCKDEP_ENTRIES)];
> +
> ?unsigned int max_bfs_queue_depth;
> +
> +static inline void __cq_init(struct circular_queue *cq)
> +{
> + ? ? ? cq->front = cq->rear = 0;
> + ? ? ? bitmap_zero(bfs_accessed, MAX_LOCKDEP_ENTRIES);
> +}
> +
> +static inline int __cq_empty(struct circular_queue *cq)
> +{
> + ? ? ? return (cq->front == cq->rear);
> +}
> +
> +static inline int __cq_full(struct circular_queue *cq)
> +{
> + ? ? ? return ((cq->rear + 1) & CQ_MASK) == cq->front;
> +}
> +
> +static inline int __cq_enqueue(struct circular_queue *cq, unsigned long elem)
> +{
> + ? ? ? if (__cq_full(cq))
> + ? ? ? ? ? ? ? return -1;
> +
> + ? ? ? cq->element[cq->rear] = elem;
> + ? ? ? cq->rear = (cq->rear + 1) & CQ_MASK;
> + ? ? ? return 0;
> +}
> +
> +static inline int __cq_dequeue(struct circular_queue *cq, unsigned long *elem)
> +{
> + ? ? ? if (__cq_empty(cq))
> + ? ? ? ? ? ? ? return -1;
> +
> + ? ? ? *elem = cq->element[cq->front];
> + ? ? ? cq->front = (cq->front + 1) & CQ_MASK;
> + ? ? ? return 0;
> +}
> +
> +static inline unsigned int ?__cq_get_elem_count(struct circular_queue *cq)
> +{
> + ? ? ? return (cq->rear - cq->front) & CQ_MASK;
> +}
> +
> +static inline void mark_lock_accessed(struct lock_list *lock,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct lock_list *parent)
> +{
> + ? ? ? unsigned long nr;
> + ? ? ? nr = lock - list_entries;
> + ? ? ? WARN_ON(nr >= nr_list_entries);
> + ? ? ? lock->parent = parent;
> + ? ? ? set_bit(nr, bfs_accessed);
> +}
> +
> +static inline unsigned long lock_accessed(struct lock_list *lock)
> +{
> + ? ? ? unsigned long nr;
> + ? ? ? nr = lock - list_entries;
> + ? ? ? WARN_ON(nr >= nr_list_entries);
> + ? ? ? return test_bit(nr, bfs_accessed);
> +}
> +
> +static inline struct lock_list *get_lock_parent(struct lock_list *child)
> +{
> + ? ? ? return child->parent;
> +}
> +
> +static inline int get_lock_depth(struct lock_list *child)
> +{
> + ? ? ? int depth = 0;
> + ? ? ? struct lock_list *parent;
> +
> + ? ? ? while ((parent = get_lock_parent(child))) {
> + ? ? ? ? ? ? ? child = parent;
> + ? ? ? ? ? ? ? depth++;
> + ? ? ? }
> + ? ? ? return depth;
> +}
> +
> ?static int __bfs(struct lock_list *source_entry,
> - ? ? ? ? ? ? ? ? ? ? ? void *data,
> - ? ? ? ? ? ? ? ? ? ? ? int (*match)(struct lock_list *entry, void *data),
> - ? ? ? ? ? ? ? ? ? ? ? struct lock_list **target_entry,
> - ? ? ? ? ? ? ? ? ? ? ? int forward)
> + ? ? ? ? ? ? ? ?void *data,
> + ? ? ? ? ? ? ? ?int (*match)(struct lock_list *entry, void *data),
> + ? ? ? ? ? ? ? ?struct lock_list **target_entry,
> + ? ? ? ? ? ? ? ?int forward)
> ?{
> ? ? ? ?struct lock_list *entry;
> ? ? ? ?struct list_head *head;
> @@ -1202,14 +1224,6 @@ check_noncircular(struct lock_list *root
> ?* without creating any illegal irq-safe -> irq-unsafe lock dependency.
> ?*/
>
> -
> -#define ? BFS_PROCESS_RET(ret) do { \
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ret < 0) \
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return print_bfs_bug(ret); \
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ret == 1) \
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return 1; \
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? } while (0)
> -
> ?static inline int usage_match(struct lock_list *entry, void *bit)
> ?{
> ? ? ? ?return entry->class->usage_mask & (1 << (enum lock_usage_bit)bit);
> @@ -1236,6 +1250,8 @@ find_usage_forwards(struct lock_list *ro
> ? ? ? ?debug_atomic_inc(&nr_find_usage_forwards_checks);
>
> ? ? ? ?result = __bfs_forwards(root, (void *)bit, usage_match, target_entry);
> + ? ? ? if (result < 0)
> + ? ? ? ? ? ? ? return print_bfs_bug(result);
>
> ? ? ? ?return result;
> ?}
> @@ -1259,10 +1275,42 @@ find_usage_backwards(struct lock_list *r
> ? ? ? ?debug_atomic_inc(&nr_find_usage_backwards_checks);
>
> ? ? ? ?result = __bfs_backwards(root, (void *)bit, usage_match, target_entry);
> + ? ? ? if (result < 0)
> + ? ? ? ? ? ? ? return print_bfs_bug(result);
>
> ? ? ? ?return result;
> ?}
>
> +/*
> + * printk the shortest lock dependencies from @start to @end in reverse order:
> + */
> +static void __used
> +print_shortest_lock_dependencies(struct lock_list *leaf,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct lock_list *root)
> +{
> + ? ? ? struct lock_list *entry = leaf;
> + ? ? ? int depth;
> +
> + ? ? ? /*compute depth from generated tree by BFS*/
> + ? ? ? depth = get_lock_depth(leaf);
> +
> + ? ? ? do {
> + ? ? ? ? ? ? ? print_lock_class_header(entry->class, depth);
> + ? ? ? ? ? ? ? printk("%*s ... acquired at:\n", depth, "");
> + ? ? ? ? ? ? ? print_stack_trace(&entry->trace, 2);
> + ? ? ? ? ? ? ? printk("\n");
> +
> + ? ? ? ? ? ? ? if (depth == 0 && (entry != root)) {
> + ? ? ? ? ? ? ? ? ? ? ? printk("lockdep:%s bad BFS generated tree\n", __func__);
> + ? ? ? ? ? ? ? ? ? ? ? break;
> + ? ? ? ? ? ? ? }
> +
> + ? ? ? ? ? ? ? entry = get_lock_parent(entry);
> + ? ? ? ? ? ? ? depth--;
> + ? ? ? } while (entry && (depth >= 0));
> +
> + ? ? ? return;
> +}
>
> ?static int
> ?print_bad_irq_dependency(struct task_struct *curr,
> @@ -1349,12 +1397,14 @@ check_usage(struct task_struct *curr, st
>
> ? ? ? ?this.class = hlock_class(prev);
> ? ? ? ?ret = find_usage_backwards(&this, bit_backwards, &target_entry);
> - ? ? ? BFS_PROCESS_RET(ret);
> + ? ? ? if (!ret || ret == 1)
> + ? ? ? ? ? ? ? return ret;
>
> ? ? ? ?that.parent = NULL;
> ? ? ? ?that.class = hlock_class(next);
> ? ? ? ?ret = find_usage_forwards(&that, bit_forwards, &target_entry1);
> - ? ? ? BFS_PROCESS_RET(ret);
> + ? ? ? if (!ret || ret == 1)
> + ? ? ? ? ? ? ? return ret;
>
> ? ? ? ?return print_bad_irq_dependency(curr, &this, &that,
> ? ? ? ? ? ? ? ? ? ? ? ?target_entry, target_entry1,
> @@ -2038,7 +2088,8 @@ check_usage_forwards(struct task_struct
> ? ? ? ?root.parent = NULL;
> ? ? ? ?root.class = hlock_class(this);
> ? ? ? ?ret = find_usage_forwards(&root, bit, &target_entry);
> - ? ? ? BFS_PROCESS_RET(ret);
> + ? ? ? if (!ret || ret == 1)
> + ? ? ? ? ? ? ? return ret;
>
> ? ? ? ?return print_irq_inversion_bug(curr, &root, target_entry,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?this, 1, irqclass);
> @@ -2059,7 +2110,8 @@ check_usage_backwards(struct task_struct
> ? ? ? ?root.parent = NULL;
> ? ? ? ?root.class = hlock_class(this);
> ? ? ? ?ret = find_usage_backwards(&root, bit, &target_entry);
> - ? ? ? BFS_PROCESS_RET(ret);
> + ? ? ? if (!ret || ret == 1)
> + ? ? ? ? ? ? ? return ret;
>
> ? ? ? ?return print_irq_inversion_bug(curr, &root, target_entry,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?this, 1, irqclass);
> ===================================================================
> --- linux-2.6.orig/kernel/lockdep_internals.h
> +++ linux-2.6/kernel/lockdep_internals.h
> @@ -91,6 +91,8 @@ extern unsigned int nr_process_chains;
> ?extern unsigned int max_lockdep_depth;
> ?extern unsigned int max_recursion_depth;
>
> +extern unsigned int max_bfs_queue_depth;
> +
> ?#ifdef CONFIG_PROVE_LOCKING
> ?extern unsigned long lockdep_count_forward_deps(struct lock_class *);
> ?extern unsigned long lockdep_count_backward_deps(struct lock_class *);
> @@ -136,98 +138,3 @@ extern atomic_t nr_find_usage_backwards_
> ?# define debug_atomic_dec(ptr) ? ? ? ? do { } while (0)
> ?# define debug_atomic_read(ptr) ? ? ? ? ? ? ? ?0
> ?#endif
> -
> -
> -extern unsigned int max_bfs_queue_depth;
> -extern unsigned long nr_list_entries;
> -extern struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
> -extern unsigned long bfs_accessed[];
> -
> -/*For good efficiency of modular, we use power of 2*/
> -#define ?MAX_CIRCULAR_QUE_SIZE ? ? 4096UL
> -
> -/* The circular_queue and helpers is used to implement the
> - * breadth-first search(BFS)algorithem, by which we can build
> - * the shortest path from the next lock to be acquired to the
> - * previous held lock if there is a circular between them.
> - * */
> -struct circular_queue{
> - ? ? ? unsigned long element[MAX_CIRCULAR_QUE_SIZE];
> - ? ? ? unsigned int ?front, rear;
> -};
> -
> -static inline void __cq_init(struct circular_queue *cq)
> -{
> - ? ? ? cq->front = cq->rear = 0;
> - ? ? ? bitmap_zero(bfs_accessed, MAX_LOCKDEP_ENTRIES);
> -}
> -
> -static inline int __cq_empty(struct circular_queue *cq)
> -{
> - ? ? ? return (cq->front == cq->rear);
> -}
> -
> -static inline int __cq_full(struct circular_queue *cq)
> -{
> - ? ? ? return ((cq->rear + 1)&(MAX_CIRCULAR_QUE_SIZE-1)) ?== cq->front;
> -}
> -
> -static inline int __cq_enqueue(struct circular_queue *cq, unsigned long elem)
> -{
> - ? ? ? if (__cq_full(cq))
> - ? ? ? ? ? ? ? return -1;
> -
> - ? ? ? cq->element[cq->rear] = elem;
> - ? ? ? cq->rear = (cq->rear + 1)&(MAX_CIRCULAR_QUE_SIZE-1);
> - ? ? ? return 0;
> -}
> -
> -static inline int __cq_dequeue(struct circular_queue *cq, unsigned long *elem)
> -{
> - ? ? ? if (__cq_empty(cq))
> - ? ? ? ? ? ? ? return -1;
> -
> - ? ? ? *elem = cq->element[cq->front];
> - ? ? ? cq->front = (cq->front + 1)&(MAX_CIRCULAR_QUE_SIZE-1);
> - ? ? ? return 0;
> -}
> -
> -static inline unsigned int ?__cq_get_elem_count(struct circular_queue *cq)
> -{
> - ? ? ? return (cq->rear - cq->front)&(MAX_CIRCULAR_QUE_SIZE-1);
> -}
> -
> -static inline void mark_lock_accessed(struct lock_list *lock,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct lock_list *parent)
> -{
> - ? ? ? unsigned long nr;
> - ? ? ? nr = lock - list_entries;
> - ? ? ? WARN_ON(nr >= nr_list_entries);
> - ? ? ? lock->parent = parent;
> - ? ? ? set_bit(nr, bfs_accessed);
> -}
> -
> -static inline unsigned long lock_accessed(struct lock_list *lock)
> -{
> - ? ? ? unsigned long nr;
> - ? ? ? nr = lock - list_entries;
> - ? ? ? WARN_ON(nr >= nr_list_entries);
> - ? ? ? return test_bit(nr, bfs_accessed);
> -}
> -
> -static inline struct lock_list *get_lock_parent(struct lock_list *child)
> -{
> - ? ? ? return child->parent;
> -}
> -
> -static inline int get_lock_depth(struct lock_list *child)
> -{
> - ? ? ? int depth = 0;
> - ? ? ? struct lock_list *parent;
> -
> - ? ? ? while ((parent = get_lock_parent(child))) {
> - ? ? ? ? ? ? ? child = parent;
> - ? ? ? ? ? ? ? depth++;
> - ? ? ? }
> - ? ? ? return depth;
> -}
>
>
>



--
Lei Ming

2009-06-08 14:05:45

by Peter Zijlstra

[permalink] [raw]
Subject: Re: [PATCH 0/8] kernel:lockdep:replace DFS with BFS

On Mon, 2009-06-08 at 21:58 +0800, Ming Lei wrote:
> >
> > Then I booted it and all hell broke loose, so either I wrecked something
> > or you did :-), would you terribly mind poking at that a little?
>
> I does not reproduce the break on 2.6.30-rc8 + 2009-06-04-next + BFS patches.
>
> I guess you touch it on the latest tip + BFS patches, right? If so,
> I'll try to reproduce it on the current tip tree. If not, would you
> mind provide the git
> version to me?

v2.6.30-rc8-2058-g1615bb0

---
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.30-rc8
# Mon Jun 8 13:40:26 2009
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_FAST_CMPXCHG_LOCAL=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y
CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ZONE_DMA32=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_X86_64_SMP=y
CONFIG_X86_HT=y
CONFIG_X86_TRAMPOLINE=y
# CONFIG_KTIME_SCALAR is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
# CONFIG_TASK_XACCT is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_TREE=y

#
# RCU Subsystem
#
CONFIG_CLASSIC_RCU=y
# CONFIG_TREE_RCU is not set
# CONFIG_PREEMPT_RCU is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_PREEMPT_RCU_TRACE is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=20
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
# CONFIG_GROUP_SCHED is not set
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
# CONFIG_CGROUP_NS is not set
# CONFIG_CGROUP_FREEZER is not set
# CONFIG_CGROUP_DEVICE is not set
# CONFIG_CPUSETS is not set
# CONFIG_CGROUP_CPUACCT is not set
# CONFIG_RESOURCE_COUNTERS is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_RELAY=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_EXTRA_PASS=y
# CONFIG_STRIP_ASM_SYMS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_HAVE_PERF_COUNTERS=y

#
# Performance Counters
#
CONFIG_PERF_COUNTERS=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_COMPAT_BRK is not set
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_PROFILING=y
CONFIG_TRACEPOINTS=y
CONFIG_MARKERS=y
CONFIG_OPROFILE=m
# CONFIG_OPROFILE_IBS is not set
CONFIG_HAVE_OPROFILE=y
CONFIG_KPROBES=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_KRETPROBES=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_HW_BREAKPOINT=y
# CONFIG_SLOW_WORK is not set
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_BLK_DEV_INTEGRITY is not set
CONFIG_BLOCK_COMPAT=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_FREEZER=y

#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_SMP=y
# CONFIG_SPARSE_IRQ is not set
CONFIG_X86_MPPARSE=y
CONFIG_X86_EXTENDED_PLATFORM=y
# CONFIG_X86_VSMP is not set
CONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_PARAVIRT_GUEST is not set
CONFIG_MEMTEST=y
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
CONFIG_GENERIC_CPU=y
CONFIG_X86_CPU=y
CONFIG_X86_L1_CACHE_BYTES=64
CONFIG_X86_INTERNODE_CACHE_BYTES=64
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_TSC=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=64
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_X86_DS=y
CONFIG_X86_PTRACE_BTS=y
CONFIG_HPET_TIMER=y
CONFIG_DMI=y
CONFIG_GART_IOMMU=y
CONFIG_CALGARY_IOMMU=y
CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
CONFIG_AMD_IOMMU=y
# CONFIG_AMD_IOMMU_STATS is not set
CONFIG_SWIOTLB=y
CONFIG_IOMMU_HELPER=y
CONFIG_IOMMU_API=y
# CONFIG_MAXSMP is not set
CONFIG_NR_CPUS=8
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set
CONFIG_X86_MCE=y
CONFIG_X86_NEW_MCE=y
CONFIG_X86_MCE_INTEL=y
CONFIG_X86_MCE_AMD=y
CONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
CONFIG_X86_THERMAL_VECTOR=y
# CONFIG_I8K is not set
CONFIG_MICROCODE=m
CONFIG_MICROCODE_INTEL=y
# CONFIG_MICROCODE_AMD is not set
CONFIG_MICROCODE_OLD_INTERFACE=y
CONFIG_X86_MSR=y
CONFIG_X86_CPUID=y
# CONFIG_X86_CPU_DEBUG is not set
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_DIRECT_GBPAGES=y
# CONFIG_NUMA is not set
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLATMEM_MANUAL is not set
# CONFIG_DISCONTIGMEM_MANUAL is not set
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_SPARSEMEM=y
CONFIG_HAVE_MEMORY_PRESENT=y
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSEMEM_VMEMMAP=y
# CONFIG_MEMORY_HOTPLUG is not set
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_UNEVICTABLE_LRU=y
CONFIG_HAVE_MLOCK=y
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
CONFIG_MMU_NOTIFIER=y
# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
CONFIG_X86_RESERVE_LOW_64K=y
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
# CONFIG_X86_PAT is not set
# CONFIG_EFI is not set
# CONFIG_SECCOMP is not set
# CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_SCHED_HRTICK=y
CONFIG_KEXEC=y
# CONFIG_CRASH_DUMP is not set
CONFIG_PHYSICAL_START=0x1000000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x1000000
CONFIG_HOTPLUG_CPU=y
CONFIG_COMPAT_VDSO=y
# CONFIG_CMDLINE_BOOL is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y

#
# Power management and ACPI options
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_HIBERNATION is not set
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_SYSFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=y
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y
CONFIG_ACPI_SBS=m

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

#
# CPUFreq processor drivers
#
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_X86_POWERNOW_K8=y
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_P4_CLOCKMOD is not set

#
# shared options
#
# CONFIG_X86_SPEEDSTEP_LIB is not set
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y

#
# Memory power savings
#
# CONFIG_I7300_IDLE is not set

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_DOMAINS=y
# CONFIG_DMAR is not set
# CONFIG_INTR_REMAP is not set
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI_PCIE=m
CONFIG_PCIEAER=y
# CONFIG_PCIEASPM is not set
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_PCI_STUB is not set
CONFIG_HT_IRQ=y
# CONFIG_PCI_IOV is not set
CONFIG_ISA_DMA_API=y
CONFIG_K8_NB=y
# CONFIG_PCCARD is not set
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_FAKE=m
CONFIG_HOTPLUG_PCI_ACPI=m
CONFIG_HOTPLUG_PCI_ACPI_IBM=m
# CONFIG_HOTPLUG_PCI_CPCI is not set
CONFIG_HOTPLUG_PCI_SHPC=m

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
# CONFIG_HAVE_AOUT is not set
CONFIG_BINFMT_MISC=y
CONFIG_IA32_EMULATION=y
# CONFIG_IA32_AOUT is not set
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=m
CONFIG_INET_TCP_DIAG=m
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BIC=y
CONFIG_TCP_CONG_CUBIC=m
CONFIG_TCP_CONG_WESTWOOD=m
CONFIG_TCP_CONG_HTCP=m
CONFIG_TCP_CONG_HSTCP=m
CONFIG_TCP_CONG_HYBLA=m
CONFIG_TCP_CONG_VEGAS=m
CONFIG_TCP_CONG_SCALABLE=m
CONFIG_TCP_CONG_LP=m
CONFIG_TCP_CONG_VENO=m
# CONFIG_TCP_CONG_YEAH is not set
# CONFIG_TCP_CONG_ILLINOIS is not set
CONFIG_DEFAULT_BIC=y
# CONFIG_DEFAULT_CUBIC is not set
# CONFIG_DEFAULT_HTCP is not set
# CONFIG_DEFAULT_VEGAS is not set
# CONFIG_DEFAULT_WESTWOOD is not set
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="bic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_NETLABEL is not set
CONFIG_NETWORK_SECMARK=y
# CONFIG_NETFILTER is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_PHONET is not set
# CONFIG_NET_SCHED is not set
# CONFIG_DCB is not set

#
# Network testing
#
CONFIG_NET_PKTGEN=m
# CONFIG_NET_TCPPROBE is not set
# CONFIG_NET_DROP_MONITOR is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_WIRELESS is not set
# CONFIG_WIMAX is not set
CONFIG_RFKILL=m
# CONFIG_RFKILL_INPUT is not set
CONFIG_RFKILL_LEDS=y

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
# CONFIG_MTD is not set
# CONFIG_PARPORT is not set
CONFIG_PNP=y
CONFIG_PNP_DEBUG_MESSAGES=y

#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_FD=m
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
# CONFIG_BLK_DEV_XIP is not set
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_MISC_DEVICES=y
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set
# CONFIG_DELL_LAPTOP is not set
# CONFIG_ISL29003 is not set
# CONFIG_C2PORT is not set

#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_LEGACY is not set
# CONFIG_EEPROM_93CX6 is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set

#
# SCSI device support
#
CONFIG_RAID_ATTRS=m
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_TGT=m
CONFIG_SCSI_NETLINK=y
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=m
CONFIG_CHR_DEV_OSST=m
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m
CONFIG_CHR_DEV_SCH=m

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=y
CONFIG_SCSI_FC_ATTRS=m
# CONFIG_SCSI_FC_TGT_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
CONFIG_SCSI_SAS_ATTRS=m
CONFIG_SCSI_SAS_LIBSAS=m
# CONFIG_SCSI_SAS_ATA is not set
CONFIG_SCSI_SAS_HOST_SMP=y
# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
CONFIG_SCSI_SRP_ATTRS=m
# CONFIG_SCSI_SRP_TGT_ATTRS is not set
# CONFIG_SCSI_LOWLEVEL is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not set
CONFIG_ATA=y
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_ACPI=y
CONFIG_SATA_PMP=y
CONFIG_SATA_AHCI=y
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y
CONFIG_SATA_SVW=y
CONFIG_ATA_PIIX=y
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SX4 is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_PATA_ACPI is not set
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
CONFIG_ATA_GENERIC=y
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_MARVELL is not set
CONFIG_PATA_MPIIX=y
CONFIG_PATA_OLDPIIX=y
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RZ1000 is not set
# CONFIG_PATA_SC1200 is not set
CONFIG_PATA_SERVERWORKS=y
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
# CONFIG_PATA_SCH is not set
# CONFIG_MD is not set
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#

#
# Enable only one of the two stacks, unless you know what you are doing
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
CONFIG_I2O=m
# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
CONFIG_I2O_EXT_ADAPTEC=y
CONFIG_I2O_EXT_ADAPTEC_DMA64=y
CONFIG_I2O_BUS=m
CONFIG_I2O_BLOCK=m
CONFIG_I2O_SCSI=m
CONFIG_I2O_PROC=m
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
CONFIG_COMPAT_NET_DEV_OPS=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=m
# CONFIG_VETH is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_ARCNET is not set
# CONFIG_NET_ETHERNET is not set
CONFIG_MII=m
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
CONFIG_E1000=y
CONFIG_E1000E=y
# CONFIG_IP1000 is not set
# CONFIG_IGB is not set
# CONFIG_IGBVF is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2 is not set
# CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set
# CONFIG_ATL1C is not set
# CONFIG_JME is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set

#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
CONFIG_WLAN_80211=y
# CONFIG_LIBERTAS is not set
# CONFIG_AIRO is not set
# CONFIG_ATMEL is not set
# CONFIG_PRISM54 is not set
# CONFIG_USB_ZD1201 is not set
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_IPW2100 is not set
# CONFIG_IPW2200 is not set
# CONFIG_HOSTAP is not set
# CONFIG_HERMES is not set

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#

#
# USB Network Adapters
#
CONFIG_USB_CATC=m
CONFIG_USB_KAWETH=m
CONFIG_USB_PEGASUS=m
CONFIG_USB_RTL8150=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_CDCETHER=m
# CONFIG_USB_NET_CDC_EEM is not set
CONFIG_USB_NET_DM9601=m
# CONFIG_USB_NET_SMSC95XX is not set
CONFIG_USB_NET_GL620A=m
CONFIG_USB_NET_NET1080=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_MCS7830=m
CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CDC_SUBSET=m
CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y
CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
CONFIG_USB_EPSON2888=y
CONFIG_USB_KC2190=y
CONFIG_USB_NET_ZAURUS=m
# CONFIG_USB_HSO is not set
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
CONFIG_NETCONSOLE=y
# CONFIG_NETCONSOLE_DYNAMIC is not set
CONFIG_NETPOLL=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=y
CONFIG_INPUT_POLLDEV=y

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_KEYBOARD_STOWAWAY=m
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_ELANTECH is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
CONFIG_MOUSE_SERIAL=m
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_BCM5974 is not set
CONFIG_MOUSE_VSXXXAA=m
CONFIG_INPUT_JOYSTICK=y
CONFIG_JOYSTICK_ANALOG=m
CONFIG_JOYSTICK_A3D=m
CONFIG_JOYSTICK_ADI=m
CONFIG_JOYSTICK_COBRA=m
CONFIG_JOYSTICK_GF2K=m
CONFIG_JOYSTICK_GRIP=m
CONFIG_JOYSTICK_GRIP_MP=m
CONFIG_JOYSTICK_GUILLEMOT=m
CONFIG_JOYSTICK_INTERACT=m
CONFIG_JOYSTICK_SIDEWINDER=m
CONFIG_JOYSTICK_TMDC=m
CONFIG_JOYSTICK_IFORCE=m
CONFIG_JOYSTICK_IFORCE_USB=y
CONFIG_JOYSTICK_IFORCE_232=y
CONFIG_JOYSTICK_WARRIOR=m
CONFIG_JOYSTICK_MAGELLAN=m
CONFIG_JOYSTICK_SPACEORB=m
CONFIG_JOYSTICK_SPACEBALL=m
CONFIG_JOYSTICK_STINGER=m
CONFIG_JOYSTICK_TWIDJOY=m
# CONFIG_JOYSTICK_ZHENHUA is not set
CONFIG_JOYSTICK_JOYDUMP=m
# CONFIG_JOYSTICK_XPAD is not set
# CONFIG_INPUT_TABLET is not set
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
# CONFIG_TOUCHSCREEN_AD7879 is not set
# CONFIG_TOUCHSCREEN_FUJITSU is not set
CONFIG_TOUCHSCREEN_GUNZE=m
CONFIG_TOUCHSCREEN_ELO=m
# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
CONFIG_TOUCHSCREEN_MTOUCH=m
# CONFIG_TOUCHSCREEN_INEXIO is not set
CONFIG_TOUCHSCREEN_MK712=m
CONFIG_TOUCHSCREEN_PENMOUNT=m
CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
CONFIG_TOUCHSCREEN_TOUCHWIN=m
# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
# CONFIG_TOUCHSCREEN_TSC2007 is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=m
# CONFIG_INPUT_APANEL is not set
CONFIG_INPUT_ATLAS_BTNS=m
# CONFIG_INPUT_ATI_REMOTE is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_CM109 is not set
CONFIG_INPUT_UINPUT=m

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=m
CONFIG_GAMEPORT=m
CONFIG_GAMEPORT_NS558=m
CONFIG_GAMEPORT_L4=m
CONFIG_GAMEPORT_EMU10K1=m
CONFIG_GAMEPORT_FM801=m

#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_DEVKMEM=y
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_COMPUTONE is not set
# CONFIG_ROCKETPORT is not set
CONFIG_CYCLADES=m
# CONFIG_CYZ_INTR is not set
# CONFIG_DIGIEPCA is not set
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
# CONFIG_ISI is not set
CONFIG_SYNCLINK=m
CONFIG_SYNCLINKMP=m
CONFIG_SYNCLINK_GT=m
CONFIG_N_HDLC=m
# CONFIG_RISCOM8 is not set
# CONFIG_SPECIALIX is not set
# CONFIG_SX is not set
# CONFIG_RIO is not set
# CONFIG_STALDRV is not set
# CONFIG_NOZOMI is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_CONSOLE_POLL=y
CONFIG_SERIAL_JSM=m
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
# CONFIG_LEGACY_PTYS is not set
CONFIG_IPMI_HANDLER=m
# CONFIG_IPMI_PANIC_EVENT is not set
CONFIG_IPMI_DEVICE_INTERFACE=m
CONFIG_IPMI_SI=m
CONFIG_IPMI_WATCHDOG=m
CONFIG_IPMI_POWEROFF=m
CONFIG_HW_RANDOM=y
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
CONFIG_HW_RANDOM_INTEL=m
CONFIG_HW_RANDOM_AMD=m
CONFIG_NVRAM=y
CONFIG_R3964=m
# CONFIG_APPLICOM is not set
CONFIG_MWAVE=m
CONFIG_PC8736x_GPIO=m
CONFIG_NSC_GPIO=m
# CONFIG_RAW_DRIVER is not set
# CONFIG_HPET is not set
CONFIG_HANGCHECK_TIMER=m
CONFIG_TCG_TPM=m
CONFIG_TCG_TIS=m
CONFIG_TCG_NSC=m
CONFIG_TCG_ATMEL=m
CONFIG_TCG_INFINEON=m
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=m
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
CONFIG_I2C_AMD756=m
CONFIG_I2C_AMD8111=m
CONFIG_I2C_I801=m
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_PIIX4 is not set
CONFIG_I2C_NFORCE2=m
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
CONFIG_I2C_SIS96X=m
CONFIG_I2C_VIA=m
CONFIG_I2C_VIAPRO=m

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_SIMTEC is not set

#
# External I2C/SMBus adapter drivers
#
CONFIG_I2C_PARPORT_LIGHT=m
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set

#
# Graphics adapter I2C/DDC channel drivers
#
CONFIG_I2C_VOODOO3=m

#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_PCA_PLATFORM is not set
CONFIG_I2C_STUB=m

#
# Miscellaneous I2C Chip support
#
# CONFIG_DS1682 is not set
CONFIG_SENSORS_PCF8574=m
# CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCA9539 is not set
CONFIG_SENSORS_MAX6875=m
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
# CONFIG_SPI is not set
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
# CONFIG_GPIOLIB is not set
# CONFIG_W1 is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_BATTERY_DS2760 is not set
# CONFIG_BATTERY_BQ27x00 is not set
# CONFIG_HWMON is not set
CONFIG_THERMAL=y
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set

#
# Watchdog Device Drivers
#
CONFIG_SOFT_WATCHDOG=m
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_ALIM1535_WDT is not set
# CONFIG_ALIM7101_WDT is not set
# CONFIG_SC520_WDT is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_IBMASR is not set
# CONFIG_WAFER_WDT is not set
# CONFIG_I6300ESB_WDT is not set
# CONFIG_ITCO_WDT is not set
# CONFIG_IT8712F_WDT is not set
CONFIG_IT87_WDT=m
# CONFIG_HP_WATCHDOG is not set
# CONFIG_SC1200_WDT is not set
# CONFIG_PC87413_WDT is not set
# CONFIG_60XX_WDT is not set
# CONFIG_SBC8360_WDT is not set
# CONFIG_CPU5_WDT is not set
# CONFIG_SMSC_SCH311X_WDT is not set
# CONFIG_SMSC37B787_WDT is not set
# CONFIG_W83627HF_WDT is not set
# CONFIG_W83697HF_WDT is not set
# CONFIG_W83697UG_WDT is not set
# CONFIG_W83877F_WDT is not set
# CONFIG_W83977F_WDT is not set
# CONFIG_MACHZ_WDT is not set
# CONFIG_SBC_EPX_C3_WATCHDOG is not set

#
# PCI-based Watchdog Cards
#
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_WDTPCI is not set

#
# USB-based Watchdog Cards
#
# CONFIG_USBPCWATCHDOG is not set
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
CONFIG_SSB=m
CONFIG_SSB_SPROM=y
CONFIG_SSB_PCIHOST_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
# CONFIG_SSB_B43_PCI_BRIDGE is not set
# CONFIG_SSB_DEBUG is not set
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_DRIVER_PCICORE=y

#
# Multifunction device drivers
#
# CONFIG_MFD_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_REGULATOR is not set

#
# Multimedia devices
#

#
# Multimedia core support
#
# CONFIG_VIDEO_DEV is not set
# CONFIG_DVB_CORE is not set
# CONFIG_VIDEO_MEDIA is not set

#
# Multimedia drivers
#
# CONFIG_DAB is not set

#
# Graphics support
#
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y
CONFIG_AGP_SIS=y
CONFIG_AGP_VIA=y
# CONFIG_DRM is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=m
# CONFIG_LCD_ILI9320 is not set
# CONFIG_LCD_PLATFORM is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_GENERIC=y
CONFIG_BACKLIGHT_PROGEAR=m
# CONFIG_BACKLIGHT_MBP_NVIDIA is not set
# CONFIG_BACKLIGHT_SAHARA is not set

#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_VGACON_SOFT_SCROLLBACK=y
CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
CONFIG_DUMMY_CONSOLE=y
# CONFIG_SOUND is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HID_DEBUG is not set
# CONFIG_HIDRAW is not set

#
# USB Input Devices
#
CONFIG_USB_HID=y
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y

#
# Special HID drivers
#
CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
CONFIG_HID_CHERRY=y
CONFIG_HID_CHICONY=y
CONFIG_HID_CYPRESS=y
# CONFIG_DRAGONRISE_FF is not set
CONFIG_HID_EZKEY=y
CONFIG_HID_KYE=y
CONFIG_HID_GYRATION=y
CONFIG_HID_KENSINGTON=y
CONFIG_HID_LOGITECH=y
CONFIG_LOGITECH_FF=y
# CONFIG_LOGIRUMBLEPAD2_FF is not set
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MONTEREY=y
CONFIG_HID_NTRIG=y
CONFIG_HID_PANTHERLORD=y
CONFIG_PANTHERLORD_FF=y
CONFIG_HID_PETALYNX=y
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SONY=y
CONFIG_HID_SUNPLUS=y
# CONFIG_GREENASIA_FF is not set
CONFIG_HID_TOPSEED=y
CONFIG_THRUSTMASTER_FF=y
CONFIG_ZEROPLUS_FF=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set
CONFIG_USB_SUSPEND=y
# CONFIG_USB_OTG is not set
CONFIG_USB_MON=y
# CONFIG_USB_WUSB is not set
# CONFIG_USB_WUSB_CBAF is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
# CONFIG_USB_OXU210HP_HCD is not set
CONFIG_USB_ISP116X_HCD=m
# CONFIG_USB_ISP1760_HCD is not set
CONFIG_USB_OHCI_HCD=y
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=y
CONFIG_USB_SL811_HCD=m
# CONFIG_USB_R8A66597_HCD is not set
# CONFIG_USB_HWA_HCD is not set

#
# USB Device Class drivers
#
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
# CONFIG_USB_WDM is not set
# CONFIG_USB_TMC is not set

#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#

#
# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
CONFIG_USB_LIBUSUAL=y

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set

#
# USB port drivers
#
CONFIG_USB_SERIAL=m
CONFIG_USB_EZUSB=y
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_AIRCABLE=m
CONFIG_USB_SERIAL_ARK3116=m
CONFIG_USB_SERIAL_BELKIN=m
# CONFIG_USB_SERIAL_CH341 is not set
CONFIG_USB_SERIAL_WHITEHEAT=m
CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
# CONFIG_USB_SERIAL_CP210X is not set
CONFIG_USB_SERIAL_CYPRESS_M8=m
CONFIG_USB_SERIAL_EMPEG=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_FUNSOFT=m
CONFIG_USB_SERIAL_VISOR=m
CONFIG_USB_SERIAL_IPAQ=m
CONFIG_USB_SERIAL_IR=m
CONFIG_USB_SERIAL_EDGEPORT=m
CONFIG_USB_SERIAL_EDGEPORT_TI=m
CONFIG_USB_SERIAL_GARMIN=m
CONFIG_USB_SERIAL_IPW=m
# CONFIG_USB_SERIAL_IUU is not set
CONFIG_USB_SERIAL_KEYSPAN_PDA=m
CONFIG_USB_SERIAL_KEYSPAN=m
# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
CONFIG_USB_SERIAL_KLSI=m
CONFIG_USB_SERIAL_KOBIL_SCT=m
CONFIG_USB_SERIAL_MCT_U232=m
CONFIG_USB_SERIAL_MOS7720=m
CONFIG_USB_SERIAL_MOS7840=m
# CONFIG_USB_SERIAL_MOTOROLA is not set
CONFIG_USB_SERIAL_NAVMAN=m
CONFIG_USB_SERIAL_PL2303=m
# CONFIG_USB_SERIAL_OTI6858 is not set
# CONFIG_USB_SERIAL_QUALCOMM is not set
# CONFIG_USB_SERIAL_SPCP8X5 is not set
CONFIG_USB_SERIAL_HP4X=m
CONFIG_USB_SERIAL_SAFE=m
CONFIG_USB_SERIAL_SAFE_PADDED=y
# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
CONFIG_USB_SERIAL_SIERRAWIRELESS=m
# CONFIG_USB_SERIAL_SYMBOL is not set
CONFIG_USB_SERIAL_TI=m
CONFIG_USB_SERIAL_CYBERJACK=m
CONFIG_USB_SERIAL_XIRCOM=m
CONFIG_USB_SERIAL_OPTION=m
CONFIG_USB_SERIAL_OMNINET=m
# CONFIG_USB_SERIAL_OPTICON is not set
CONFIG_USB_SERIAL_DEBUG=m

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_BERRY_CHARGE is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_VST is not set

#
# OTG and related infrastructure
#
# CONFIG_NOP_USB_XCEIV is not set
# CONFIG_UWB is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

#
# LED drivers
#
# CONFIG_LEDS_ALIX2 is not set
# CONFIG_LEDS_PCA9532 is not set
# CONFIG_LEDS_LP5521 is not set
# CONFIG_LEDS_CLEVO_MAIL is not set
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_BD2802 is not set

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=m
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set

#
# iptables trigger is under Netfilter config (LED target)
#
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
CONFIG_EDAC=y

#
# Reporting subsystems
#
# CONFIG_EDAC_DEBUG is not set
CONFIG_EDAC_MM_EDAC=m
CONFIG_EDAC_E752X=m
# CONFIG_EDAC_I82975X is not set
# CONFIG_EDAC_I3000 is not set
# CONFIG_EDAC_X38 is not set
# CONFIG_EDAC_I5400 is not set
# CONFIG_EDAC_I5000 is not set
# CONFIG_EDAC_I5100 is not set
CONFIG_RTC_LIB=m
CONFIG_RTC_CLASS=m

#
# RTC interfaces
#
# CONFIG_RTC_INTF_SYSFS is not set
# CONFIG_RTC_INTF_PROC is not set
# CONFIG_RTC_INTF_DEV is not set
# CONFIG_RTC_DRV_TEST is not set

#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8581 is not set

#
# SPI RTC drivers
#

#
# Platform RTC drivers
#
# CONFIG_RTC_DRV_CMOS is not set
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_V3020 is not set

#
# on-CPU RTC drivers
#
# CONFIG_DMADEVICES is not set
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set
# CONFIG_STAGING is not set
CONFIG_X86_PLATFORM_DEVICES=y
# CONFIG_ACER_WMI is not set
# CONFIG_ASUS_LAPTOP is not set
# CONFIG_FUJITSU_LAPTOP is not set
# CONFIG_MSI_LAPTOP is not set
# CONFIG_PANASONIC_LAPTOP is not set
# CONFIG_COMPAL_LAPTOP is not set
# CONFIG_SONY_LAPTOP is not set
# CONFIG_THINKPAD_ACPI is not set
# CONFIG_INTEL_MENLOW is not set
# CONFIG_EEEPC_LAPTOP is not set
# CONFIG_ACPI_WMI is not set
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_TOSHIBA is not set

#
# Firmware Drivers
#
CONFIG_EDD=m
# CONFIG_EDD_OFF is not set
CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DELL_RBU=m
CONFIG_DCDBAS=m
CONFIG_DMIID=y
# CONFIG_ISCSI_IBFT_FIND is not set

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT2_FS_XIP=y
CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_EXT4_FS is not set
CONFIG_FS_XIP=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_FILE_LOCKING=y
CONFIG_XFS_FS=m
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
# CONFIG_XFS_RT is not set
# CONFIG_XFS_DEBUG is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_QUOTA=y
# CONFIG_QUOTA_NETLINK_INTERFACE is not set
CONFIG_PRINT_QUOTA_WARNING=y
CONFIG_QUOTA_TREE=y
# CONFIG_QFMT_V1 is not set
CONFIG_QFMT_V2=y
CONFIG_QUOTACTL=y
CONFIG_AUTOFS_FS=m
CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
CONFIG_GENERIC_ACL=y

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
CONFIG_CONFIGFS_FS=m
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
CONFIG_AFFS_FS=m
CONFIG_ECRYPT_FS=m
CONFIG_HFS_FS=m
CONFIG_HFSPLUS_FS=m
CONFIG_BEFS_FS=m
# CONFIG_BEFS_DEBUG is not set
CONFIG_BFS_FS=m
CONFIG_EFS_FS=m
CONFIG_CRAMFS=m
# CONFIG_SQUASHFS is not set
CONFIG_VXFS_FS=m
CONFIG_MINIX_FS=m
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
CONFIG_QNX4FS_FS=m
CONFIG_ROMFS_FS=m
CONFIG_ROMFS_BACKED_BY_BLOCK=y
# CONFIG_ROMFS_BACKED_BY_MTD is not set
# CONFIG_ROMFS_BACKED_BY_BOTH is not set
CONFIG_ROMFS_ON_BLOCK=y
CONFIG_SYSV_FS=m
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_UFS_DEBUG is not set
# CONFIG_NILFS2_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=m
CONFIG_SUNRPC_GSS=m
CONFIG_RPCSEC_GSS_KRB5=m
CONFIG_RPCSEC_GSS_SPKM3=m
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
CONFIG_OSF_PARTITION=y
CONFIG_AMIGA_PARTITION=y
# CONFIG_ATARI_PARTITION is not set
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
CONFIG_BSD_DISKLABEL=y
CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
# CONFIG_LDM_PARTITION is not set
CONFIG_SGI_PARTITION=y
# CONFIG_ULTRIX_PARTITION is not set
CONFIG_SUN_PARTITION=y
CONFIG_KARMA_PARTITION=y
CONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_737=m
CONFIG_NLS_CODEPAGE_775=m
CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_CODEPAGE_852=m
CONFIG_NLS_CODEPAGE_855=m
CONFIG_NLS_CODEPAGE_857=m
CONFIG_NLS_CODEPAGE_860=m
CONFIG_NLS_CODEPAGE_861=m
CONFIG_NLS_CODEPAGE_862=m
CONFIG_NLS_CODEPAGE_863=m
CONFIG_NLS_CODEPAGE_864=m
CONFIG_NLS_CODEPAGE_865=m
CONFIG_NLS_CODEPAGE_866=m
CONFIG_NLS_CODEPAGE_869=m
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_CODEPAGE_932=m
CONFIG_NLS_CODEPAGE_949=m
CONFIG_NLS_CODEPAGE_874=m
CONFIG_NLS_ISO8859_8=m
CONFIG_NLS_CODEPAGE_1250=m
CONFIG_NLS_CODEPAGE_1251=m
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=m
CONFIG_NLS_ISO8859_2=m
CONFIG_NLS_ISO8859_3=m
CONFIG_NLS_ISO8859_4=m
CONFIG_NLS_ISO8859_5=m
CONFIG_NLS_ISO8859_6=m
CONFIG_NLS_ISO8859_7=m
CONFIG_NLS_ISO8859_9=m
CONFIG_NLS_ISO8859_13=m
CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m
# CONFIG_DLM is not set

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_PRINTK_TIME=y
CONFIG_ALLOW_WARNINGS=y
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_ENABLE_MUST_CHECK is not set
CONFIG_FRAME_WARN=2048
CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
CONFIG_DETECT_HUNG_TASK=y
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_PROVE_LOCKING=y
CONFIG_LOCKDEP=y
CONFIG_LOCK_STAT=y
# CONFIG_DEBUG_LOCKDEP is not set
CONFIG_TRACE_IRQFLAGS=y
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_VIRTUAL is not set
# CONFIG_DEBUG_WRITECOUNT is not set
CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_KPROBES_SANITY_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_LKDTM is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_LATENCYTOP is not set
CONFIG_SYSCTL_SYSCALL_CHECK=y
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_NOP_TRACER=y
CONFIG_HAVE_FTRACE_NMI_ENTER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_HW_BRANCH_TRACER=y
CONFIG_HAVE_FTRACE_SYSCALLS=y
CONFIG_RING_BUFFER=y
CONFIG_FTRACE_NMI_ENTER=y
CONFIG_EVENT_TRACING=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_TRACING=y
CONFIG_GENERIC_TRACER=y
CONFIG_TRACING_SUPPORT=y
CONFIG_FTRACE=y
CONFIG_FUNCTION_TRACER=y
CONFIG_FUNCTION_GRAPH_TRACER=y
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_PREEMPT_TRACER is not set
# CONFIG_SYSPROF_TRACER is not set
# CONFIG_SCHED_TRACER is not set
# CONFIG_FTRACE_SYSCALLS is not set
# CONFIG_BOOT_TRACER is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_PROFILE_ALL_BRANCHES is not set
# CONFIG_POWER_TRACER is not set
# CONFIG_KSYM_TRACER is not set
# CONFIG_STACK_TRACER is not set
# CONFIG_HW_BRANCH_TRACER is not set
# CONFIG_KMEMTRACE is not set
# CONFIG_WORKQUEUE_TRACER is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
CONFIG_DYNAMIC_FTRACE=y
# CONFIG_FUNCTION_PROFILER is not set
CONFIG_FTRACE_MCOUNT_RECORD=y
# CONFIG_FTRACE_STARTUP_TEST is not set
# CONFIG_MMIOTRACE is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_DYNAMIC_DEBUG is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
# CONFIG_KGDB_TESTS is not set
CONFIG_HAVE_ARCH_KMEMCHECK=y
# CONFIG_STRICT_DEVMEM is not set
CONFIG_X86_VERBOSE_BOOTUP=y
CONFIG_EARLY_PRINTK=y
# CONFIG_EARLY_PRINTK_DBGP is not set
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PER_CPU_MAPS is not set
# CONFIG_X86_PTDUMP is not set
# CONFIG_DEBUG_RODATA is not set
# CONFIG_DEBUG_NX_TEST is not set
# CONFIG_IOMMU_DEBUG is not set
# CONFIG_IOMMU_STRESS is not set
CONFIG_X86_DS_SELFTEST=y
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=0
# CONFIG_DEBUG_BOOT_PARAMS is not set
# CONFIG_CPA_DEBUG is not set
# CONFIG_OPTIMIZE_INLINING is not set

#
# Security options
#
CONFIG_KEYS=y
CONFIG_KEYS_DEBUG_PROC_KEYS=y
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
CONFIG_SECURITY_NETWORK=y
# CONFIG_SECURITY_PATH is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
# CONFIG_SECURITY_ROOTPLUG is not set
CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
# CONFIG_SECURITY_SELINUX is not set
# CONFIG_SECURITY_TOMOYO is not set
# CONFIG_IMA is not set
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
# CONFIG_CRYPTO_FIPS is not set
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_NULL=m
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_CRYPTD=m
CONFIG_CRYPTO_AUTHENC=m
# CONFIG_CRYPTO_TEST is not set

#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set

#
# Block modes
#
CONFIG_CRYPTO_CBC=y
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_XTS is not set

#
# Hash modes
#
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_XCBC=m

#
# Digest
#
CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_CRC32C_INTEL is not set
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=m
# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not set
# CONFIG_CRYPTO_RMD320 is not set
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_TGR192=m
CONFIG_CRYPTO_WP512=m

#
# Ciphers
#
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_X86_64=m
CONFIG_CRYPTO_AES_NI_INTEL=m
CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_FCRYPT=m
CONFIG_CRYPTO_KHAZAD=m
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_X86_64 is not set
# CONFIG_CRYPTO_SEED is not set
CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_TWOFISH_COMMON=m
CONFIG_CRYPTO_TWOFISH_X86_64=m

#
# Compression
#
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_ZLIB=m
# CONFIG_CRYPTO_LZO is not set

#
# Random Number Generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
CONFIG_KVM_AMD=m
# CONFIG_KVM_TRACE is not set
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_BALLOON is not set
CONFIG_BINARY_PRINTF=y

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
CONFIG_CRC_T10DIF=y
CONFIG_CRC_ITU_T=m
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=m
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_NLATTR=y

2009-06-08 15:51:00

by Ming Lei

[permalink] [raw]
Subject: Re: [PATCH 0/8] kernel:lockdep:replace DFS with BFS

On Mon, 08 Jun 2009 14:22:07 +0200
Peter Zijlstra <[email protected]> wrote:

> On Sun, 2009-05-31 at 22:49 +0800, [email protected] wrote:
> > Hi,
> > 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
> > graph);
> >
> > 2,BFS may be easily implemented by circular queue and consumes
> > much less kernel stack space than DFS for DFS is implemented by
> > recursion.
> >
> > 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.
> >
>
> OK, so I applied the patches and the cleanup below.
>
> mostly little style nits and moving the circular queue into lockdep.c
> (nobody else uses it, so why share it?).
>
> One thing though, macros with return statements?! that's seriously bad
> style, don't do that.
>
> One thing that worries me a little is that we loose DaveM's
> lockdep_dependency_visit() optimization. My brain seems unwilling to
> co-operate on determining if BFS would make that redundant, so a
> little word on that would be appreciated.
>
> Then I booted it and all hell broke loose, so either I wrecked
> something or you did :-), would you terribly mind poking at that a
> little?

I have fixed the bug, which is introduced in your patch:
lockdep: clean up after BFS patches.

Please apply and verify the patch,thanks.

I'll go to bed,:-)

>From e99ce7b2b4985032e9f54b08a7790f3df2783286 Mon Sep 17 00:00:00 2001
From: Ming Lei <[email protected]>
Date: Mon, 8 Jun 2009 23:38:59 +0800
Subject: [PATCH] kernel:lockdep:fix return value of check_usage*()

Return zero if BFS find the target, so fix return value of callers
of BFS.

The patch fixes the boot failure introduced by the patch:
lockdep: clean up after BFS patches
.

Signed-off-by: Ming Lei <[email protected]>
---
kernel/lockdep.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 09a141f..48c3364 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -1250,8 +1250,6 @@ find_usage_forwards(struct lock_list *root, enum lock_usage_bit bit,
debug_atomic_inc(&nr_find_usage_forwards_checks);

result = __bfs_forwards(root, (void *)bit, usage_match, target_entry);
- if (result < 0)
- return print_bfs_bug(result);

return result;
}
@@ -1275,8 +1273,6 @@ find_usage_backwards(struct lock_list *root, enum lock_usage_bit bit,
debug_atomic_inc(&nr_find_usage_backwards_checks);

result = __bfs_backwards(root, (void *)bit, usage_match, target_entry);
- if (result < 0)
- return print_bfs_bug(result);

return result;
}
@@ -1397,13 +1393,17 @@ check_usage(struct task_struct *curr, struct held_lock *prev,

this.class = hlock_class(prev);
ret = find_usage_backwards(&this, bit_backwards, &target_entry);
- if (!ret || ret == 1)
+ if (ret < 0)
+ return print_bfs_bug(ret);
+ if (ret == 1)
return ret;

that.parent = NULL;
that.class = hlock_class(next);
ret = find_usage_forwards(&that, bit_forwards, &target_entry1);
- if (!ret || ret == 1)
+ if (ret < 0)
+ return print_bfs_bug(ret);
+ if (ret == 1)
return ret;

return print_bad_irq_dependency(curr, &this, &that,
@@ -2088,7 +2088,9 @@ check_usage_forwards(struct task_struct *curr, struct held_lock *this,
root.parent = NULL;
root.class = hlock_class(this);
ret = find_usage_forwards(&root, bit, &target_entry);
- if (!ret || ret == 1)
+ if (ret < 0)
+ return print_bfs_bug(ret);
+ if (ret == 1)
return ret;

return print_irq_inversion_bug(curr, &root, target_entry,
@@ -2110,7 +2112,9 @@ check_usage_backwards(struct task_struct *curr, struct held_lock *this,
root.parent = NULL;
root.class = hlock_class(this);
ret = find_usage_backwards(&root, bit, &target_entry);
- if (!ret || ret == 1)
+ if (ret < 0)
+ return print_bfs_bug(ret);
+ if (ret == 1)
return ret;

return print_irq_inversion_bug(curr, &root, target_entry,
--
1.6.0.GIT




--
Lei Ming

2009-06-09 12:52:38

by Ming Lei

[permalink] [raw]
Subject: Re: [PATCH 0/8] kernel:lockdep:replace DFS with BFS

2009/6/8 Ming Lei <[email protected]>:
> I have fixed the bug, which is introduced in your patch:
> ? ? ? ?lockdep: clean up after BFS patches.
>
> Please apply and verify the patch,thanks.

Hi, Peter

Would you mind verifying the patch which fixes your kernel boot failure?

If it does work, What do we need to do for this patches being accepted
by tip-tree?

Thanks.

>
> I'll go to bed,:-)
>
> From e99ce7b2b4985032e9f54b08a7790f3df2783286 Mon Sep 17 00:00:00 2001
> From: Ming Lei <[email protected]>
> Date: Mon, 8 Jun 2009 23:38:59 +0800
> Subject: [PATCH] kernel:lockdep:fix return value of check_usage*()
>
> Return zero if BFS find the target, so fix return value of callers
> of BFS.
>
> The patch fixes the boot failure introduced by the patch:
> ? ? ? ?lockdep: clean up after BFS patches
> .
>
> Signed-off-by: Ming Lei <[email protected]>
> ---
> ?kernel/lockdep.c | ? 20 ++++++++++++--------
> ?1 files changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/kernel/lockdep.c b/kernel/lockdep.c
> index 09a141f..48c3364 100644
> --- a/kernel/lockdep.c
> +++ b/kernel/lockdep.c
> @@ -1250,8 +1250,6 @@ find_usage_forwards(struct lock_list *root, enum lock_usage_bit bit,
> ? ? ? ?debug_atomic_inc(&nr_find_usage_forwards_checks);
>
> ? ? ? ?result = __bfs_forwards(root, (void *)bit, usage_match, target_entry);
> - ? ? ? if (result < 0)
> - ? ? ? ? ? ? ? return print_bfs_bug(result);
>
> ? ? ? ?return result;
> ?}
> @@ -1275,8 +1273,6 @@ find_usage_backwards(struct lock_list *root, enum lock_usage_bit bit,
> ? ? ? ?debug_atomic_inc(&nr_find_usage_backwards_checks);
>
> ? ? ? ?result = __bfs_backwards(root, (void *)bit, usage_match, target_entry);
> - ? ? ? if (result < 0)
> - ? ? ? ? ? ? ? return print_bfs_bug(result);
>
> ? ? ? ?return result;
> ?}
> @@ -1397,13 +1393,17 @@ check_usage(struct task_struct *curr, struct held_lock *prev,
>
> ? ? ? ?this.class = hlock_class(prev);
> ? ? ? ?ret = find_usage_backwards(&this, bit_backwards, &target_entry);
> - ? ? ? if (!ret || ret == 1)
> + ? ? ? if (ret < 0)
> + ? ? ? ? ? ? ? return print_bfs_bug(ret);
> + ? ? ? if (ret == 1)
> ? ? ? ? ? ? ? ?return ret;
>
> ? ? ? ?that.parent = NULL;
> ? ? ? ?that.class = hlock_class(next);
> ? ? ? ?ret = find_usage_forwards(&that, bit_forwards, &target_entry1);
> - ? ? ? if (!ret || ret == 1)
> + ? ? ? if (ret < 0)
> + ? ? ? ? ? ? ? return print_bfs_bug(ret);
> + ? ? ? if (ret == 1)
> ? ? ? ? ? ? ? ?return ret;
>
> ? ? ? ?return print_bad_irq_dependency(curr, &this, &that,
> @@ -2088,7 +2088,9 @@ check_usage_forwards(struct task_struct *curr, struct held_lock *this,
> ? ? ? ?root.parent = NULL;
> ? ? ? ?root.class = hlock_class(this);
> ? ? ? ?ret = find_usage_forwards(&root, bit, &target_entry);
> - ? ? ? if (!ret || ret == 1)
> + ? ? ? if (ret < 0)
> + ? ? ? ? ? ? ? return print_bfs_bug(ret);
> + ? ? ? if (ret == 1)
> ? ? ? ? ? ? ? ?return ret;
>
> ? ? ? ?return print_irq_inversion_bug(curr, &root, target_entry,
> @@ -2110,7 +2112,9 @@ check_usage_backwards(struct task_struct *curr, struct held_lock *this,
> ? ? ? ?root.parent = NULL;
> ? ? ? ?root.class = hlock_class(this);
> ? ? ? ?ret = find_usage_backwards(&root, bit, &target_entry);
> - ? ? ? if (!ret || ret == 1)
> + ? ? ? if (ret < 0)
> + ? ? ? ? ? ? ? return print_bfs_bug(ret);
> + ? ? ? if (ret == 1)
> ? ? ? ? ? ? ? ?return ret;
>
> ? ? ? ?return print_irq_inversion_bug(curr, &root, target_entry,
> --
> 1.6.0.GIT
>
>
>
>
> --
> Lei Ming
>



--
Lei Ming