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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,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 81AA0C433ED for ; Wed, 7 Apr 2021 11:09:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 52EBF61362 for ; Wed, 7 Apr 2021 11:09:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235043AbhDGLKD (ORCPT ); Wed, 7 Apr 2021 07:10:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:55446 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232994AbhDGLJ5 (ORCPT ); Wed, 7 Apr 2021 07:09:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9AF7BB11B; Wed, 7 Apr 2021 11:09:47 +0000 (UTC) Subject: Re: [PATCH v1 0/5] percpu: partial chunk depopulation To: Roman Gushchin , Dennis Zhou Cc: Tejun Heo , Christoph Lameter , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210401214301.1689099-1-guro@fb.com> From: Vlastimil Babka Message-ID: <9da8492f-2ffb-2d4f-c937-93df28f0215a@suse.cz> Date: Wed, 7 Apr 2021 13:09:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210401214301.1689099-1-guro@fb.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/1/21 11:42 PM, Roman Gushchin wrote: > In our production experience the percpu memory allocator is sometimes struggling > with returning the memory to the system. A typical example is a creation of > several thousands memory cgroups (each has several chunks of the percpu data > used for vmstats, vmevents, ref counters etc). Deletion and complete releasing > of these cgroups doesn't always lead to a shrinkage of the percpu memory. > > The underlying problem is the fragmentation: to release an underlying chunk > all percpu allocations should be released first. The percpu allocator tends > to top up chunks to improve the utilization. It means new small-ish allocations > (e.g. percpu ref counters) are placed onto almost filled old-ish chunks, > effectively pinning them in memory. > > This patchset pretends to solve this problem by implementing a partial Really "pretends"? :) Or did you mean "attempts"?