From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FSL_HELO_FAKE,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35297C47404 for ; Mon, 7 Oct 2019 15:33:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E4ABF218AC for ; Mon, 7 Oct 2019 15:33:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c7lu6Yh4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4ABF218AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 901508E0007; Mon, 7 Oct 2019 11:33:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D9C88E0003; Mon, 7 Oct 2019 11:33:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7EF7F8E0007; Mon, 7 Oct 2019 11:33:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0251.hostedemail.com [216.40.44.251]) by kanga.kvack.org (Postfix) with ESMTP id 5CF388E0003 for ; Mon, 7 Oct 2019 11:33:44 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id E41AC52AC for ; Mon, 7 Oct 2019 15:33:43 +0000 (UTC) X-FDA: 76017383526.22.goose60_3d9bdb51e5e63 X-HE-Tag: goose60_3d9bdb51e5e63 X-Filterd-Recvd-Size: 5049 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Mon, 7 Oct 2019 15:33:43 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id p14so14926864wro.4 for ; Mon, 07 Oct 2019 08:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=quR8Kb6GAk4jYImEGkDjHBYeMyfZIdQBv2DrxYLvF70=; b=c7lu6Yh4SW2Tvuh1xafLP92jKbiNAvuBg/Km9vd0KvZU2E11+TBSVwgc3WkiZ/6GeG OMD89f1fH4nrgXTqmewRdrimBHyGFLGFKhNTmCzVClKy/HbvAwz5w4mlL+IVRMQCTz10 w1XeN9pM4v/P9F0cC5BAE38SgX/rmuGkKEvFK0M0wDbKCr9fMFJduL5aLgwtmJu/HCUD 6DJot7eTO+zB+slgYRwaG30RBBGpQ0NcW0wtW6b4Io3NSOS7ho1aA/VKEQHq8ltDWgzX 13XSYOlp6u4QQ1/acZA8CeqSwl21x9EWYa2o7ghUB8UqvfmxtfQrxYgm+rBDK4NY3Ew1 iafA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=quR8Kb6GAk4jYImEGkDjHBYeMyfZIdQBv2DrxYLvF70=; b=inxUo6Ly7/rbW+8NL84nXXYRRsrXg0iCQ/JGDilDg22vau7vjplL+YtCCftFbwP9dN hjkfFjN4vc6rcGjpsHi/fYOOsbImH9oYr0LdMKlYyb7fcEki7H4xF77qP7pxgPldGjsu 09UXZRyxhFCqEIXcvqvTZNWgfU7pOS6Rng5AUZAJ4Jf6GARK9B/Vc75g8iyEwYrnaHjr G1MKncAz9Aka+Cwj/xrzMWV2A9EhszPNlgJSLGymZHkGTOTKTeRK3BQZTWHVzROgouZH Ub+S8Xz0GiQflNuohJrJFLxkTR85ffvmC0gciWy9Jii26kbPHtbPNlzf4jvhHT537Tkx 9wJA== X-Gm-Message-State: APjAAAV/9Gk+7tu2kk/40uRALPnYrhJWMpPPpcQR/m1khrTZJdZ4tgv7 SCew+kvvFpnSMYcDW5ya5hY= X-Google-Smtp-Source: APXvYqz1lvbhYIE/Ji8FSRU355cLZvKRKQCsmcdWrQVr8/9Glty+Il7foi680QdDddETmlMfQpbxHQ== X-Received: by 2002:adf:dcd2:: with SMTP id x18mr22950157wrm.220.1570462422220; Mon, 07 Oct 2019 08:33:42 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id a2sm21763670wrt.45.2019.10.07.08.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 08:33:41 -0700 (PDT) Date: Mon, 7 Oct 2019 17:33:39 +0200 From: Ingo Molnar To: Davidlohr Bueso Cc: akpm@linux-foundation.org, walken@google.com, peterz@infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Davidlohr Bueso Subject: Re: [PATCH 11/11] x86/mm, pat: convert pat tree to generic interval tree Message-ID: <20191007153339.GA95072@gmail.com> References: <20191003201858.11666-1-dave@stgolabs.net> <20191003201858.11666-12-dave@stgolabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191003201858.11666-12-dave@stgolabs.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: * Davidlohr Bueso wrote: > With some considerations, the custom pat_rbtree implementation can be > simplified to use most of the generic interval_tree machinery. > > o The tree inorder traversal can slightly differ when there are key > ('start') collisions in the tree due to one going left and another right. > This, however, only affects the output of debugfs' pat_memtype_list file. > > o Generic interval trees are now semi open [a,b), which suits well with > what pat wants. > > o Erasing logic must remain untouched as well. > > In order for the types to remain u64, the 'memtype_interval' calls are > introduced, as opposed to simply using struct interval_tree. > > In addition, pat tree might potentially also benefit by the fast overlap > detection for the insertion case when looking up the first overlapping node > in the tree. > > Finally, I've tested this on various servers, via sanity warnings, running > side by side with the current version and so far see no differences in the > returned pointer node when doing memtype_rb_lowest_match() lookups. > > Cc: Peter Zijlstra > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: x86@kernel.org > Signed-off-by: Davidlohr Bueso > --- > arch/x86/mm/pat.c | 22 +++---- > arch/x86/mm/pat_rbtree.c | 151 ++++++++++------------------------------------- > 2 files changed, 43 insertions(+), 130 deletions(-) I suppose this will be carried in -mm? If so and if this patch is regression free, then: Acked-by: Ingo Molnar Thanks, Ingo