Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp15724rdb; Fri, 15 Dec 2023 20:51:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IF714CQeyq/g5h05BIFwcBlile+HlhOaKTocuphtJXV9WL8f8MHM6sQGrl6+ChfV9dOABPU X-Received: by 2002:a05:6a00:b54:b0:6ce:2757:7860 with SMTP id p20-20020a056a000b5400b006ce27577860mr14838078pfo.27.1702702308538; Fri, 15 Dec 2023 20:51:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702702308; cv=none; d=google.com; s=arc-20160816; b=YyYJOTslD9q13hzNblGAEpMFIbVU28gWn78+xraO5vDv+K/DNmXc6f3eGxJHP/zKTE e6cMlw6sL96Cidv4yPhUJW05VbipBobrBOuPlmioypPjroB0++HIzEb8Dm+j3xQB6pAi H5hXNfvHTnqk6xbazPXmz1dFXxzDdbl1PT7M+9OgGZRPsmluBCgwfCAD9+MbWXFje13i SPaQI1xP0TqfFxBNiAJ+PotTVB9y6kvOZpw5PoOXdwXX0suSxHzDkZVq/H8UDz0zgOzQ B97NcjpgIXSUyDJI69B+EqqNyl4ly+wxTgnQCZ6Vr736VION+wWRuTG1YjdXsd7CO2qM e2Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=F8aRBee6ofYH0thREJ1IJA30XF3fHiVnWOuxEWFzAzA=; fh=5c+9sRQZ2fgwpEaoltani6Bob6g3J8ULwFC1Reum03Y=; b=rXgZQdaVishlT+sAU1xQuE52gr1ExYtG60V7rPGLNwLlgDklJ2El8AeC0jVyrq6tD3 QS1JH05+SA78ptZvIk4wCrmIEGB9jIsOKPXqOBLG07ekUP591zsXNNmIqZyWVvTN6A+h zlEWcDfBgfW/9m08UYXHGJBsv/5zcuSmVlzP/iNPzRzxRMBcL82L0MNYDNhR2TApip+J +h9fE4QCxWEtNp0m/pofy0RZKbVyRofaBGIDq0mNheTtU8J7swaxWRu6vBiI7wpExCdN nkJMZox8zBHQ06QjXEYLhO+kqaql9nMrLSu/vfGi/dDAXoVCMzBi1G3wzmsho6uFYrXW uvDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2077-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id g22-20020aa78196000000b006ce080f6ebbsi4246870pfi.225.2023.12.15.20.51.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 20:51:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2077-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 48482B23F34 for ; Sat, 16 Dec 2023 04:51:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B29A61118E; Sat, 16 Dec 2023 04:51:35 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F0F210A0A; Sat, 16 Dec 2023 04:51:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 4DFE368B05; Sat, 16 Dec 2023 05:51:29 +0100 (CET) Date: Sat, 16 Dec 2023 05:51:29 +0100 From: Christoph Hellwig To: Brian Foster Cc: Christoph Hellwig , linux-mm@kvack.org, "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , David Howells Subject: Re: [PATCH 09/11] writeback: Factor writeback_iter_next() out of write_cache_pages() Message-ID: <20231216045128.GA9679@lst.de> References: <20231214132544.376574-1-hch@lst.de> <20231214132544.376574-10-hch@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Dec 15, 2023 at 09:17:05AM -0500, Brian Foster wrote: > + while ((folio = writeback_get_next(mapping, wbc)) != NULL) { > wbc->done_index = folio->index; > folio_lock(folio); > if (likely(should_writeback_folio(mapping, wbc, folio))) > break; > folio_unlock(folio); > } > > + if (folio) > + trace_wbc_writepage(wbc, inode_to_bdi(mapping->host)); > return folio; I posted a very similar transformation in reply to willy's first posting of the series :) I guess that's 2:1 now and I might as well go ahead and do something like that now :)