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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 20577C282CA for ; Tue, 12 Feb 2019 23:35:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE19C222BE for ; Tue, 12 Feb 2019 23:35:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732034AbfBLXfx (ORCPT ); Tue, 12 Feb 2019 18:35:53 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39280 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729686AbfBLXfx (ORCPT ); Tue, 12 Feb 2019 18:35:53 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 82D8DE138; Tue, 12 Feb 2019 23:35:52 +0000 (UTC) Date: Tue, 12 Feb 2019 15:35:51 -0800 From: akpm@linux-foundation.org To: stable@vger.kernel.org, riel@surriel.com, mhocko@kernel.org, linux@stwm.de, guro@fb.com, dairinin@gmail.com, dchinner@redhat.com, akpm@linux-foundation.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 1/6] Revert "mm: don't reclaim inodes with many attached pages" Message-ID: <20190212233551.U_YTW%akpm@linux-foundation.org> User-Agent: s-nail v14.9.6 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dave Chinner Subject: Revert "mm: don't reclaim inodes with many attached pages" This reverts a76cf1a474d7d ("mm: don't reclaim inodes with many attached pages"). This change causes serious changes to page cache and inode cache behaviour and balance, resulting in major performance regressions when combining worklaods such as large file copies and kernel compiles. https://bugzilla.kernel.org/show_bug.cgi?id=202441 This change is a hack to work around the problems introduced by changing how agressive shrinkers are on small caches in commit 172b06c32b94 ("mm: slowly shrink slabs with a relatively small number of objects"). It creates more problems than it solves, wasn't adequately reviewed or tested, so it needs to be reverted. Link: http://lkml.kernel.org/r/20190130041707.27750-2-david@fromorbit.com Fixes: a76cf1a474d7d ("mm: don't reclaim inodes with many attached pages") Signed-off-by: Dave Chinner Cc: Wolfgang Walter Cc: Roman Gushchin Cc: Spock Cc: Rik van Riel Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton --- fs/inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/fs/inode.c~revert-mm-dont-reclaim-inodes-with-many-attached-pages +++ a/fs/inode.c @@ -730,11 +730,8 @@ static enum lru_status inode_lru_isolate return LRU_REMOVED; } - /* - * Recently referenced inodes and inodes with many attached pages - * get one more pass. - */ - if (inode->i_state & I_REFERENCED || inode->i_data.nrpages > 1) { + /* recently referenced inodes get one more pass */ + if (inode->i_state & I_REFERENCED) { inode->i_state &= ~I_REFERENCED; spin_unlock(&inode->i_lock); return LRU_ROTATE; _