From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bk0-f46.google.com ([209.85.214.46]:34385 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754045Ab2I0CaH (ORCPT ); Wed, 26 Sep 2012 22:30:07 -0400 MIME-Version: 1.0 In-Reply-To: <20120927021919.GJ15236@dastard> References: <1348404995-14372-1-git-send-email-zwu.kernel@gmail.com> <1348404995-14372-3-git-send-email-zwu.kernel@gmail.com> <20120925091739.GB29154@dastard> <20120927021919.GJ15236@dastard> Date: Thu, 27 Sep 2012 10:30:05 +0800 Message-ID: Subject: Re: [RFC v2 02/10] vfs: add support for updating access frequency From: Zhi Yong Wu To: Dave Chinner Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linuxram@linux.vnet.ibm.com, viro@zeniv.linux.org.uk, cmm@us.ibm.com, tytso@mit.edu, marco.stornelli@gmail.com, stroetmann@ontolinux.com, diegocg@gmail.com, chris@csamuel.org, Zhi Yong Wu Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-btrfs-owner@vger.kernel.org List-ID: On Thu, Sep 27, 2012 at 10:19 AM, Dave Chinner wrote: > On Wed, Sep 26, 2012 at 10:53:07AM +0800, Zhi Yong Wu wrote: >> On Tue, Sep 25, 2012 at 5:17 PM, Dave Chinner wrote: >> > On Sun, Sep 23, 2012 at 08:56:27PM +0800, zwu.kernel@gmail.com wrote: >> > I note that the code will always insert range items of a length >> > RANGE_SIZE. This means you have a fixed object granularity and hence >> > you have no need for a range based search. That is, you could use a >> > radix tree where each entry in the radix tree points directly to the >> > range object similar to how the page cache uses a radix tree for >> > indexing pages. That brings the possibility of lockless range item >> > lookups.... >> Great suggestion, but can we temporarily put it in TODO list? because >> it will bring one big code change. > > Sure. I just wanted to point out that there are better choices for > indexing fixed size elements than rb-trees and why it might make > sense to use a different type of tree. Got it, thanks. Moreover, it should also be better to use radix tree to hold hot_inode, not only hot_range. > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com -- Regards, Zhi Yong Wu