Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp200079lqp; Tue, 11 Jun 2024 21:02:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBuovbPGQZTzoh1jYMQN8Qlz19ukQE4nRpecRIdorMVQyOdVuIfyRxkumUjny99xXEPzzcLKE5CSpTtmxvWe4TEL9CwWmqJIiISHweZQ== X-Google-Smtp-Source: AGHT+IEgxiNPf1BUt536/tFk5u5z0NuljUQ1d7hHsU8lkaeNanLteh5dm9P2z9+lIrRjBa75Jujh X-Received: by 2002:a05:6a20:748b:b0:1b1:f6a9:6b0b with SMTP id adf61e73a8af0-1b8a9c967eamr1126007637.51.1718164948466; Tue, 11 Jun 2024 21:02:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718164948; cv=pass; d=google.com; s=arc-20160816; b=MTTx+rOY8b/Gumk+vtafdPLHiONhKIGsDGj3zmDaQmrhGYw/9ZZW9xCpbC1LFkEtN4 eoFdLoJCm3VXVrcgJ+XyGzZFIVacZqak7eGXg8P9AmWEaNdEGNbc/rlyVXr2TgdL+S4P gqs97Dhqj5WeieVbLTRJ8u4CXLROkxP367O8h9sdvm6PDimml1A4tyf1/9eagqGapb3Y obExWBzf/k0V1wv/Rtn96VUdJnjR4IKXnLq3Bgz7e5hRTZWM7qRGLyV8BtyZxp+tMuqS TTNR+Ou5bmFC6TfrtRifDmh6RKe3kgtbC4AjP4Y35v/wcyiHlDj9Di6NwpOCtv7T8Nra eB0w== 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=nkOCSo7h5aRzMJ1OzuX0+1j2uzglFSkAC22rmNyM+b8=; fh=yeTuUYhKPx7RD9nJjuWWiN/Ztq5JrJ5z7CLaDnOSIEM=; b=pJbRyEArUeWcfyYTlHTZgK4pRBWA/87/IM/wRvHupwnXlhEDR928OA3G/6qVbc4R0L GoJT5nazc1hEJJj4yz6bkm4xvtL93ED0UMz67KB1cJKAj8X7+6IC8c/T1eYAPOCmXQSE mTDRmu86v3FZHhCoVhCfk5IuB+C9MO1dcduHgf2UTb5eX4M9WohBfnBe4HpwNsUdRcnS O/TdxnlrtPToPuc6B1SzvwiWL5zRcA+p2bf2hRvJOgos0LlG46ldkwk6DgYQMH5JsJ7q 7nXJviKiInVQYveEYyc6IvQ9qQupt+4ZPA96zOQg8cV1Fu/n0f5sUzAKxqbJo8jYsqMr oC5g==; 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-3678-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3678-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c4a7662d39si627459a91.166.2024.06.11.21.02.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 21:02:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3678-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-nfs+bounces-3678-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3678-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 CD01E282831 for ; Wed, 12 Jun 2024 04:02:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70CA62031D; Wed, 12 Jun 2024 04:02:23 +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 E1C93111AD; Wed, 12 Jun 2024 04:02:21 +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=1718164943; cv=none; b=ga5sejzO9wdELqLsUs9RhlNjMeTcQsaLT6mqMm2el4ZwIbVqsJl4qJY7vV5Mfpu/5T41QQ3N6XgUG11JOg8hiZW2OjHAEjKU3bVI1InUY2VPXmcGJ1HXRIlUeoUeNK+xzwp5CYYc0BdbLGSH30ZrHKXs/ZvEr1kucsczwcL1ehA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718164943; c=relaxed/simple; bh=XZBIEX0qR+cjLlTgxTI6SBCB2zKryvbDl4fHNPGYWj4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NDXr9Xq7qTME4RDGsV3rNeah1CHOoaS2VmNBPvrfU8r/dSEJzNY+KI1MDEVKJ2zlye9Dh3ElQIe4ESCOPQMsT8Wy7C7Kabs4VSizAhYThai2+wZyykbrgIrV9dpIuMx1ZODKUbeorHdEdQ/VRP+i4tD/fHwEdkdaOzicTV8HeZA= 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 4EBFD68BEB; Wed, 12 Jun 2024 06:02:17 +0200 (CEST) Date: Wed, 12 Jun 2024 06:02:16 +0200 From: Christoph Hellwig To: Shaun Tancheff Cc: Christoph Hellwig , Shaun Tancheff , 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: <20240612040216.GA25886@lst.de> References: <20240527163616.1135968-1-hch@lst.de> <20240527163616.1135968-2-hch@lst.de> <8e23be47-e542-4bb8-8da7-da7801c98e42@hpe.com> <20240611161311.GA12257@lst.de> <1d87741b-7178-4791-aca2-da3ac3033552@gmail.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: <1d87741b-7178-4791-aca2-da3ac3033552@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Wed, Jun 12, 2024 at 08:41:01AM +0700, Shaun Tancheff wrote: > On 6/11/24 23:13, Christoph Hellwig wrote: > >> 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? > > I checked from 6.6 to linux-next with this patch and my ext4 VM does not boot without the opt-in. Please take a look at the definition of mapping_max_folio_size, which is called above in the quoted patch.