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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 1107BC433E0 for ; Mon, 18 Jan 2021 11:03:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 719B4229C6 for ; Mon, 18 Jan 2021 11:03:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 719B4229C6 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 73A868D0010; Mon, 18 Jan 2021 06:03:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E9858D0002; Mon, 18 Jan 2021 06:03:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B2818D0010; Mon, 18 Jan 2021 06:03:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id 457968D0002 for ; Mon, 18 Jan 2021 06:03:23 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 06F05180AD801 for ; Mon, 18 Jan 2021 11:03:23 +0000 (UTC) X-FDA: 77718609486.26.low40_0e12a5627548 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id CE03C1801A122 for ; Mon, 18 Jan 2021 11:03:22 +0000 (UTC) X-HE-Tag: low40_0e12a5627548 X-Filterd-Recvd-Size: 3287 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Mon, 18 Jan 2021 11:03:22 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1610967801; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5W00mM0W2ARkZcsvoX8bcZ7IgAD13G2pd2gzEzVBUvQ=; b=DQ/jFfa0hvY+5mY+nlNtharWGNqdVF2RL69jn57GiLFKG63Tci0B/zylHSGgQ3UjOYvYxU WVdNwMgP3qywcEgUX1Ihe0YrRSwlniEnZE1sbYfJRbnvkzNzqQUA2uzPG+yfuOMJsfJXeJ TS6pb4ZmNPsdBpU2aYqQfiyIrpdEKgk= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id EA071ACF5; Mon, 18 Jan 2021 11:03:20 +0000 (UTC) Date: Mon, 18 Jan 2021 12:03:19 +0100 From: Michal Hocko To: Vlastimil Babka Cc: Christoph Lameter , Jann Horn , 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 Subject: Re: SLUB: percpu partial object count is highly inaccurate, causing some memory wastage and maybe also worse tail latencies? Message-ID: <20210118110319.GC14336@dhcp22.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu 14-01-21 10:27:40, Vlastimil Babka wrote: > 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. Absolutely agreed! Partial caches are a very deep internal implementation detail of the allocator and admin has no bussiness into fiddling with that. This would only lead to more harm than good. Comparision to drop_caches is really exact! -- Michal Hocko SUSE Labs