Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp571617pxf; Wed, 17 Mar 2021 10:43:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpuAvsuyTXfOZ3idBwv0SmKuQkGMnhunbHWcpJrSbR+jq+uvvbuhPKDAnFZDVltlCNj3zm X-Received: by 2002:a17:906:b0d8:: with SMTP id bk24mr37642488ejb.252.1616003025898; Wed, 17 Mar 2021 10:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616003025; cv=none; d=google.com; s=arc-20160816; b=TDaj2h9qi2TfoVW2JlTMFXF+OeksiaS9WnA/WJ9if4uQHaWQwDEK/K4kwiQNpz9Vew D4Vu/HqksHOCcku8MEF1XdXPirbiKvsCyih4/y++O0kvQLV5ZtCm5a9chvXmav/8h8z5 FxVbY1X/h9p1xl/FU7Ypxd38ZoFFlY6kdrclTZT3GI2fv0wJXuJtTSdMBwfD5ayieWI0 k85jTjY8DfwV30F42gZs5MgM99JypBWZ3VfVy66PXtOPAsxROljwCctO7wmbjfczOYLy 62VhofXLJ/v/hMstjXPWAr5WZCkeBdr/a1pARpKZU9uGvmOft+0UgPwmfndtA0lGNK2c gIvQ== 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=FpOCNlGLmjPJhj1fuEhys0yX7aI4LJ/EMSq9Vu3moFY=; b=t9eiqVzvz+NKCMlx9pI/gJ5TaicLQ8CCi4u7EQMQkEse7uFDt8n9iNbdxUAYOCLAjk 1I7rAB2AOuRT7hTUNxlWw6ZHdgT0Y2Hl8Ca33/5QpsWV455+qtc1ILD+0EIVpyWoOzoJ meego0RBuaR+Ne5mBHvPeo/3BjJ42hLTt2y+i82Ud4kRad7Tv9C/ahkoCzZX085gunGD aVeDERKh6om1MahnMG6IFxUAsio/KBRvOp+nkC0NgGnoadgzNKN3eUux5r/1WVXx7x8q /z0t9GiCXt1PIbINilH1WGHRUp38aXk24hxOihX+lDLB2qiM6PtQx/JWQZhlQiqD9GC1 QoDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=YU2gItud; 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 ds18si10248036ejc.311.2021.03.17.10.43.22; Wed, 17 Mar 2021 10:43:45 -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=YU2gItud; 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 S229814AbhCQRmO (ORCPT + 99 others); Wed, 17 Mar 2021 13:42:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230456AbhCQRlk (ORCPT ); Wed, 17 Mar 2021 13:41:40 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7EF0C06174A; Wed, 17 Mar 2021 10:41:39 -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=FpOCNlGLmjPJhj1fuEhys0yX7aI4LJ/EMSq9Vu3moFY=; b=YU2gItud2sL1cw1Aifsrz1cFpx M7bWLZmF+tboQztj/Zh+aIVLRPi1m2GCah9bRmtWuVRVrWqlP0sUPputrC/aLG/Gr4r6uF29IOEK5 CAL1s3NCbKweYs8w6YMs5l9s/BR8ZbbL8XEMfFf0rsyMP/DKC7UvspJmyjjdxhuiSaihKzSRHHQzC B8WZSReKQV/hT5olM/1BrQ4k2ARZObnJrh2ngxkNpHEtNWSGOBLglVx4z+hKynhenZASHrPk7wgA6 PmX96g67cBy3B8kVncSsdTMOr8TMBApSZ2CLcMayaW1ytF10mPGkjU83wdEG7bF0qIoJ/JMoDwgfC mM6IePaA==; Received: from 089144199244.atnat0008.highway.a1.net ([89.144.199.244] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lMaAh-001vdy-FG; Wed, 17 Mar 2021 17:41:29 +0000 Date: Wed, 17 Mar 2021 18:39:16 +0100 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v4 20/25] mm/filemap: Convert wait_on_page_bit to wait_on_folio_bit Message-ID: References: <20210305041901.2396498-1-willy@infradead.org> <20210305041901.2396498-21-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210305041901.2396498-21-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + if (FolioWriteback(folio) && > + wait_on_folio_bit_killable(folio, PG_writeback) < 0) > return VM_FAULT_RETRY; This really screams for a proper wait_on_page_writeback_killable helper rather than hardcoding the PG_* bit in a random file system. It also seems to have missed the conversion to a while loop in wait_on_page_writeback. Also this patch seems to be different in style to other by not for now always using page wrappers in the file systems. Not that I really care either way, but it seems inconsistent with the rest. > /* > - * This is exported only for wait_on_page_locked/wait_on_page_writeback, etc., > + * This is exported only for wait_on_folio_locked/wait_on_folio_writeback, etc., > * and should not be used directly. > */ > -extern void wait_on_page_bit(struct page *page, int bit_nr); > -extern int wait_on_page_bit_killable(struct page *page, int bit_nr); > +extern void wait_on_folio_bit(struct folio *folio, int bit_nr); > +extern int wait_on_folio_bit_killable(struct folio *folio, int bit_nr); Well, the above code obviously ignored this comment :( Maybe an __ prefix is a bit more of hint?