Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp53495imj; Fri, 8 Feb 2019 14:50:09 -0800 (PST) X-Google-Smtp-Source: AHgI3IYwZQJY6XJ1zrfmVSp0/yf+TSb+vLvquE67RnmyzsV7+qnnAzPpHyAgGRSLZEkJ3FHMPuPK X-Received: by 2002:a17:902:5a5:: with SMTP id f34mr25253809plf.161.1549666209114; Fri, 08 Feb 2019 14:50:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549666209; cv=none; d=google.com; s=arc-20160816; b=F/A7y/Ofg0Dp51xlaFyMGHE/IfnTNwHWEz2uCQL5AhHgPMMrlFH9OiX8OUS+2hVA9P neMXHKBeqIHjRB6lUTCXwM5FR+YwQ29xxF/o3gxJPIYlt8icUb/chqSShWdIK5vc0fpr 8qYLzEHbTunlAEFtF6LDvCbxN+TRW7AU/VqOPBC/aO1pocTuOzw3ONAaAcFxFTHFfg/w 7GeIPf1ePU1ksEXPQb8WGZ36Q4PgjIyroTvZr+hMo1gnA9HhEOd48fLsaaoimuH10zCE TnQyEc1Gctl6kiPGOpG8hSu2zZRL/ZILMHOCnCW9iUJHS34lbveN5rrg8QtCjQQ0aruw E8Ig== 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=2lSHGXZfH4k0xznVbv6PnmIyJYLA9fItLH6w1A69cmo=; b=OjXujZZzpbKWafc1UQTBun3WZQUtP+/8tUWPu7rHhRDH2IVMQ9rFfCj5kT3LdA1i0v m134IjGEN1bKnY8ZNcRedIk4zz771Bn8xmiAVDKyNW+kZSscsHx+jVZ8R/OOuZrbcf/r 5jFtUAqGFY6fibVaP5x3j98K3TfDum6JplVuVL+GZRuXR40N5tVCksCSI7UZgHSIBsq3 pUOEB0/z2/5rs1x4iPIhDfm6MrVZU192YSjMCMC0sx36mEw5XJTsgxyN6uHwiuUrgsCl BbejULan4dchK4xOEo1clDaLwXviJPSdjW+S/dU2BGVwm9rDorcccb3neleebTYTD5Y2 8meQ== 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 r17si3115729pgh.299.2019.02.08.14.49.52; Fri, 08 Feb 2019 14:50:09 -0800 (PST) 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 S1726844AbfBHWtr (ORCPT + 99 others); Fri, 8 Feb 2019 17:49:47 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37890 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbfBHWtr (ORCPT ); Fri, 8 Feb 2019 17:49:47 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 83684C36C; Fri, 8 Feb 2019 22:49:45 +0000 (UTC) Date: Fri, 8 Feb 2019 14:49:44 -0800 From: Andrew Morton To: Jan Kara Cc: Dave Chinner , Roman Gushchin , Michal Hocko , Chris Mason , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-xfs@vger.kernel.org" , "vdavydov.dev@gmail.com" Subject: Re: [PATCH 1/2] Revert "mm: don't reclaim inodes with many attached pages" Message-Id: <20190208144944.082a771e84f02a77bad3e292@linux-foundation.org> In-Reply-To: <20190208125049.GA11587@quack2.suse.cz> References: <20190130041707.27750-1-david@fromorbit.com> <20190130041707.27750-2-david@fromorbit.com> <25EAF93D-BC63-4409-AF21-F45B2DDF5D66@fb.com> <20190131013403.GI4205@dastard> <20190131091011.GP18811@dhcp22.suse.cz> <20190131185704.GA8755@castle.DHCP.thefacebook.com> <20190131221904.GL4205@dastard> <20190207102750.GA4570@quack2.suse.cz> <20190207213727.a791db810341cec2c013ba93@linux-foundation.org> <20190208095507.GB6353@quack2.suse.cz> <20190208125049.GA11587@quack2.suse.cz> 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 Fri, 8 Feb 2019 13:50:49 +0100 Jan Kara wrote: > > > Has anyone done significant testing with Rik's maybe-fix? > > > > I will give it a spin with bonnie++ today. We'll see what comes out. > > OK, I did a bonnie++ run with Rik's patch (on top of 4.20 to rule out other > differences). This machine does not show so big differences in bonnie++ > numbers but the difference is still clearly visible. The results are > (averages of 5 runs): > > Revert Base Rik > SeqCreate del 78.04 ( 0.00%) 98.18 ( -25.81%) 90.90 ( -16.48%) > RandCreate del 87.68 ( 0.00%) 95.01 ( -8.36%) 87.66 ( 0.03%) > > 'Revert' is 4.20 with "mm: don't reclaim inodes with many attached pages" > and "mm: slowly shrink slabs with a relatively small number of objects" > reverted. 'Base' is the kernel without any reverts. 'Rik' is a 4.20 with > Rik's patch applied. > > The numbers are time to do a batch of deletes so lower is better. You can see > that the patch did help somewhat but it was not enough to close the gap > when files are deleted in 'readdir' order. OK, thanks. I guess we need a rethink on Roman's fixes. I'll queued the reverts. BTW, one thing I don't think has been discussed (or noticed) is the effect of "mm: don't reclaim inodes with many attached pages" on 32-bit highmem machines. Look why someone added that code in the first place: : commit f9a316fa9099053a299851762aedbf12881cff42 : Author: Andrew Morton : Date: Thu Oct 31 04:09:37 2002 -0800 : : [PATCH] strip pagecache from to-be-reaped inodes : : With large highmem machines and many small cached files it is possible : to encounter ZONE_NORMAL allocation failures. This can be demonstrated : with a large number of one-byte files on a 7G machine. : : All lowmem is filled with icache and all those inodes have a small : amount of highmem pagecache which makes them unfreeable. : : The patch strips the pagecache from inodes as they come off the tail of : the inode_unused list. : : I play tricks in there peeking at the head of the inode_unused list to : pick up the inode again after running iput(). The alternatives seemed : to involve more widespread changes. : : Or running invalidate_inode_pages() under inode_lock which would be a : bad thing from a scheduling latency and lock contention point of view. I guess I shold have added a comment. Doh.