Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754223Ab1COWmo (ORCPT ); Tue, 15 Mar 2011 18:42:44 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:59204 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263Ab1COWml (ORCPT ); Tue, 15 Mar 2011 18:42:41 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=BQsLLQSPXZYw9fF0Sj2+nyIz6rtUuwuYFiB9QcYN61AjaBKqLiF2coSQDsmBlxdfMp NJogoLYe4v/0SCvJav4pxb//BdXOx3OaIYK0zaXEf+Coc/l4WQWexVfupboPX2WEAaYN 1QvEmSi83eIepBMm/UgnUEcvh55Bo+i3F/JCA= Subject: Re: [PATCH v2 2.6.38-rc8-tip 4/20] 4: uprobes: Adding and remove a uprobe in a rb tree. From: Eric Dumazet To: Peter Zijlstra Cc: Thomas Gleixner , Srikar Dronamraju , Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Masami Hiramatsu , Christoph Hellwig , Ananth N Mavinakayanahalli , Andi Kleen , Oleg Nesterov , Andrew Morton , Jim Keniston , Roland McGrath , SystemTap , LKML , "Paul E. McKenney" In-Reply-To: <1300218499.2250.12.camel@laptop> References: <20110314133403.27435.7901.sendpatchset@localhost6.localdomain6> <20110314133444.27435.50684.sendpatchset@localhost6.localdomain6> <20110315173041.GB24254@linux.vnet.ibm.com> <1300218499.2250.12.camel@laptop> Content-Type: text/plain; charset="UTF-8" Date: Tue, 15 Mar 2011 23:42:24 +0100 Message-ID: <1300228944.2565.19.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1166 Lines: 34 Le mardi 15 mars 2011 à 20:48 +0100, Peter Zijlstra a écrit : > On Tue, 2011-03-15 at 20:22 +0100, Thomas Gleixner wrote: > > I am not sure if its a good idea to walk the tree > > > as and when the tree is changing either because of a insertion or > > > deletion of a probe. > > > > I know that you cannot walk the tree lockless except you would use > > some rcu based container for your probes. > > You can in fact combine a seqlock, rb-trees and RCU to do lockless > walks. > > https://lkml.org/lkml/2010/10/20/160 > > and > > https://lkml.org/lkml/2010/10/20/437 > > But doing that would be an optimization best done once we get all this > working nicely. > We have such schem in net/ipv4/inetpeer.c function inet_getpeer() (using a seqlock on latest net-next-2.6 tree), but we added a counter to make sure a reader could not enter an infinite loop while traversing tree (AVL tree in inetpeer case). -- 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/