Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp644917lqp; Wed, 12 Jun 2024 11:43:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhkTIdR66dSoXMe4OR6MDOQp6rbWuy0nGmikCma23Ycd/aDzncwTR3z9fc57NDf7lvx21krbOFgUI/a6XJeuxOmF2vufAgzqXoHZeNkg== X-Google-Smtp-Source: AGHT+IFXinW7QmyNNAHkCYxqkXaRvrzz4lhrqRzheiWXRf6pR+7VOsGb3UBxgxgAg/UgmJIjD+WO X-Received: by 2002:a05:6808:10c8:b0:3d2:2b5c:5181 with SMTP id 5614622812f47-3d23e0aec5amr2800623b6e.52.1718217806151; Wed, 12 Jun 2024 11:43:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718217806; cv=pass; d=google.com; s=arc-20160816; b=p1btpUjEtnKOQfdmmDuKPEAb4PFwJxrUUmH4e2REbNB3StMds9wKW4LYaFnzQvM5o/ UaMGfCT+dzcOLy87/6T6e2/cuu5aHjKgIqfx2Qp2Cv3o2gVhJu2CexaL3KocpG9FxL3x 75aeKbzzLPY1EF3FCY2LtzuDGvq7YPXeFmsrP4bciLXpjGtk3p4nKpVaS/tO5zQMy6hD ZstVyLGc+cxV82zx4rnGlqtCiV4mLiM6F4MkvRp1wJzcuSolUw7XaABCk7fq/xRKW5Ap 7eP/DAuJnSkT+okzn1N9XUQ+KbXGynruU8wahP9hOe430GprUZ+cdMlegKjElDRvrl18 rRYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=amAeSiLiL/5PV3oMw3RYgelQ4VzuG/TJzfRKgkx8h+U=; fh=nFx+wM9oKEZRRmDLzUJwCDQkeqQcp59dG1Nyjyc12/k=; b=VJVR6bWojUYyLtMYXwzR2zYjsR08hL7z9mLTlRwhHIGxFcwy915+degszALw9ojJKg GZMOCwkwjKzMRl5RaZLjPhFOncgxi1deJI72QkFv2orZoV6aCAlKBh2d0xejz9O8NJcI p6vH5sBxpu4MMDA94P9rvDyCWUrDkxW/mS3nf0CVgBTmH9EH7lbMjHM7SU77pLL4N2UH sR08FJL4FGmfgcr/2/+iunkmp2y6LqtJhESplZgH5MIoLkLqUx/dO/KYpUNjt92v5Y2b uYb2v5oMhgYVhzJmreojtXbjSAbxamDzb057EjHO2ShqTVPWw5sagBIZlU3SpMCDaJJH 7B3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="JSC2fm/3"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-212000-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212000-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-44038b65b24si142493031cf.606.2024.06.12.11.43.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 11:43:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212000-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="JSC2fm/3"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-212000-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212000-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 971061C21188 for ; Wed, 12 Jun 2024 17:25:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A60A1822D5; Wed, 12 Jun 2024 17:25:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="JSC2fm/3" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 9942D3209; Wed, 12 Jun 2024 17:25:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718213104; cv=none; b=cGoupNk7jFHkoptSGiAG9SthIOucSFipmplyxWgzfV7wdCBrgTZd71FOVVgcF8L1E3sSo/ZiwbgRHJlirJNp6yw/5YuYjw7ICce6cf90reRu8TKkExEMnXZXuIOIPtTVy1kpXxm3J0zDroEZ5Ctt5EAOgu6tbcGqPahw69VM9Dw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718213104; c=relaxed/simple; bh=j9Ce3yFE3sDH+2AWEO7WyDZ03Ns8tASD/cdNexiiKsI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fICQ5P5VAABrRgVArnct5Cjz4dZJFRh9kINT02DqSzQt8DSARxjHa1CL+TdTqjalTfBizgpJ+3b5jMgOJUlauwf21XLAz9RSiLNXxjWpnMPTgJ7GsUZYdbiBU0P4n34sIFk5xOsQEH0p4Vy8BC4VShbEUXPCaxtfz8h2uw9S308= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=JSC2fm/3; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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=amAeSiLiL/5PV3oMw3RYgelQ4VzuG/TJzfRKgkx8h+U=; b=JSC2fm/350AJHGVYIofS85JA6l LAB1PwbyUL7UlyrhGj6j0lN6XGLmXnNr9CehZfuT4tL4bUqAyS2HwvyrKZD/vS8o7ZGHgfP8ZVqhQ R0j+9U7YosceH9go477TzkPVw4QH3k9iRLsCKqBf554QA7Jv6FfFqVxuLytZzSNiGbSy73lYR8mZT +JHCegogZmo81skCsmDHCauhcSUov+i+itmhCvWzsbG+sPMbWn0b5ad3bdmxZ+3Wrmtts9zrfsdB+ /nr2xxTwpe/N8z5Pf4R0KLlkKXjAGQjwDt5ZJmBRwxgrPDq/mx+Lb6LIPIOynB9mgJn6n4PWkORlQ w7uQhO4A==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHRiN-0000000Ev4s-1apg; Wed, 12 Jun 2024 17:24:51 +0000 Date: Wed, 12 Jun 2024 18:24:51 +0100 From: Matthew Wilcox To: "Pankaj Raghav (Samsung)" Cc: david@fromorbit.com, djwong@kernel.org, chandan.babu@oracle.com, brauner@kernel.org, akpm@linux-foundation.org, mcgrof@kernel.org, linux-mm@kvack.org, hare@suse.de, linux-kernel@vger.kernel.org, yang@os.amperecomputing.com, Zi Yan , linux-xfs@vger.kernel.org, p.raghav@samsung.com, linux-fsdevel@vger.kernel.org, hch@lst.de, gost.dev@samsung.com, cl@os.amperecomputing.com, john.g.garry@oracle.com Subject: Re: [PATCH v7 03/11] filemap: allocate mapping_min_order folios in the page cache Message-ID: References: <20240607145902.1137853-1-kernel@pankajraghav.com> <20240607145902.1137853-4-kernel@pankajraghav.com> 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: <20240607145902.1137853-4-kernel@pankajraghav.com> On Fri, Jun 07, 2024 at 02:58:54PM +0000, Pankaj Raghav (Samsung) wrote: > +/** > + * mapping_align_start_index() - Align starting index based on the min > + * folio order of the page cache. _short_ description. "Align index appropriately for this mapping". And maybe that means we should call it "mapping_align_index" instead of mapping_align_start_index? > + * @mapping: The address_space. > + * > + * Ensure the index used is aligned to the minimum folio order when adding > + * new folios to the page cache by rounding down to the nearest minimum > + * folio number of pages. How about: * The index of a folio must be naturally aligned. If you are adding a * new folio to the page cache and need to know what index to give it, * call this function.