lkml.org 
[lkml]   [2018]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 08/12] debugobjects: Make object hash locks nested terminal locks
Date
By making the object hash locks nested terminal locks, we can avoid
a bunch of unnecessary lockdep validations as well as saving space
in the lockdep tables.

Signed-off-by: Waiman Long <longman@redhat.com>
---
lib/debugobjects.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 4216d3d..3182d15 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -1129,8 +1129,13 @@ void __init debug_objects_early_init(void)
{
int i;

- for (i = 0; i < ODEBUG_HASH_SIZE; i++)
+ /*
+ * Make the obj_hash locks nested terminal locks.
+ */
+ for (i = 0; i < ODEBUG_HASH_SIZE; i++) {
raw_spin_lock_init(&obj_hash[i].lock);
+ lockdep_set_terminal_nested_class(&obj_hash[i].lock);
+ }

for (i = 0; i < ODEBUG_POOL_SIZE; i++)
hlist_add_head(&obj_static_pool[i].node, &obj_pool);
--
1.8.3.1
\
 
 \ /
  Last update: 2018-11-08 21:36    [W:0.097 / U:1.020 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site