From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:36629 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728832AbeHPKy0 (ORCPT ); Thu, 16 Aug 2018 06:54:26 -0400 Received: by mail-wm0-f67.google.com with SMTP id w24-v6so3438237wmc.1 for ; Thu, 16 Aug 2018 00:57:44 -0700 (PDT) Date: Thu, 16 Aug 2018 09:57:40 +0200 From: Carlos Maiolino To: Kent Overstreet Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk Subject: Re: [PATCH 0/2] generic_file_buffered_read improvements Message-ID: <20180816075740.2gazls4q46y5rmuq@odin.usersys.redhat.com> References: <20180815232632.32548-1-kent.overstreet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180815232632.32548-1-kent.overstreet@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Aug 15, 2018 at 07:26:30PM -0400, Kent Overstreet wrote: > Small patch series to > - firstly, refactor generic_file_buffered_read enough that it can be modified > in more interesting ways without going insane, and then > > - secondly, change it to use find_get_pages_contig() to batch up the page > operations, and then copy data to userspace in a separate loop that touches > no other shared cachelines. > > I've been seeing profiles where the radix tree lookups in the buffered read path > are a shockingly large portion of the profile (around 25%, if memory serves) - > that's what this patch series is addressing. I've benchmarked small block reads > as well, performance there is unaffected or slightly improved (it's within the > margin of error). > /me didn't review the patches, but... Could you share how you benchmarked it? Despite the fact I'm curious about it, it's going to be interesting the 'proof' of such improvement. Cheers > And as a bonus, the code that was all in generic_file_buffered_read() is now > _drastically_ easier to follow and modify. I haven't done as much refactoring as > I could have, I kept as much of the structure of the old code as I could just to > make things easier on myself, but I'm still pretty happy with the result. > > Kent Overstreet (2): > fs: Break generic_file_buffered_read up into multiple functions > fs: generic_file_buffered_read() now uses find_get_pages_contig > > mm/filemap.c | 486 +++++++++++++++++++++++++++++---------------------- > 1 file changed, 273 insertions(+), 213 deletions(-) > > -- > 2.18.0 > -- Carlos