Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1906310pxb; Mon, 18 Jan 2021 03:09:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlCiipLLECAWQYZTEQvlZ+mzRXqjJfqA3OBMx8+V4ocFnf0d9RBV4gL8SU1KuVcfKjtaA2 X-Received: by 2002:aa7:c64e:: with SMTP id z14mr19170276edr.69.1610968188169; Mon, 18 Jan 2021 03:09:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610968188; cv=none; d=google.com; s=arc-20160816; b=G9CRU+roBS8JgQDcSCDPAz8ilS3jcJQgaDu6M5s4mOeqATOA9XVsY0lGKa16n5qpMV bb8onNgdrTOy0ZxnUuhHr6svLZ6Pnn1AK9qNlELCsrFrfaAhjkcb2a3WvSMvIvvyD1lE 0UvgynUOv9jwKE7W8/MiY87r1Rr3KrGJNUcWo3kH0953YkOyqwDWlP/KSjQLFMV8+A3D 4rNfIYnKqzdyF1Uz4+OrMzealIih9h+KUlFdl7hFZUhKr/6HWZNBGVTg+HHmewadIYnR JG71b9M9ME2eRn2Zgi7x4FoBryzdgAAenbGp8IcIkxz+zI42DKYdDDhnt4uEzq6ONnvk CQJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5W00mM0W2ARkZcsvoX8bcZ7IgAD13G2pd2gzEzVBUvQ=; b=o44QzWd3ZyfX/8/crQ4YKM1A/Umv1soJvpxetHpsZ3mWQ9ovULC56sc8GSrqwQHQOv NWe3llbDW6roKy1y/aRA9fvLrLeEwY3o5DylbITAlDsptDdhUr3e0Rf8pZ1xa/WXH4FP K0jFfBlAXPpN7vcxkxeXgSxEsBWFcwW++S923A814pqmBFrmUtb8Gb+WuE1xjWBy66yh 4/bkNuMnucBAKv4I5eQHOMbw8uRCLJKFr08jslfxA3rnsRfuYqM1CP+6TFyUHMAvYEO2 LFDb0q8Ea7YH2HEiRI3Eih74bMJo8rCHcZktZ87b6WlhHd0wExGSu/cLbciGNbHzaMMA /XOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="DQ/jFfa0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt22si201070ejb.256.2021.01.18.03.09.23; Mon, 18 Jan 2021 03:09:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="DQ/jFfa0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389854AbhARLFK (ORCPT + 99 others); Mon, 18 Jan 2021 06:05:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:60334 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389870AbhARLEM (ORCPT ); Mon, 18 Jan 2021 06:04:12 -0500 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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