Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp523425ybi; Wed, 3 Jul 2019 00:25:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRa3tKmTRZJqTWS3wKaqWhtWOdsJ9haobMcy6drUT/xzUeHI2U1JP7+PQacH5gVc3MjqUI X-Received: by 2002:a63:e40a:: with SMTP id a10mr35156294pgi.277.1562138712142; Wed, 03 Jul 2019 00:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562138712; cv=none; d=google.com; s=arc-20160816; b=qKGkTkKcLMZA5Naoy/KqparWWdITt8DxfEJ1i4l4SN/8GCD5RCkCcka+YElOgNRQS+ Wh0qej1oC6+4t0T1TtaiJoXUJtLDTUXdUhh+gVw8AumGi/RIcofrJVEDnDOnl2Ifqae5 QD7UfbfhTDXH4Pvf09UfyUoJBmuzThkWr+bB8YMSHlA4IB4EhGX5x1b+s/3DMreTu6JI HGrLKa8zLxrsj/BMy/cEr8uvkKTRTspEPZtt08Kd6row5t8XlvWVh1bqrf3JzuvTZri5 AYYf0jm7c8sQ9mKtzBWH2rGIdkGQaGuAcNGR+0110hcKj6iW/kXR9JffYqAr42/w1S0+ zMiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ypbH4/gcaNR6DaSyoAhBRclu4bzhJ/hRl1kqittSFa4=; b=fgAxHY1zzopZ0e0TcPgJ02jpGxgyns7bfameHre501qMyL6DE5btFxZND9Ig/BmyR2 ZnfizCMUGiEkZsTmwNL721SvVhITtSXe1KOgfIu4ajAlj5v45y5YABVZRagl7RKrLFVz 2T8Hl0wMBMRljA+wgBZ6ehntder2JDO1HZZLzCDdBJJzxawQuv2fy0KbTKuOPgY7WRPv G+Y1H+fFLy3kehKtMtj2heM1pxXJSdMgF5F6w276cmVLu6wgUl8CaMTphX0171YtWJQO vfFUys7PWymEnucXHQnkGlTNpgRu50RRWEJPr7GNZzr8KdrfqP0Sw2XZ24xsfsQIA+g7 11Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=H84msxnK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si1584883pff.164.2019.07.03.00.24.55; Wed, 03 Jul 2019 00:25:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=H84msxnK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727241AbfGCHXB (ORCPT + 99 others); Wed, 3 Jul 2019 03:23:01 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43752 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbfGCHXB (ORCPT ); Wed, 3 Jul 2019 03:23:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ypbH4/gcaNR6DaSyoAhBRclu4bzhJ/hRl1kqittSFa4=; b=H84msxnKTy6EG55p8uB0rfCtG xP7pV88sEDODHXPV7u+gnFaLZ97NCX2DLsJ9pJ0oGtI+yIzsRmgrENOYEpBvbu9JvX8i2gIyKzOoz yDQJA8fyS+wRitvpAdJ9G3Ku1pLcG8SSe0S5c6H3xqCAaGq0bUQw+/V9sXXcMP8haJSYf2LgQ1yLb caN1TZ+QlQpGoylctirXh2O7+/zYGW64WiYeihT+SV9llIwNr4lIWFIv7r+yQ1DuGNG3/iqOF+MQE sU3hsge3hpTkS5q9yXnipt1KaRlEEfnHsUKs8Ox5/r5B9nx7h6V45zDLSLCWT8AnWtNwtARObo2hW TdkE2lX8A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hiZbL-0002i3-70; Wed, 03 Jul 2019 07:22:48 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 006482013A3C4; Wed, 3 Jul 2019 09:22:44 +0200 (CEST) Date: Wed, 3 Jul 2019 09:22:44 +0200 From: Peter Zijlstra To: Michel Lespinasse Cc: Davidlohr Bueso , David Howells , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/3] make RB_DECLARE_CALLBACKS more generic Message-ID: <20190703072244.GG3402@hirez.programming.kicks-ass.net> References: <20190703040156.56953-1-walken@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190703040156.56953-1-walken@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 02, 2019 at 09:01:53PM -0700, Michel Lespinasse wrote: > These changes are intended to make the RB_DECLARE_CALLBACKS macro > more generic (allowing the aubmented subtree information to be a struct > instead of a scalar). > > Changes since v2: Left the RBSTATIC and RBNAME arguments first in the > RB_DECLARE_CALLBACKS and RB_DECLARE_CALLBACKS_MAX macros as suggested > by Peter Zijlstra. > > Changes since v1: I have added a new RB_DECLARE_CALLBACKS_MAX macro, > which generates augmented rbtree callbacks where the subtree information > can be expressed as max(f(node)). This covers all current uses, and thus > makes it easy to do the later RB_DECLARE_CALLBACKS definition change > as it's only currently used in RB_DECLARE_CALLBACKS_MAX. > > I have also verified the compiled lib/interval_tree.o and mm/mmap.o > files to check that they didn't change. This held as expected for > interval_tree.o; mmap.o did have some changes which could be reverted > by marking __vma_link_rb as noinline. I did not add such a change to the > patchset; I felt it was reasonable enough to let the inlining decision > up to the compiler. > > Michel Lespinasse (3): > augmented rbtree: add comments for RB_DECLARE_CALLBACKS macro > augmented rbtree: add new RB_DECLARE_CALLBACKS_MAX macro > augmented rbtree: rework the RB_DECLARE_CALLBACKS macro definition Thanks Michel, looking good now! Acked-by: Peter Zijlstra (Intel)