Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp458699lqp; Tue, 11 Jun 2024 09:13:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVtoXwmCFcDN6wQg8WirBZNl6Fp79Qfah+AmO8GHgeiIT8QZj9mmmSVs44KKpaTunvdYgow3J4ZxdnloB8haHDTK+KNiOBb4fPJc7McIg== X-Google-Smtp-Source: AGHT+IFd3KGyDGIeMwImyqTm6sflpwp3G80CvbYDNkLGEcPqpfMFnkNDadpWcF/pmKJLxiIz519B X-Received: by 2002:a05:6a00:1397:b0:702:6dc7:2368 with SMTP id d2e1a72fcca58-7040c649384mr12881589b3a.12.1718122409349; Tue, 11 Jun 2024 09:13:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718122409; cv=pass; d=google.com; s=arc-20160816; b=az9WKL5Uv8YsOUdGVAHdZOTHEH8emaauoccsefA9qRngg5jY/QU90q8gOKt+D3kD4/ RHsNzhETZZFykbLrVI02jZ67/04ZLp2a0Nq1T1cr/+cTm5QbLMSyFCc2IWF4n15ZSlka jsDu0IRrlrVMjBjsQbybZoXOnb6oDDLXnzX6OHc4SLZVMesPnbyDhRuhIE3HqiHkt8Y4 KqefES35TpEKtDBCxQ1d5YX6r1UHZUY+JZIUwjWGvKPXXjw7YWHwmWDYqxarCwM55TQ4 GVMhWGavfTsU459Hsn7MllEi2Z3SlvlybYB1ha66xe42q4YqMSbK7THrAd071waG+Yda 7i0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:message-id:subject:cc:to:from:date; bh=g6XuWN1mzEX7hbzBkG7KeHloAYilIHuQbXCnb1/6tV4=; fh=AkEtE7WvF54UW6SmlJTCAYfCdx7HdQj4/5lyt5CQtH0=; b=k5LrNLbaV13YSIycphVRTvM5bSl07dOo0c/ERO+9R3hrQQwPwIPnxKBvspQQYm8AHE InVKIHf6rj2XARvR6HuWSFIEu2/ERZ0Rs59MtTDlfGBC/BY9gbj2rDNPf3XuGyv5lhzi K9RGrbMN66V8rOyzu3eYqRKnO+tHCEczqHadZ6sLs3reMxAVVFjD9B2UskwjMNbR1CFK 9WKQ0SJ7kFz57qeJ2c+61jG7H9G2AKBNt44wIpG5ivqg0hT+yUEcsc77PPtErPX8WYxo saq3EBRHM2mK/uQ5ZIdMO1nyaX7niWNRYgqkTAieM23LvoW5Wf6BCyDLJMERJtF7kGDq fB3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-nfs+bounces-3649-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3649-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-703fd55cc16si6069420b3a.302.2024.06.11.09.13.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 09:13:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3649-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-nfs+bounces-3649-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3649-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 61B0E285E0F for ; Tue, 11 Jun 2024 16:13:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A6CB3A8E4; Tue, 11 Jun 2024 16:13:26 +0000 (UTC) X-Original-To: linux-nfs@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 F1A9E42067; Tue, 11 Jun 2024 16:13:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718122406; cv=none; b=Lc1SiVjHNOD1lZ1dDsTNcbDMldb4P9hEQqQiZTr2nUOrO+E5Algpvmm5D2+VwaP0e4mQbaq+6cfpfb3qswxiPT7U18jILHOwPN3H5VRM2gW4AeDxnJAoyMJdpF1po7/e8X5eECK1KSTK057ql48rV0KorPbDE1pGys2gMXG/A98= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718122406; c=relaxed/simple; bh=tbMHWdvlPuZV3ILs1/2g8pxQ4cjE1edWyrzdSdTpf6s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CJP2TVbfkvJb8IsuAvJX5S3bCFPqsUEpzXbmjoMRTbJxeFjG9zc9hHaDp2pgEUFNv3dNcvQkV0nWwy9LlhdbzEU23/Hn1Sqy0GUIPKvK2UbRiKSlCBL/kqYIDMDAc2MUuJryK+reYJRXq31sOvg7NxZ6zAlcEcKRVuCEWPCuDJU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 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 7C5CE68BEB; Tue, 11 Jun 2024 18:13:11 +0200 (CEST) Date: Tue, 11 Jun 2024 18:13:11 +0200 From: Christoph Hellwig To: Shaun Tancheff Cc: Christoph Hellwig , Trond Myklebust , Anna Schumaker , Matthew Wilcox , linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/2] filemap: Convert generic_perform_write() to support large folios Message-ID: <20240611161311.GA12257@lst.de> References: <20240527163616.1135968-1-hch@lst.de> <20240527163616.1135968-2-hch@lst.de> <8e23be47-e542-4bb8-8da7-da7801c98e42@hpe.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8e23be47-e542-4bb8-8da7-da7801c98e42@hpe.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Jun 11, 2024 at 05:47:12PM +0700, Shaun Tancheff wrote: >> const struct address_space_operations *a_ops = mapping->a_ops; >> + size_t chunk = mapping_max_folio_size(mapping); > > Better to default chunk to PAGE_SIZE for backward compat > +?????? size_t chunk = PAGE_SIZE; > >> long status = 0; >> ssize_t written = 0; >> > > Have fs opt in to large folio support: > > +?????? if (mapping_large_folio_support(mapping)) > +?????????????? chunk = PAGE_SIZE << MAX_PAGECACHE_ORDER; I don't think you've actually read the code, have you?