Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp990359rdb; Tue, 19 Sep 2023 17:17:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKhY/1RTb28LXArgbmyij4wYJMmYIQIwTNl37AOA92mJat0h17RYG853zwyVva768LAp/1 X-Received: by 2002:a9d:6210:0:b0:6b9:6481:8e33 with SMTP id g16-20020a9d6210000000b006b964818e33mr1172215otj.13.1695169063989; Tue, 19 Sep 2023 17:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695169063; cv=none; d=google.com; s=arc-20160816; b=IORMvcJqbacVBny4h/LpccUS16MvH1SyLUpLBU6PwywtQ/3ZdBO6F++G9DdvO8QTqM VJZuCdjE0PT0kSsBqMMFQNN5wFR7tZXMOTq1yIZEuzfQUg1tRGviBd7uqdhMgCi4+rLI OvRrt/5mF2KSuTZ9JRwvLgG1Is4yHvZUaJtkXCvLw/Cd/Yk9BaAN0L3Ul1my1VRP2VKj k9O2H5C3bm6hS7moeIxFvTmi4vJOP9nEqD6q9w5BIK7BAjqmjbeuRjHtV4e6NwSvxGVv mycdqN/DMOPltmBumerBt9zfAXkWDXFI9Ti4k5eoJk7tdPBOn0MjzXknxKt5n9K2FlwN A5JQ== 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=Rtc3uem8ddiR9Ja2IfzYS5WR/DSCeWUeDjOJFAPqtE8=; fh=ardmABoZqyzAm25ow9fvqe18o8v8L1P0+Wo2I9sPHpg=; b=yHqosmh7/YawmkfKm5y2P/1Slqy0uSGKOlHII5v5A0+27KfDPMAxaPqXSLm203Nk2R gZjsAlzcIP++E9Mg3xYH7THZY8doLFsGxvdBXYfIWPwIrKqqUF0foO2EX1SjcL9AJaHs qDWq/IahU6pURgGgNX4pK9qpIUzz+XwBYUQK9byfIwMlEZ7++rZDMxQXTTiFgCUHwEzT UqynMbk0aa7DlXB1eMIULO8VrTsCQBrvvZVd5fWvRk3m+nlkCNoa8U9ZKpng3UOiR+EE 1UbfWLcykcw0Y+g5R7dp21IbB8THkN5qpcm0ignb81E7auJGEqhnkcRufYyCUiA4tlDm DBuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=vV7xzhXL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id w184-20020a6382c1000000b00578b4980785si2061178pgd.36.2023.09.19.17.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 17:17:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=vV7xzhXL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5F5298057450; Tue, 19 Sep 2023 08:01:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233019AbjISPBe (ORCPT + 99 others); Tue, 19 Sep 2023 11:01:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233004AbjISPBc (ORCPT ); Tue, 19 Sep 2023 11:01:32 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D646EC6; Tue, 19 Sep 2023 08:01:26 -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=Rtc3uem8ddiR9Ja2IfzYS5WR/DSCeWUeDjOJFAPqtE8=; b=vV7xzhXLw4nmH7SNWv9DHWcrC/ LlKLNp1Ua8UIgPvSuVGmmwt5P/Lpg6rk9yv1OSI+AINScnm40sviBiE+8TIJfpc/RzWk4TWv3bZc1 DsXCBCLTMcdQPNdhVrDCPJxszKpFwMDtX2mdHv6m88tvH5SamsV9a4jQ6DVDm8/cpRzKmMSCa9pSV 4zSaxFjFziPh+BYX+TWbVN9sn/v35CaUKuYjC4uTSyJ9Y6y/zNqaO6KjVcoGw9qPiIMW23OLVwk7/ F0l/OQWHeh8z5zWlNQW5IT6UdISh7oBL11c7j8ZYgTsL/NgXKaTsijZQDKf3CA31dkllARhW3G+Fg Hp06KLzQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qicE3-000GGV-5J; Tue, 19 Sep 2023 15:01:19 +0000 Date: Tue, 19 Sep 2023 16:01:19 +0100 From: Matthew Wilcox To: Daniel Gomez Cc: "minchan@kernel.org" , "senozhatsky@chromium.org" , "axboe@kernel.dk" , "djwong@kernel.org" , "hughd@google.com" , "akpm@linux-foundation.org" , "mcgrof@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-xfs@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "gost.dev@samsung.com" , Pankaj Raghav Subject: Re: [PATCH v2 6/6] shmem: add large folios support to the write path Message-ID: References: <20230919135536.2165715-1-da.gomez@samsung.com> <20230919135536.2165715-7-da.gomez@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230919135536.2165715-7-da.gomez@samsung.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 19 Sep 2023 08:01:42 -0700 (PDT) On Tue, Sep 19, 2023 at 01:55:54PM +0000, Daniel Gomez wrote: > Add large folio support for shmem write path matching the same high > order preference mechanism used for iomap buffered IO path as used in > __filemap_get_folio() with a difference on the max order permitted > (being PMD_ORDER-1) to respect the huge mount option when large folio > is supported. I'm strongly opposed to "respecting the huge mount option". We're determining the best order to use for the folios. Artificially limiting the size because the sysadmin read an article from 2005 that said to use this option is STUPID. > else > - folio = shmem_alloc_folio(gfp, info, index, *order); > + folio = shmem_alloc_folio(gfp, info, index, order); Why did you introduce it as *order, only to change it back to order in this patch? It feels like you just fixed up patch 6 rather than percolating the changes all the way back to where they should have been done. This makes the reviewer's life hard.