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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9FCCC4338F for ; Sun, 15 Aug 2021 10:54:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8311D61042 for ; Sun, 15 Aug 2021 10:54:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237487AbhHOKys (ORCPT ); Sun, 15 Aug 2021 06:54:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231596AbhHOKyn (ORCPT ); Sun, 15 Aug 2021 06:54:43 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAB8EC061764; Sun, 15 Aug 2021 03:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BPpQnC+2U721SzsLqmKDnAhfH5B8tesCsHy+xocU1F0=; b=uPCnuqIVC7EMq+U9nIXh1InckD RvEC4JUXgEZRkbPhnQjM475xx+aRmSPe1qS4HuYil7vHWaR5WuBJYGKrtztsBr/jCSb8QyqC3yzTu 0nmS8ZEDGTSkpCehVEs1HdrfyZHJ8vIOSg2NDcaA1Y0JW96c3ggaYwnaesE7lYjAmbAMDR+MBim5G TIJciqqzbed/O4pXdzYDbF37vq7PAisuhun+4kbNF0A7hshjyX//SeGQ1fze/L4PMYMGA2wBQzOoc /yD8B2hPI98JIdjz0RRxZDtrEF330DjoPauoosVisalNpp8Fjvl3hR3WCySPAwdYSmIq3hVhG9QtZ jIq6IU9Q==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFDmB-0005BS-Pt; Sun, 15 Aug 2021 10:54:06 +0000 Date: Sun, 15 Aug 2021 11:53:59 +0100 From: Matthew Wilcox To: Vlastimil Babka Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH v14 072/138] mm/writeback: Add folio_account_cleaned() Message-ID: References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-73-willy@infradead.org> 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-kernel@vger.kernel.org On Thu, Aug 12, 2021 at 06:14:22PM +0200, Vlastimil Babka wrote: > On 7/15/21 5:35 AM, Matthew Wilcox (Oracle) wrote: > > Get the statistics right; compound pages were being accounted as a > > single page. This didn't matter before now as no filesystem which > > supported compound pages did writeback. Also move the declaration > > to filemap.h since this is part of the page cache. Add a wrapper for > > Seems to be pagemap.h :) Ugh, right. filemap.c. pagemap.h. obviously. > > + wb_stat_mod(wb, WB_RECLAIMABLE, -nr); > > + task_io_account_cancelled_write(folio_size(folio)); > > In "mm/writeback: Add __folio_mark_dirty()" you used nr*PAGE_SIZE. Consistency? We don't have any ;-) I'll change that. Some places we use << PAGE_SHIFT, some places we use * PAGE_SIZE ... either are better than calling folio_size() unnecessarily.