Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755633Ab2HINf4 (ORCPT ); Thu, 9 Aug 2012 09:35:56 -0400 Received: from mail.betterlinux.com ([199.58.199.50]:50234 "EHLO mail.betterlinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751626Ab2HINfy (ORCPT ); Thu, 9 Aug 2012 09:35:54 -0400 X-DKIM: OpenDKIM Filter v2.4.1 mail.betterlinux.com F1F9E8210C Date: Thu, 9 Aug 2012 15:35:44 +0200 From: Andrea Righi To: Michel Lespinasse , John Stultz Cc: LKML , Andrew Morton , Android Kernel Team , Robert Love , Mel Gorman , Hugh Dickins , Dave Hansen , Rik van Riel , Dmitry Adamushko , Dave Chinner , Neil Brown , "Aneesh Kumar K.V" , Mike Hommey , Jan Kara , KOSAKI Motohiro , Minchan Kim , "linux-mm@kvack.org" Subject: Re: [PATCH 1/5] [RFC] Add volatile range management code Message-ID: <20120809133544.GA2086@thinkpad> References: <1343447832-7182-1-git-send-email-john.stultz@linaro.org> <1343447832-7182-2-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1284 Lines: 34 On Thu, Aug 09, 2012 at 02:46:37AM -0700, Michel Lespinasse wrote: > On Fri, Jul 27, 2012 at 8:57 PM, John Stultz wrote: > > v5: > > * Drop intervaltree for prio_tree usage per Michel & > > Dmitry's suggestions. > > Actually, I believe the ranges you need to track are non-overlapping, correct ? > > If that is the case, a simple rbtree, sorted by start-of-range > address, would work best. > (I am trying to remove prio_tree users... :) > John, JFYI, if you want to try a possible rbtree-based implementation, as suggested by Michel you could try this one: https://github.com/arighi/kinterval This implementation supports insertion, deletion and transparent merging of adjacent ranges, as well as splitting ranges when chunks removed or different chunk types are added in the middle of an existing range; so if I'm not wrong probably you should be able to use this code as is, without any modification. If you decide to go this way and/or need help to use it in your patch set just let me know. -Andrea -- 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/