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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3391CC433EF for ; Mon, 4 Oct 2021 14:05:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9E61661207 for ; Mon, 4 Oct 2021 14:05:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9E61661207 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gentwo.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3AF30940024; Mon, 4 Oct 2021 10:05:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 35EA594000B; Mon, 4 Oct 2021 10:05:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 24DEA940024; Mon, 4 Oct 2021 10:05:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0102.hostedemail.com [216.40.44.102]) by kanga.kvack.org (Postfix) with ESMTP id 1499994000B for ; Mon, 4 Oct 2021 10:05:27 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C28F124388 for ; Mon, 4 Oct 2021 14:05:26 +0000 (UTC) X-FDA: 78658927452.30.5443FE4 Received: from gentwo.de (vmi485042.contaboserver.net [161.97.139.209]) by imf26.hostedemail.com (Postfix) with ESMTP id 7C4F120061CC for ; Mon, 4 Oct 2021 14:05:25 +0000 (UTC) Received: by gentwo.de (Postfix, from userid 1001) id 97F73B00261; Mon, 4 Oct 2021 16:05:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by gentwo.de (Postfix) with ESMTP id 95917B00189; Mon, 4 Oct 2021 16:05:23 +0200 (CEST) Date: Mon, 4 Oct 2021 16:05:23 +0200 (CEST) From: Christoph Lameter To: Hyeonggon Yoo <42.hyeyoo@gmail.com> cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka Subject: Re: [RFC PATCH] mm, slab: Reduce space complexity of alien_cache using rbtree In-Reply-To: <20211003051750.8296-1-42.hyeyoo@gmail.com> Message-ID: References: <20211003051750.8296-1-42.hyeyoo@gmail.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Authentication-Results: imf26.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf26.hostedemail.com: domain of cl@gentwo.de designates 161.97.139.209 as permitted sender) smtp.mailfrom=cl@gentwo.de X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 7C4F120061CC X-Stat-Signature: 58dzkxgzrg3kkcte1x6nr4bjs6drrit1 X-HE-Tag: 1633356325-859571 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: On Sun, 3 Oct 2021, Hyeonggon Yoo wrote: > As remote node allocation isn't that frequent and better avoided, > this patch tries to compromise some execution time for memory usage. Remote node allocation is typical for large memory loads and essential to balance the memory allocation over multiple nodes. Large NUMA systems exist because the memory requirements of the application cannot be satisfied by what a single node has to offer and usually code threads from multiple nodes may access remote memory. > This patch introduces red-black tree for alien cache. Tree nodes are > allocated at cache creation and the pool of tree nodes is same size with > cache's limit. ??? A red-black tree?? Gosh how much will performance suffer now? A lookup for every allocation? > Remove init_reap_node, next_reap_node and related variables > introduced by commit 8fce4d8e3b9e ("[PATCH] slab: Node rotor for freeing > alien caches and remote per cpu pages."), Because it has only one tree > for all remote nodes. Rotors to spread the memory allocated are essential for the performance of large memory loads! Memory must be spread evenly otherwise memory accesses will overload a single node.