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 C845EC433F5 for ; Tue, 5 Oct 2021 13:18:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4780E6138F for ; Tue, 5 Oct 2021 13:18:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4780E6138F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C85B1940008; Tue, 5 Oct 2021 09:18:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C34D2940007; Tue, 5 Oct 2021 09:18:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B23DE940008; Tue, 5 Oct 2021 09:18:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0252.hostedemail.com [216.40.44.252]) by kanga.kvack.org (Postfix) with ESMTP id A5244940007 for ; Tue, 5 Oct 2021 09:18:44 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 4E69330161 for ; Tue, 5 Oct 2021 13:18:44 +0000 (UTC) X-FDA: 78662438568.13.0324E1F Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf16.hostedemail.com (Postfix) with ESMTP id 033D0F00248C for ; Tue, 5 Oct 2021 13:18:43 +0000 (UTC) Received: by mail-pj1-f48.google.com with SMTP id ls18-20020a17090b351200b001a00250584aso1518791pjb.4 for ; Tue, 05 Oct 2021 06:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/n9PLhbLsN9GMz2w62Bl5DPNT8suG6RwT9DktILrPW8=; b=QPo2WWLTJLKUtOaB2PwOJ7t+f+KTcEEzQsRr6qtgej6BLzhFex4Y+rdGC/9nesJntn GqqIHxYnc7BfbCugj0P9j+sa1dWU0Oo2UlVcrmoW3QBASG6pretxz+TrB9icSOCoo+rT D47FfIPUIXjhJM1lJdqMEhM7jP+m2P5UqEG/+PIci9jFn8udsGy60BHsWo2R/FgFC0Em jilZuVr+Sr+I/329qAuPMbI2pBJofIOVUf4ERzvwm7wj+G02Htmq9MmuYfVSIc5GhpZv VED+vAZNStXnsT72TvY7sZqPz7Vop3LaKCBb+OXjroAGaEWy8ie+ub/2ZC6Ugrdzn5rB bxGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/n9PLhbLsN9GMz2w62Bl5DPNT8suG6RwT9DktILrPW8=; b=Hh/I6ZAE4MdAZuux1a/e7lyeUKCtdh7DYDWY966v14ZXa9YE8JESq27sXLqXVtmKYK OLrJ+u0R2AZCieAFs+A1zVxxGeEO5CgaOQLdeQE7EvqQKrC3BUfle5i+MGfrVfnZytXi EkkTopDlTr8nKQDk2ry19VwpJwefrxQa4pbvYzLETjsyls3pVdtWf6oJjvfQuCud4i8F jyPyURH+Oyisn67KnuojkL4/44rAF9MLh/3fi/42nXym5kpNBGkVkjrCif5moiIfkhko k6VpI/q21y81WAw1drqG9uec3O0rv9OboWUJnB1TI64vlEqpTfN67KVRu7Ctli/JbMzy oz8w== X-Gm-Message-State: AOAM533dpJz6a3KXEKwFyrBzhNd/uEbaLtWFHJCNN7ti8U+pZqNXUm1Q E+L4tjUK0lSAlFxFAD2whEs= X-Google-Smtp-Source: ABdhPJwQjViUqWak699WeKcPTk4zroZTMRPdopk9dLVR+VgDEGXyfWxlobxoJWVnl1M/frxrJ/pFSg== X-Received: by 2002:a17:90b:1e47:: with SMTP id pi7mr1190797pjb.206.1633439922936; Tue, 05 Oct 2021 06:18:42 -0700 (PDT) Received: from kvm.asia-northeast3-a.c.our-ratio-313919.internal (24.151.64.34.bc.googleusercontent.com. [34.64.151.24]) by smtp.gmail.com with ESMTPSA id t2sm2271062pjf.1.2021.10.05.06.18.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 06:18:42 -0700 (PDT) Date: Tue, 5 Oct 2021 13:18:38 +0000 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Christoph Lameter 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 Message-ID: <20211005131838.GA2760@kvm.asia-northeast3-a.c.our-ratio-313919.internal> References: <20211003051750.8296-1-42.hyeyoo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QPo2WWLT; spf=pass (imf16.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.216.48 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 033D0F00248C X-Stat-Signature: 5s77k53hhykcb5cxrnictjq1kjg5ptbj X-HE-Tag: 1633439923-124303 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 Mon, Oct 04, 2021 at 04:05:23PM +0200, Christoph Lameter wrote: > 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. > > > 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. Sorry for making a noise. It was because I misunderstood NUMA. Thought it should be not frequent because kernel's default memory allocation policy was allocating from local node. It would have been better If I asked why it uses much memory first, not writing code. I'll be more careful next time. Thank you for reviewing! Thanks, Hyeonggon