From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f66.google.com ([209.85.214.66]:39816 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935949AbeEYOV3 (ORCPT ); Fri, 25 May 2018 10:21:29 -0400 Received: by mail-it0-f66.google.com with SMTP id c3-v6so7028486itj.4 for ; Fri, 25 May 2018 07:21:29 -0700 (PDT) Subject: Re: [PATCHSET 0/3] Submit ->readpages() IO as read-ahead To: Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org References: <1527177774-21414-1-git-send-email-axboe@kernel.dk> <20180525083211.GA25442@infradead.org> From: Jens Axboe Message-ID: Date: Fri, 25 May 2018 08:21:26 -0600 MIME-Version: 1.0 In-Reply-To: <20180525083211.GA25442@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 5/25/18 2:32 AM, Christoph Hellwig wrote: > On Thu, May 24, 2018 at 10:02:51AM -0600, Jens Axboe wrote: >> The only caller of ->readpages() is from read-ahead, yet we don't >> submit IO flagged with REQ_RAHEAD. This means we don't see it in >> blktrace, for instance, which is a shame. We already make assumptions >> about ->readpages() just being for read-ahead in the mpage >> implementation, using readahead_gfp_mask(mapping) as out GFP mask of >> choice. >> >> This small series fixes up mpage_readpages() to submit with >> REQ_RAHEAD, which takes care of file systems using mpage_readpages(). >> The last two fixup ext4 and btrfs. > > What are the benefits? Any setup where this buys us anything? Any The first benefit is getting the tracing right. Before you could not see which parts where readahead in blktrace, and which parts were not. This now works fine. The second motivation is fixing an issue around big read ahead windows where a severely bogged down box takes forever to exit a task that was killed, because it's going through tons of IOs on an oversubscribed disk. We see this at FB. 4MB window, and IOs being largely non-sequential. 1000 requests on a rotating drive that takes seconds to do each one. This requires fixing on top, which can be pretty easily done as long as we acknowledge that ->readpages() is strictly for read-ahead. > setup where this actually regressed because drivers/hardware are > doing stupid things with REQ_RAHEAD? I'd sure hope not, we are using REQ_RAHEAD in various meta data related bits. But the main read-ahead was not. -- Jens Axboe