From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 07/19] quota: make per-sb hash array Date: Wed, 27 Oct 2010 20:31:09 +0100 Message-ID: <20101027193109.GH19804@ZenIV.linux.org.uk> References: <1287768904-27810-1-git-send-email-dmonakhov@openvz.org> <1287768904-27810-8-git-send-email-dmonakhov@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, jack@suse.cz, hch@infradead.org, Dmitry Monakhov To: Dmitry Monakhov Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:59404 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755801Ab0J0TbL (ORCPT ); Wed, 27 Oct 2010 15:31:11 -0400 Content-Disposition: inline In-Reply-To: <1287768904-27810-8-git-send-email-dmonakhov@openvz.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Oct 22, 2010 at 09:34:52PM +0400, Dmitry Monakhov wrote: > From: Dmitry Monakhov > > Currently quota_hash[] is global, which is bad for scalability. > Also is is the last user of global dq_list_lock. > It is reasonable to introduce dedicated hash for each super_block > which use quota. > > per-sb hash will be allocated only when necessary (on first quota_on()) > Protected by per-sb dq_list_lock. Ugh... Why not a common hash with per-chain spinlock? We'll waste less memory on those than on hash chain heads even for a couple of superblocks and unless you've got boxen with more (quota'd) superblocks than hash chains, you'll get less contention...