Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25258732rwd; Sun, 2 Jul 2023 13:41:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlE6PiYWZ41eCB/CBRsy0+pqUb8CxfxZ2+AY0SzzVDgH3poVnFG/eFzvNvghwgUOgF46I8U6 X-Received: by 2002:a17:902:64c8:b0:1b8:8d48:958d with SMTP id y8-20020a17090264c800b001b88d48958dmr3980161pli.1.1688330470401; Sun, 02 Jul 2023 13:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688330470; cv=none; d=google.com; s=arc-20160816; b=sV6FXn9idlAUD2s15ZGK7B89EtXDADWSywLlgX2VUatuBaZReEEo9r8OjamtP8DlQs fSgI7KW8uZDkupmEJhNZ7di1tB67EGjSc3NokVtWOM1eyGJpFezPVNM+uVL3bLWxbjjv K7NTn7WgDp5KXIW+u+ol7Ga5qWOrpVebo1rJYx0NydIhyLWHAVswtC0PS/JdC6F1+3Ss OQwvR9sYYjTj0GLeXs5j2B9ibXN6xeMy8Fh7dRG1yLyp7VnoTGOZqyEtQPGT26zJMOtz 22ONuFpHEmQE3952NIQH1aYrIfIznnNTGEzLolFfpsj9hkgbxcyxMGOi5oHEKlV2H5vv IsEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=eQQXhQBGSLLuiy6cSRGmNtgZ6nORHAjqumQMVN0WG+4=; fh=p1BoLzZ7CM8HoHwpAYwjPmNamIKtn0PyH2xk66zP0S0=; b=SfF2Ed627ojxr35lq4/5cvgL5r+GVSOhorLGA7Tos1vlJEZhtU74EU4JIonF9Ftjmf cHJJZQ/9FfSozZFi4ItT+XmK579BdCnMznORZIJqGUYojFSSwi+Lj9VjtGlz04MRgdpu c2awnQtExcUwABeXidF6cWGwWN5GyPPhRw5t7d8igsyNAZXSnspRr/+KH7j27VOKpW9A uZiCHTUq4AnAL64ZBRfL51/b1bUG9tdrMxCkm6wl9SDiztBCkzE6inXmDWXJo1HNWPFB TXfW6PRHxvpq62OkWXWbyvqrfYRT02AtGb1PJVkW+LwpluXHv+n2JGxCaVjlYCYD0SxS 2sLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=L6ait9Mx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020a17090aea1400b0025bf45ac365si10723537pjy.82.2023.07.02.13.40.51; Sun, 02 Jul 2023 13:41:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=L6ait9Mx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232627AbjGBUJC (ORCPT + 99 others); Sun, 2 Jul 2023 16:09:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231349AbjGBUIj (ORCPT ); Sun, 2 Jul 2023 16:08:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DE061BFD; Sun, 2 Jul 2023 13:07:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5C6D660C75; Sun, 2 Jul 2023 20:06:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 712D1C433C8; Sun, 2 Jul 2023 20:06:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1688328376; bh=ZJnTsXKaN6uYtJh5LC2hJdMySXlUaJO5Zc6GW+BMzyI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=L6ait9MxtGovd3rhKKKGdWJ1Lvcd6cT3sEcMdSOOn2dXu8Fg0QtVVOPzWWBu1SjWv GsFRQmnrdTZToes1uGZhEAVS5g+MBgbepJVXJHjBt+nnnNJPxuvrSV+sG/UtEasu8H O5KHOG9Xj8sy4IBL6h+7zFv+Wa4vCbnGGhIYqSqY= Date: Sun, 2 Jul 2023 13:06:15 -0700 From: Andrew Morton To: "Matthew Wilcox (Oracle)" Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jan Kara , Christoph Hellwig Subject: Re: [PATCH] writeback: Account the number of pages written back Message-Id: <20230702130615.b72616d7f03b3ab4f6fc8dab@linux-foundation.org> In-Reply-To: <20230628185548.981888-1-willy@infradead.org> References: <20230628185548.981888-1-willy@infradead.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 28 Jun 2023 19:55:48 +0100 "Matthew Wilcox (Oracle)" wrote: > nr_to_write is a count of pages, so we need to decrease it by the number > of pages in the folio we just wrote, not by 1. Most callers specify > either LONG_MAX or 1, so are unaffected, but writeback_sb_inodes() > might end up writing 512x as many pages as it asked for. 512 is a big number, Should we backport this? > Fixes: 793917d997df ("mm/readahead: Add large folio readahead") I'm not seeing how a readahead change messed up writeback accounting?