Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp496710lqs; Thu, 13 Jun 2024 17:28:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYYkFUvbvHjEKFUBNYuePk53BXlTyyoGOGEQWdFgvjNxl7CauoH0agG3J/gqsdN3eqUqHZGkXogBgQy6T5xou5XU8JfM+KwOWQrDl84Q== X-Google-Smtp-Source: AGHT+IH83jY9QcZxmozTgKnP4GYVggLx8OZHODn6BLjinEqHuZseycKhggeDwuengeV1urRaJ7oX X-Received: by 2002:a50:f692:0:b0:57c:7c44:74df with SMTP id 4fb4d7f45d1cf-57cbd6c74a0mr930031a12.29.1718324890095; Thu, 13 Jun 2024 17:28:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718324890; cv=pass; d=google.com; s=arc-20160816; b=t9/bOmnXfunbXFZKQjlABBqN5tAJGAkYTJiGoHmx34uIDOvqFayaMaXkPTpHVGAODB TZeBl99LhbWn/nCcc5vHyAhod1VVnMtsplkJThPz3M2+Tqgkl8HLnV8kvngR7joW1rK2 dqDS5d+CfBA+uXO9ovu0CW7Pmf4nL/QkcFM2ciy8hHe4gGhWZbsHCQWd8s6luAo1b1eE DRce2EQWBdB4qOZ829E8qvQZ9rd7OLelKgdbGEjt1esFz+YBjCf8OQqJkvrPkaAxSroX F0299+n+ysd+nuF/X/1Wm07EC/8fj8oRHL1VbhWPh8w3JFlCEd+rnf3axBoY4DcT5fLD Tpcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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=zszsi0/aB2A5gS3nj8dtgFtDV/ZCUUoBmBVvRLy5hi4=; fh=4JUvUf5jgjczJi9EYRUuTx67VCVGgsgZjcce6UOUaKY=; b=yPnSh/1gcy8jWloZMvGaK/Ag9B6BlYdvneY23XVV2jtvZYXO4HfdBV4isIrOfrBl6x V7M9Y18q0l5OldbpfJj2n5i0KWIcJJiBEK+b/6AsLc5x8RWe2iJofxdWu7+hAGczFME3 /mtqJuSzxfrDkiHf3IE5xDS+UUclqBy7BS2t+Jdd9rbNGTDywQ/p5zEZ6BVIR8M8BUbH 25qNEiJ5xoWooy0mfuu6xe0+7nvq7ZPlrpGNkK8qeev0d/GfLkdOcDmgXZ5YRgwXaaEb M4wzRtBx8408jcoTdI2MoODd6WV8BD8LKxbKNlwJg9ALIqKEwG/bJQUkzdvSNugDKMGL Qb+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="gHN1FKo/"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-213937-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213937-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb7447d58si1213764a12.438.2024.06.13.17.28.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 17:28:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213937-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="gHN1FKo/"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-213937-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213937-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 am.mirrors.kernel.org (Postfix) with ESMTPS id C54A41F24978 for ; Thu, 13 Jun 2024 19:39:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7728614D294; Thu, 13 Jun 2024 19:39:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="gHN1FKo/" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 39BF4134407; Thu, 13 Jun 2024 19:39:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718307585; cv=none; b=SNXuk1ToW0MRQ36ooHIruuLhMR+2c5wllG5DeINUnBJEmGMB0eS2jzkZ/nvC0xw6k94Y3brbtlfpwi0T3KohrJLOfj/TBhL/tcs2qUwOQXAMzGwrbauR7hF32xV2ZIJ1N+tnmNIY5xk/3xjW6uU7EHGGbauJbMa0bFh2mR8VEKg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718307585; c=relaxed/simple; bh=Xr1ZR0w4u2FAgkjvH5Mi9hxZ/0C28Zy328vRfJN5fEY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=trwiVtIlSETbW0ZB0i1GG12Ghot+K7Zeynwg+JVpOE1lGWIUE0iAvWwzh5QEE1Go2SmghVRImHhPKgyz2js6wkJoh2EoAW4kiju4XXoRJxDeeryvFxCB7RYD+07bWsnzryFiXdoI0edeuv/du+/ieBPcwPzefJVBtGPvghY8DOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=gHN1FKo/; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zszsi0/aB2A5gS3nj8dtgFtDV/ZCUUoBmBVvRLy5hi4=; b=gHN1FKo/gLkrKUqlWBHqnu5ICW tW5aD/4ifvUlVBvAHVylwxXEpvpguH59nQIX5H6WkFRNAcj6aR6TGR85v0cTHzvT2KQLdtR+GK0qP fRmgw6YLsUmThl/Kj9O8bJ9c9WkikVf2myaGQ0AC+cbud5Kas7Rt2Zk23eOZRFygikkg32gTOx+QJ xDbOzuShVX9VaDl6R7wJcm7vk5BygjkwJ7F5F48D0/KBW0pW3PE4W5wJ0FDsLUXA3MMZrLGY+7OVE bOYGVzvlISO1vrDkKgNhrnErMIfjOL9QiGpY9qESwtpkw4aFLKPBBohz8/DBdxlQdUoGyPo7c4OqL 8iHdTHtg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHqIG-00000000IvW-0Jyf; Thu, 13 Jun 2024 19:39:32 +0000 Date: Thu, 13 Jun 2024 12:39:32 -0700 From: Luis Chamberlain To: Matthew Wilcox Cc: David Hildenbrand , Hugh Dickins , yang@os.amperecomputing.com, linmiaohe@huawei.com, muchun.song@linux.dev, osalvador@suse.de, "Pankaj Raghav (Samsung)" , david@fromorbit.com, djwong@kernel.org, chandan.babu@oracle.com, brauner@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, hare@suse.de, linux-kernel@vger.kernel.org, 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 06/11] filemap: cap PTE range to be created to allowed zero fill in folio_map_range() Message-ID: References: <20240607145902.1137853-7-kernel@pankajraghav.com> <818f69fa-9dc7-4ca0-b3ab-a667cd1fb16d@redhat.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: Sender: Luis Chamberlain On Thu, Jun 13, 2024 at 04:40:28PM +0100, Matthew Wilcox wrote: > On Thu, Jun 13, 2024 at 08:38:15AM -0700, Luis Chamberlain wrote: > > On Thu, Jun 13, 2024 at 04:32:27PM +0100, Matthew Wilcox wrote: > > > On Thu, Jun 13, 2024 at 08:27:27AM -0700, Luis Chamberlain wrote: > > > > The case I tested that failed the test was tmpfs with huge pages (not > > > > large folios). So should we then have this: > > > > > > No. > > > > OK so this does have a change for tmpfs with huge pages enabled, do we > > take the position then this is a fix for that? > > You literally said it was a fix just a few messages up thread? > > Besides, the behaviour changes (currently) depending on whether > you specify "within_size" or "always". This patch makes it consistent. The quoted mmap(2) text made me doubt it, and I was looking for clarification. It seems clear now based on feedback the text does not apply to tmpfs with huge pages, and so we'll just annotate it as a fix for tmpfs with huge pages. It makes sense to not apply, I mean, why *would* you assume you will have an extended range zeroed out range to muck around with beyond PAGE_SIZE just because huge pages were used when the rest of all other filesystem APIs count on the mmap(2) PAGE_SIZE boundary. Thanks! Luis