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,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 C22DDC433E0 for ; Thu, 14 Jan 2021 09:27:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5EF6A23359 for ; Thu, 14 Jan 2021 09:27:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EF6A23359 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id ADE528D00CB; Thu, 14 Jan 2021 04:27:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A8E2B8D008E; Thu, 14 Jan 2021 04:27:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 97D538D00CB; Thu, 14 Jan 2021 04:27:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0120.hostedemail.com [216.40.44.120]) by kanga.kvack.org (Postfix) with ESMTP id 820AA8D008E for ; Thu, 14 Jan 2021 04:27:43 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4978B181C0A30 for ; Thu, 14 Jan 2021 09:27:43 +0000 (UTC) X-FDA: 77703853206.22.coal16_0313fff27525 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 25D8F180DEAD1 for ; Thu, 14 Jan 2021 09:27:43 +0000 (UTC) X-HE-Tag: coal16_0313fff27525 X-Filterd-Recvd-Size: 2497 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Thu, 14 Jan 2021 09:27:42 +0000 (UTC) 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 C8FA2B27D; Thu, 14 Jan 2021 09:27:40 +0000 (UTC) From: Vlastimil Babka Subject: SLUB: percpu partial object count is highly inaccurate, causing some memory wastage and maybe also worse tail latencies? To: Christoph Lameter , Jann Horn Cc: Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Linux-MM , kernel list , Thomas Gleixner , Sebastian Andrzej Siewior , Roman Gushchin , Johannes Weiner , Shakeel Butt , Suren Baghdasaryan , Minchan Kim , Michal Hocko References: Message-ID: Date: Thu, 14 Jan 2021 10:27:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 1/12/21 5:35 PM, Christoph Lameter wrote: > On Tue, 12 Jan 2021, Jann Horn wrote: > >> [This is not something I intend to work on myself. But since I >> stumbled over this issue, I figured I should at least document/report >> it, in case anyone is willing to pick it up.] > > Well yeah all true. There is however a slabinfo tool that has an -s option > to shrink all slabs. > > slabinfo -s > > So you could put that somewhere that executes if the system is > idle or put it into cron or so. Hm this would be similar to recommending a periodical echo > drop_caches operation. We actually discourage from that (and yeah, some tools do that, and we now report those in dmesg). I believe the kernel should respond to memory pressure and not OOM prematurely by itself, including SLUB.