Received: by 2002:a05:6a10:c7d3:0:0:0:0 with SMTP id h19csp898379pxy; Sun, 15 Aug 2021 03:55:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFFDbSDOX5C6G0758mb8R6y22KTwl1HWmwDueRnMJr7zwzL4BH2I7tKJkI6Bxr5P1jGeDx X-Received: by 2002:a17:906:7b53:: with SMTP id n19mr11081071ejo.14.1629024957590; Sun, 15 Aug 2021 03:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629024957; cv=none; d=google.com; s=arc-20160816; b=XC1Tia3df/MyYJjQhqNWNg7gWaDE6pv9A+Kr31oWXNFU/5V7qfuskwKfyaV4QEpbJI pBa/mzdCU++DokrOd/VhyYXbnircuTqqATA35HV1c3540WZw43nsXtZCuXVK5Jb0T3i9 sBGlXPVUO8iYBKuJVNNQGXVaHHJUuP2trinHjwiCKfDhMyrm+PFP/jGJn2MwEd4MtYOT tTHvSUec44k4TC72uXBz/HgUnD9JpbshMUp9jhcT4ODb02AuD8DA6kzOZEQsH/TVGxr0 5Tn7nOG1iO9FL4nfk/gc0BFnEN2QVvW95mJ8nHXefZTiFqUZIfIgffu3QTlRBF+pzg0l lynw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BPpQnC+2U721SzsLqmKDnAhfH5B8tesCsHy+xocU1F0=; b=h+fmT+1W+nQ3C6jFut5EvXUSVdeVa4LDsmLFux1mRLiSptQ8dZec/fL9dT5JoT/mDL yg4KGrEuo7X7UTbAhGTXiEcNJzadqGUixX5hp9khWUgC1BWcaN378pPAa/YMX9Osa1Z8 ewX+MNd6kE5OLO61VuTl+rPdCG1kWgWpm0Wrg+8otsqPaQHU4Z9vN82KDPt7f3GY5BCY MPf5LRdRKimrgqppXKmQ3d+cE3Ss9j2MLjZ1YopIDR+QAWtGuApdIU1jKNhA1yC+SVbS GA8ZY1wOeANumQFMsOeobFopV5lJrwlbYrQ5lh0JSSA8eDCXcfCNLHCCcovhaejg2Jtk NFHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uPCnuqIV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si7574797eds.390.2021.08.15.03.55.33; Sun, 15 Aug 2021 03:55:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uPCnuqIV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237127AbhHOKyr (ORCPT + 99 others); Sun, 15 Aug 2021 06:54:47 -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.