lkml.org 
[lkml]   [2006]   [Mar]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 3 Mar 2006 23:36:17 -0800
FromAndrew Morton <>
SubjectRe: Ocfs2 performance bugs of doom
Daniel Phillips <phillips@google.com> wrote:
>
> @@ -103,31 +103,28 @@ struct dlm_lock_resource * __dlm_lookup_
>    					 const char *name,
>    					 unsigned int len)
>    {
>  -	unsigned int hash;
>  -	struct hlist_node *iter;
>  -	struct dlm_lock_resource *tmpres=NULL;
>    	struct hlist_head *bucket;
>  +	struct hlist_node *list;
> 
>    	mlog_entry("%.*s\n", len, name);
> 
>    	assert_spin_locked(&dlm->spinlock);
>  +	bucket = dlm->lockres_hash + full_name_hash(name, len) % DLM_HASH_BUCKETS;
> 
>  -	hash = full_name_hash(name, len);

err, you might want to calculate that hash outside the spinlock.

Maybe have a lock per bucket, too.

A 1MB hashtable is verging on comical.  How may data are there in total?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-04 07:40    [from the cache]
©2003-2008