Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp127066pxb; Thu, 14 Jan 2021 01:30:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzEKmsyOvB9tbGPM/p8rK4xoRPni+ZUuku0cAab+29Scu4Z1odZJvE4brFDwr5aPSSca0K X-Received: by 2002:a17:906:1ed6:: with SMTP id m22mr4765432ejj.231.1610616607074; Thu, 14 Jan 2021 01:30:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610616607; cv=none; d=google.com; s=arc-20160816; b=wDkYqVMd+Mj4RLn4WsrM6WA+tcPGRL1MiUwPLVEvYb28L0TpCmb892o9AwocC+VDJ/ mp2N712K4oiUCBwyKggJiHYgWesPEUOSfWvKgEJc+VGGo337UBiaSjdL/2veG9ncC1QB CUDeNUh+qVdukVUQdCygRe7huMFAh5c+PXoH7dKE2xEJx+2XHfMGeahmuvZzJzFuZ9q2 ivoYKXVquqy1gsk6l4IvuO0y35Lkm/sQjD5SUkaIA0xiHixtXuGyLsV09g45IQP8zIef feEDDhaBs21FaAupoWSsMUFP/l/RxGtCAzgJ0Bo7sIwh7l071loU5mAfRWWwQCEiCUg8 xSQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from; bh=V2iY++IgQMWvNsF8PhpCkzKusrrdXfFzSfyTXCxtRTc=; b=xYLRkZCS/T6tvunZtetLBU80sn0q6G7aQ6bBpedJ3Wqy7W+j52nO+avIFKT+5rRn5r H1d4jAK4tKmsQxznJpDqezYPbnaesYKMBQEaEHulp9d8sXPBxgao/jmofdMw0IKXKBF0 p6RrnEaPnjT/RrWJKO/sRDOl7NGGzf+EF64pUaQu+6fd2+NUbOsxMajXsBKoPRBdQhkt TJrD4pVBmIyJpvXeAdtHnPZVYHD2Y3tV4yYFf+YJOGahdElAP5X6Oo66MLgbdPS/vCgH 12uR9xYQQBiX3sCE52LWmdKj7Hf89qS96yY/8wYJgDxHjdUQKXs0+WrEaZJEFMNz2pGx h7Lw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si2573357edv.392.2021.01.14.01.29.43; Thu, 14 Jan 2021 01:30:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727965AbhANJ2W (ORCPT + 99 others); Thu, 14 Jan 2021 04:28:22 -0500 Received: from mx2.suse.de ([195.135.220.15]:60614 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727767AbhANJ2W (ORCPT ); Thu, 14 Jan 2021 04:28:22 -0500 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.