Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4447179ybp; Mon, 7 Oct 2019 08:34:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyCA1giYFCF5kwllE8TN2vn0FVoBehj9RdMVGBjTX5DiAC4oWuQ7kyRUATpNROQvfJH0OZ X-Received: by 2002:a50:d090:: with SMTP id v16mr29591817edd.176.1570462455773; Mon, 07 Oct 2019 08:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570462455; cv=none; d=google.com; s=arc-20160816; b=THS1mSihSRrChHmP71hB3Cyuz6/kpK5FhmNfBW1dpf7O/HL5WVeQaQ3Ig/obNEAX/w V+4xpe1vY22LuxMDP1BcB+onD5ARxLYbo/FhS5oHZBlLoABoRFcSU9Q1g02022ZhAIqe sqw23XTkzoR9rEIb0k1zr6OLTLKuWFaBuNeZ6hknj9WpwzbMJiTKW4mOQRYGhN0AZkZq 1S/8hGjRkvxO30flg3hTa0uvpGBzZvvr+bpziEClOcGPRskgaelkSJ/VUd5bTSOi2I4J BnxU5nL7ctTvZek+6AyieVV7fK5asG8n/EgUwRLWZ5lXaofFsYpHm3GaWN9ndKC5D8d4 AV9A== 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=quR8Kb6GAk4jYImEGkDjHBYeMyfZIdQBv2DrxYLvF70=; b=AB9WS96IVB/jRpm0p6LqTxqmjzoP6kZUCxb/wV2VXw7HzJ5+kP4Ec8kJ1zUj7XuQqm a84Vz3gz80u5hs3Y2yav+BSBbeW0tvrwcQWWnGRwWks7L/1jT1Sis70f1sBRqPPY/mqw GVdxmE5WO5ExkMXAJN3/tA1hE9GKSEltzocv8pz8dUqRNWBSG8ZLl68+N229yvGgBihq r3lYVZekvFTxabI66D84C1TrVpLhurrkY2zMAcYt+oNpEQevlabRKXmYjsGGXSF2pj0S Ke06i/qK1TEKIaU/qEdXqxwbL7Nij6/gz3wbJO1J/RK0cn2zCaFncFbybx0/WcFjDPcZ HQAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=c7lu6Yh4; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i15si9251737ede.196.2019.10.07.08.33.51; Mon, 07 Oct 2019 08:34:15 -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=@gmail.com header.s=20161025 header.b=c7lu6Yh4; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728767AbfJGPdo (ORCPT + 99 others); Mon, 7 Oct 2019 11:33:44 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:32812 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728594AbfJGPdo (ORCPT ); Mon, 7 Oct 2019 11:33:44 -0400 Received: by mail-wr1-f67.google.com with SMTP id b9so15900607wrs.0; Mon, 07 Oct 2019 08:33:42 -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=HsSPnQ3C7gGorDJZN3aPQzC7h69lwPkBuW7Zj4jnilP5FSKq+4WO+pFQaIu4zCKd+P e2ldN4IabiOBS8X1XIo6e/+vruk4nK1F7BZ5oczPmc4TGtJTdpmK/M2FAT42BANDJhlY jCaZGrKDtjSMMNd/SKjhHSdwTAIQ33v54ppfoRh8lEZLDTOIOfUt49vWLEwIZuxBl2j/ 8w3SbeM46iK5qoDgMpIQsBHD/AMeUWIIyrOtYjWOyBzkmaUiup+sh3JCFxOKo8FSjn9h Qt0EM9fXUErTQoFUu44ar/f5aIvZEgWgKkVE0uiTZ32bIoIf/iR45Ru7phHImHFeUnC5 /5HQ== X-Gm-Message-State: APjAAAU7DBhnrawTQbdWIkj4q8iY20vlRlHs7raZRUd7YMpTgycHBKKp m3qjNnSBBkoU6HoV10rxwPE= 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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