From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 11 Oct 2017 08:39:59 +0100 From: Mel Gorman To: Jan Kara Cc: linux-mm@kvack.org, "Kirill A. Shutemov" , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 7/7] mm: Batch radix tree operations when truncating pages Message-ID: <20171011073959.tvajcejxho7g7zw2@suse.de> References: <20171010151937.26984-1-jack@suse.cz> <20171010151937.26984-8-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20171010151937.26984-8-jack@suse.cz> Sender: owner-linux-mm@kvack.org List-ID: On Tue, Oct 10, 2017 at 05:19:37PM +0200, Jan Kara wrote: > Currently we remove pages from the radix tree one by one. To speed up > page cache truncation, lock several pages at once and free them in one > go. This allows us to batch radix tree operations in a more efficient > way and also save round-trips on mapping->tree_lock. As a result we gain > about 20% speed improvement in page cache truncation. > > Data from a simple benchmark timing 10000 truncates of 1024 pages (on > ext4 on ramdisk but the filesystem is barely visible in the profiles). > The range shows 1% and 95% percentiles of the measured times: > > 4.14-rc2 4.14-rc2 + batched truncation > 248-256 209-219 > 249-258 209-217 > 248-255 211-239 > 248-255 209-217 > 247-256 210-218 > > Signed-off-by: Jan Kara Acked-by: Mel Gorman -- Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org