Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1042029imm; Wed, 10 Oct 2018 08:16:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV60/RUKCd1k92FQo74DFUKhCxZbMMAqcSZOmXEzMy0Z6ypqdZ9CdoKs50jJ2x+K4YohtI4XZ X-Received: by 2002:a63:5c63:: with SMTP id n35-v6mr29947221pgm.402.1539184604411; Wed, 10 Oct 2018 08:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539184604; cv=none; d=google.com; s=arc-20160816; b=k4JOJtFdMysNhpymG0KO7qpTeBZf3FaYEufCFUBMG3xY2b8DecaGWjFs5CC5/ex1E/ 9+O8m323031ZPz3vEA3iOUOoff/l7Ov5ic2OsmlZVwFPu6KqqQ76GcRxMH3qQmfJHKP4 FTNknqiJ1c9tO0gJHWGj/Kmg5UVAh4rvw1lLO3n24v3CrJllQEZH69V56y7ZmxZtPWqp eJm/w3GxY4Dt+KkfriSKRvLXeh+8mn+iIC8GcFRZtf83+y2MNYw83iE/XDEUcYTt6P5K JgXZZdaTjipMoLxyttoAzKaCQ+D7o41DZX7WBIuWLcAe6/krkEz+/N2MsGbBru9sTBuk ORuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fE4xEy53WtuGc23PB6OocrWOqKsA1Ap5tx7Zq7YRJJU=; b=L9l9HEoJlsIcqHKr3G+oWmq+2QbRac+tAIJYFi3adf7l2XMtx2wpqFKw41yQab5SM6 8njLV45ID9n3O7K649pLL4czgZRkmt6Za0+kQS7dcN4B4fhyphU9XT90G7wGumOohPYD M6NIsmN+hF7vALebGDRJL7FqXktLSjG2yDvfrFq19HbyjhdnsMKObmzsynzYYRJqCiOn gCh1Xz9IM/NKqE/NxMqq+gcB/otELLCs5fVPPn1o9eC3J0zeETrEosDjtIN4iurGBstO yULYmquScyE6eeHcKqjoKvbuPLCyosnNDIzk9W+HOtS91985t67w6Rh8YZqxopOJYUJq yEjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=dbrMdp0O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6-v6si22487770pgi.255.2018.10.10.08.16.29; Wed, 10 Oct 2018 08:16:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=dbrMdp0O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbeJJWih (ORCPT + 99 others); Wed, 10 Oct 2018 18:38:37 -0400 Received: from mail-yw1-f65.google.com ([209.85.161.65]:45127 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbeJJWia (ORCPT ); Wed, 10 Oct 2018 18:38:30 -0400 Received: by mail-yw1-f65.google.com with SMTP id v198-v6so2301283ywg.12 for ; Wed, 10 Oct 2018 08:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fE4xEy53WtuGc23PB6OocrWOqKsA1Ap5tx7Zq7YRJJU=; b=dbrMdp0OT0r7iqxHERFNmoN5KTFysoZSqg3uVsufo0QCVzq9wbVE4BUeV/9tlliYDn QH6mOzdHFPGSy8b6JpQh9dFcIqz7tOgKOWe8qV9jVFxpHHm78dglz9n4K3jima5Pk4lo AVzelP8EVPGhz5jgzz1xifzCeEt3sbtiPxfnuKIvOQ09qzDZncS68RxLkTPHmGgJJ+5U ASX7tvt06nwNOiQrtZMx1kzRzR0OD02R3JlLtxaj5fsiBT294p66a8xU/7GEidVrICmL 3b7VfFPqZHfgEH8ECWY6MbiX+iakEVx6aT6OQXVdchW7xlAxXTKbtprnLVY/JiPRHs6d Kbag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fE4xEy53WtuGc23PB6OocrWOqKsA1Ap5tx7Zq7YRJJU=; b=VD7rY6vHcL8dl1ryv2XDZ6xuMLY1PH4Jf2vPjk0+OW+cwKUBgnlDoMFOAGxYbyhUB+ 9y6CFnzx/yEIvSMBv8FMCc4O3CXx9KIeK27R5CnvlXTEDcCXkP+WfRWj9XaS2oYAqGLU O3m42il2poIKhbWYWYd4HoiqM5U/gBLdo5JdjcxdsI9aeXap94tzPk1boUMfGsq+JuCq HwTu6CBkKHFs4sk4ppJKlOb6BMN28wLA9JlrjCFF7z99MQvsTqRsrtFEfYhFpjWs+iES 48YPlFrKDb+imsXXRUAa9QedFV+1L2h6qT41QwNvt7QexWQWtE6UBIKZswEseEeU5cj8 XwPg== X-Gm-Message-State: ABuFfog2U22yvaMV6utasqktI0fSwpASf+s1GjilJzaOSusbHWhPV06U T6FffNvEjEWd4Vcycwf6ExexR0hqKeo= X-Received: by 2002:a81:7307:: with SMTP id o7-v6mr18698574ywc.183.1539184552080; Wed, 10 Oct 2018 08:15:52 -0700 (PDT) Received: from localhost ([2620:10d:c091:200::6:4a04]) by smtp.gmail.com with ESMTPSA id c5-v6sm6070471ywf.73.2018.10.10.08.15.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Oct 2018 08:15:50 -0700 (PDT) Date: Wed, 10 Oct 2018 11:15:49 -0400 From: Johannes Weiner To: Rik van Riel Cc: Andrew Morton , Rik van Riel , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Kernel Team Subject: Re: [PATCH 4/4] mm: zero-seek shrinkers Message-ID: <20181010151549.GC2527@cmpxchg.org> References: <20181009184732.762-1-hannes@cmpxchg.org> <20181009184732.762-5-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 01:03:50AM +0000, Rik van Riel wrote: > On Tue, 2018-10-09 at 14:47 -0400, Johannes Weiner wrote: > > > These workloads also deal with tens of thousands of open files and > > use > > /proc for introspection, which ends up growing the proc_inode_cache > > to > > absurdly large sizes - again at the cost of valuable cache space, > > which isn't a reasonable trade-off, given that proc inodes can be > > re-created without involving the disk. > > > > This patch implements a "zero-seek" setting for shrinkers that > > results > > in a target ratio of 0:1 between their objects and IO-backed > > caches. This allows such virtual caches to grow when memory is > > available (they do cache/avoid CPU work after all), but effectively > > disables them as soon as IO-backed objects are under pressure. > > > > It then switches the shrinkers for procfs and sysfs metadata, as well > > as excess page cache shadow nodes, to the new zero-seek setting. > > This patch looks like a great step in the right > direction, though I do not know whether it is > aggressive enough. > > Given that internal slab fragmentation will > prevent the slab cache from returning a slab to > the VM if just one object in that slab is still > in use, there may well be workloads where we > should just put a hard cap on the number of > freeable items these slabs, and reclaim them > preemptively. > > However, I do not know for sure, and this patch > seems like a big improvement over what we had > before, so ... Fully agreed, fragmentation is still a concern. I'm still working on that part, but artificial caps and pro-active reclaim are trickier to get right than prioritization, and since these patches here are useful on their own I didn't want to hold them back. > > Reported-by: Domas Mituzas > > Signed-off-by: Johannes Weiner > > Reviewed-by: Rik van Riel Thanks!