From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36002C433F5 for ; Wed, 30 Mar 2022 15:46:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348373AbiC3Prp (ORCPT ); Wed, 30 Mar 2022 11:47:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245570AbiC3Pro (ORCPT ); Wed, 30 Mar 2022 11:47:44 -0400 Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A66F3CFDC for ; Wed, 30 Mar 2022 08:45:58 -0700 (PDT) Received: by mail-qk1-x72b.google.com with SMTP id b189so16898790qkf.11 for ; Wed, 30 Mar 2022 08:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZRaeRvMSmHF9/f3VZA83L1Ad1gWgQ6AapuQZkdtChkg=; b=5E4AvSlLr39zW743+y4nmD5ONJKJkUxJilrF0KKc7IKbLynZx6oEtoSKsZn/zodPep JRpcAS7fvU67nYh7Bl6a0+/U1k+sLqFAXCo+xP+afJiAwX2/datKj4boXYza1D9NR7Tg bQAKsoj92J5yXVt2iI+6ZfDUspgtGsik+hMT3IlkR21Qaz6vN4zbliGeRUWgv+KItZNq 88piKdR5ZK65XYQ8f/a7aNmGFw0EUZ6CKyZfyxD7QRV2k7PYVJ75L31EdaKreeCLyUGT AXP/7b2wcuawlII2CKWLNeQX122a6yrXNq3/HxccoOn9CPWWRyYPM0BfnFtmBKWtoabx oEZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZRaeRvMSmHF9/f3VZA83L1Ad1gWgQ6AapuQZkdtChkg=; b=BjmwToFTKXtLSU7W/RRYCttTtLGmkV0KFQvHK2bJZxOcuIo1MeUfF+6FY7cNMwtJUe GNyJpXzNWTDDArITUZ0zGBAnZyfyV/rxJ6wuevtqjf0lD02T3iqQif/WlIXySoJRKloK 6g1qs4KEgR5/OM1FENBSCnubAcjjtotsqg+rmcdVTpT1NaNOCYEGesMeGJDaGx3Sqk/e 7/3YyHxCQn3qHmY+0j7Xb8EpqDHPX20+yTJmV408hoFQtwGMx1tjoulCVaqnohCLm60e t8ydy0GdomnHhe/6xo2MeG/yIBZClqSkWjW0zElimB3KjNgNzAu3FVf9bzeZ8GCasGrW qMKg== X-Gm-Message-State: AOAM532Fp/xwqW78NA+XaIwJi4/gNZ+GnwLHVywNm4TaC0EpF/WPpxpE WJrUKvAeHUydYliQFTxUcoPakw== X-Google-Smtp-Source: ABdhPJzL8Fzh1Kd60oS+1fKDMTEalGJpmVCe9CS5AeRl4im57Pw/IhwHXaetBACH42nIj2JrjNqN5w== X-Received: by 2002:a05:620a:484:b0:67e:16fe:3689 with SMTP id 4-20020a05620a048400b0067e16fe3689mr147904qkr.745.1648655157650; Wed, 30 Mar 2022 08:45:57 -0700 (PDT) Received: from localhost (cpe-98-15-154-102.hvc.res.rr.com. [98.15.154.102]) by smtp.gmail.com with ESMTPSA id bs32-20020a05620a472000b0067d4560a516sm11392106qkb.32.2022.03.30.08.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 08:45:57 -0700 (PDT) Date: Wed, 30 Mar 2022 11:45:56 -0400 From: Johannes Weiner To: Christoph Hellwig Cc: CGEL , axboe@kernel.dk, viro@zeniv.linux.org.uk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org, Yang Yang , Ran Xiaokai Subject: Re: [PATCH] block/psi: make PSI annotations of submit_bio only work for file pages Message-ID: References: <20220316063927.2128383-1-yang.yang29@zte.com.cn> <623938d1.1c69fb81.52716.030f@mx.google.com> <20220323061058.GA2343452@cgel.zte@gmail.com> <62441603.1c69fb81.4b06b.5a29@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Wed, Mar 30, 2022 at 06:04:08AM -0700, Christoph Hellwig wrote: > On Wed, Mar 30, 2022 at 09:00:46AM -0400, Johannes Weiner wrote: > > If you want type distinction, we should move it all into MM code, like > > Christoph is saying. Were swap code handles anon refaults and the page > > cache code handles file refaults. This would be my preferred layering, > > and my original patch did that: https://lkml.org/lkml/2019/7/22/1070. > > FYI, I started redoing that version and I think with all the cleanups > to filemap.c and the readahead code this can be done fairly nicely now: > > http://git.infradead.org/users/hch/block.git/commitdiff/666abb29c6db870d3941acc5ac19e83fbc72cfd4 Yes, it's definitely much nicer now with the MM instantiating the pages for ->readpage(s). But AFAICS this breaks compressed btrfs (and erofs?) because those still do additional add_to_page_cache_lru() and bio submissions.