Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2234545ybl; Thu, 19 Dec 2019 10:10:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwAfQNePPWTc2l1HmWE4s3lRAed8oPXOsBTRE6KZCL83W3hwZoQN6eUOA4izx2OcyyUC0fN X-Received: by 2002:a05:6830:4a4:: with SMTP id l4mr10247354otd.91.1576779011990; Thu, 19 Dec 2019 10:10:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576779011; cv=none; d=google.com; s=arc-20160816; b=U/ZVBFydUzEz9sziMRiFjPuUass8Qzrq+8aNVEy6ENpZ0gMtAz8r68SZaYz1Fr0p4x y9lw+27QNzXtbWSsjCfdD6sd6J0Y3Pg0PZU0GL++ww3nV/p7nCyzeK0wgjhNgowDQu+Q EjRefvsYhCAzyJhxoXNAQbK2ljz7OY9a8as852WL2PDjs73rboZs44mSjfL7+u7AF8wv ybVaHyqPjCXrSBeIOd7jQ6Xf5QTAATiHTA3SYoyrWgyQCLxkd3/CPdQ1AQvTXAQQ480U m0Lqq58Tx5ZdFrNnLhln8Q0hNharHYDA+dBpe5eggmrx1jU4gikyPaeviouXP1DQcf6r xulA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=7eHx0VbtBjvjRprkUbAcmGvyZyi3rb12Q/vqNtVSlQA=; b=0Df2MmqqqEIm+B568Z23L0CA1O73zUXKB2XaOXTKUWPGg6VsAT74bSSO5qBOuj+ufZ rQLm96i+i2JpXGwWwT/wGVwq9+UfkRzr17uLOh+S9PExIO8+SWJMDeGaDKcWXWfMtO5U Vt1A2uqczQlv6pL5HDrqTbVwhrQwOHXQda6HggufNLbfd7YKEcLD0JuORDq9Kp675PaZ EnY2ecK5Tqm37V2m9dg5I2FrEGVD9waKfdHfrk+vYot4RNLD4rMrcS7MFfa+Vsjj3GXN iBrvlGFH71tR35YTqpsnFuJNRUgS6xT0c7iCnMuI1IefbTYtMGgT/szuLiPcG9Dq1h92 MCDg== ARC-Authentication-Results: i=1; mx.google.com; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j24si956419otn.110.2019.12.19.10.10.00; Thu, 19 Dec 2019 10:10:11 -0800 (PST) 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; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726869AbfLSSJK (ORCPT + 99 others); Thu, 19 Dec 2019 13:09:10 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:18700 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726797AbfLSSJJ (ORCPT ); Thu, 19 Dec 2019 13:09:09 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBJHsrYl144743; Thu, 19 Dec 2019 13:09:08 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wyq5ru324-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Dec 2019 13:09:07 -0500 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id xBJHsxhw145575; Thu, 19 Dec 2019 13:09:07 -0500 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wyq5ru31e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Dec 2019 13:09:07 -0500 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id xBJI78pj006975; Thu, 19 Dec 2019 18:09:06 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma04dal.us.ibm.com with ESMTP id 2wvqc7cpd3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Dec 2019 18:09:06 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBJI95OJ16580936 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Dec 2019 18:09:05 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C4A6BE056; Thu, 19 Dec 2019 18:09:05 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9C95BBE054; Thu, 19 Dec 2019 18:09:04 +0000 (GMT) Received: from localhost (unknown [9.80.196.117]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 19 Dec 2019 18:09:04 +0000 (GMT) From: Nathan Lynch To: Scott Cheloha Cc: ricklind@linux.vnet.ibm.com, Scott Cheloha , linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Greg Kroah-Hartman , David Hildenbrand Subject: Re: [PATCH v3] drivers/base/memory.c: cache blocks in radix tree to accelerate lookup In-Reply-To: <20191217193238.3098-1-cheloha@linux.vnet.ibm.com> References: <20191121195952.3728-1-cheloha@linux.vnet.ibm.com> <20191217193238.3098-1-cheloha@linux.vnet.ibm.com> Date: Thu, 19 Dec 2019 12:09:03 -0600 Message-ID: <87h81wjigw.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-19_06:2019-12-17,2019-12-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=1 bulkscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1011 phishscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912190135 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Scott Cheloha writes: > Searching for a particular memory block by id is slow because each block > device is kept in an unsorted linked list on the subsystem bus. > > Lookup is much faster if we cache the blocks in a radix tree. Memory > subsystem initialization and hotplug/hotunplug is at least a little faster > for any machine with more than ~100 blocks, and the speedup grows with > the block count. > > Signed-off-by: Scott Cheloha > Acked-by: David Hildenbrand Acked-by: Nathan Lynch Thanks Scott.