From 2187a5e40da5350c3c7c95ae1b5091bc4a5b68ad Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 26 Apr 2004 08:56:11 -0700 Subject: [PATCH] Bigger quota hashtable From: Jan Kara I found out that quota uses hash table with just 43 entries to hash dquot entries. I guess that we can afford using one page for that (quotactl(Q_GETQUOTA...), got faster like 3x for 4000 users). Attached patch implements that. --- include/linux/quota.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/quota.h b/include/linux/quota.h index 7d8c601ec2da..7f43ae55e891 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -201,8 +201,6 @@ struct dqstats { extern struct dqstats dqstats; -#define NR_DQHASH 43 /* Just an arbitrary number */ - #define DQ_MOD_B 0 /* dquot modified since read */ #define DQ_BLKS_B 1 /* uid/gid has been warned about blk limit */ #define DQ_INODES_B 2 /* uid/gid has been warned about inode limit */ @@ -212,7 +210,7 @@ extern struct dqstats dqstats; #define DQ_WAITFREE_B 6 /* dquot being waited (by invalidate_dquots) */ struct dquot { - struct list_head dq_hash; /* Hash list in memory */ + struct hlist_node dq_hash; /* Hash list in memory */ struct list_head dq_inuse; /* List of all quotas */ struct list_head dq_free; /* Free list element */ struct semaphore dq_lock; /* dquot IO lock */ -- cgit v1.2.3