Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1142446ima; Wed, 24 Oct 2018 15:22:08 -0700 (PDT) X-Google-Smtp-Source: AJdET5dDy6WMo0dgOtzt6yZ0trk7Qw8MMmxEW6w5ay6FsC+MLGdPJdpOz1+FaDVnexTGQhrbl+dt X-Received: by 2002:a63:4c4e:: with SMTP id m14-v6mr4185553pgl.173.1540419728908; Wed, 24 Oct 2018 15:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540419728; cv=none; d=google.com; s=arc-20160816; b=JL9jQZENt1q9zrRf7W2evjHK7mRfkrpUrpMapcRW8sPXUlWjapli/xDu/I16nYgVos F8ySIUkpS5xQtJ/wLPmMfPRLLyE3oP7AzuzQ2SL/PotUuCkPKU3noA0dOp95u8XE7rSc JJaN8KOgxX3TCwBzGh8rv61C403h31b9eEqGTCv+lAxpNm8kEcRpglZy1nQKQlWnlNW/ 8BhhxmW/A3q0m+XEJ2XQSPLSijYFjChKrakw9ZIyq962Qm26DUgpx4Z3EUCm8Q1jggtB //FE8A3bZzSvznDdccmwSl9BueO28F8jjWpGA8x31qqiWg+iaLgoaM35vUFNeYHJMhGU 7tCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=CcrcEgB0PrTOiisvxAOs/8/Tx/WYCA5W4Zb/tNUMO1E=; b=DAcu1BGBzv1ULFNmcB+zvAQXJuCZ/Sdsn+NbSO/mib4X82PzoSd3s2UW+yvOTz2OP0 YZ46qOcOWq+v8KqXtJX+1i0TKY64CrMuvcZGyvl6NfhvyVJGRJ1laBjKWC+1gyGiPzTj it7pt1o+65ZgG6Q6m8xrUmGtuOXyPRrBmMuWjHUYPe+IpXxWr99g4YxpECIUr0/4wvI8 s7jtjLNxruABwld8+M4Ihn0gz31ClD8pTz1lLCw82J0tY8i4WFJJE5lbmOxJH0SRQn32 6pE8jTFz5MWCXZqdNvHspWLckTR6GCAU/E1BwTOec7RKTmu6lnmLEBpm2jef+gR/TfRm Y33A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18-v6si5629852pls.32.2018.10.24.15.21.52; Wed, 24 Oct 2018 15:22:08 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726857AbeJYGtq (ORCPT + 99 others); Thu, 25 Oct 2018 02:49:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45952 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726297AbeJYGtq (ORCPT ); Thu, 25 Oct 2018 02:49:46 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1DAD4182B; Wed, 24 Oct 2018 22:19:53 +0000 (UTC) Date: Wed, 24 Oct 2018 15:19:50 -0700 From: Andrew Morton To: Roman Gushchin Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Kernel Team , Michal Hocko , Rik van Riel , Randy Dunlap Subject: Re: [RFC PATCH] mm: don't reclaim inodes with many attached pages Message-Id: <20181024151950.36fe2c41957d807756f587ca@linux-foundation.org> In-Reply-To: <20181023164302.20436-1-guro@fb.com> References: <20181023164302.20436-1-guro@fb.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 Oct 2018 16:43:29 +0000 Roman Gushchin wrote: > Spock reported that the commit 172b06c32b94 ("mm: slowly shrink slabs > with a relatively small number of objects") leads to a regression on > his setup: periodically the majority of the pagecache is evicted > without an obvious reason, while before the change the amount of free > memory was balancing around the watermark. > > The reason behind is that the mentioned above change created some > minimal background pressure on the inode cache. The problem is that > if an inode is considered to be reclaimed, all belonging pagecache > page are stripped, no matter how many of them are there. So, if a huge > multi-gigabyte file is cached in the memory, and the goal is to > reclaim only few slab objects (unused inodes), we still can eventually > evict all gigabytes of the pagecache at once. > > The workload described by Spock has few large non-mapped files in the > pagecache, so it's especially noticeable. > > To solve the problem let's postpone the reclaim of inodes, which have > more than 1 attached page. Let's wait until the pagecache pages will > be evicted naturally by scanning the corresponding LRU lists, and only > then reclaim the inode structure. Is this regression serious enough to warrant fixing 4.19.1?