From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19814C47077 for ; Tue, 16 Jan 2024 12:28:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE05710E52B; Tue, 16 Jan 2024 12:28:12 +0000 (UTC) Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29E7010E9D7; Fri, 12 Jan 2024 02:22:55 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 116E2CE20CC; Fri, 12 Jan 2024 02:22:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CE15C433C7; Fri, 12 Jan 2024 02:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705026171; bh=tyTBV9IdekZEBA9xRLni4pD40DGjP3N58wftXn8ECG4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YKNsFv9kgq5yYP/cIwrMz0dnUCYFA0JwvReXfKnhB6RchpvGmsAMX2ImUNInYSbgy 0MlIM5a6ChjbnWvGg/mMwr0MziKA+O4JdGkHyAFKZ6wqINFKUcPz/BfJ3s2YVBCCsl uDY11gr6C0B9G2Pw3NkDcWFKHJJmOnl8QaplWAE4dD+btdy8IedQvLy+g81SjRzopZ tP9ybX81j0pP7w+ZLI8qhv7/NhA9rS/yGXioHOISF+2caZdUoPDJ+RFG3KbrXsGD5z UDXQeHGHZd8y+6eHOCw2cgsZcDpl2uqRxVBJFnqHlNqe6+44bi3i9FKpv2pIo0+eMs xiRW06EpYwf1A== Date: Thu, 11 Jan 2024 18:22:50 -0800 From: "Darrick J. Wong" To: Matthew Wilcox Subject: Re: [PATCH 2/2] xfs: disable large folio support in xfile_create Message-ID: <20240112022250.GU723010@frogsfrogsfrogs> References: <20240110092109.1950011-1-hch@lst.de> <20240110092109.1950011-3-hch@lst.de> <20240110175515.GA722950@frogsfrogsfrogs> <20240110200451.GB722950@frogsfrogsfrogs> <20240111140053.51948fb3ed10e06d8e389d2e@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Tue, 16 Jan 2024 12:28:11 +0000 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, David Howells , linux-mm@kvack.org, Huang Rui , David Airlie , Christoph Hellwig , x86@kernel.org, Hugh Dickins , Dave Hansen , Thomas Zimmermann , intel-gfx@lists.freedesktop.org, Maxime Ripard , Rodrigo Vivi , linux-sgx@vger.kernel.org, Jarkko Sakkinen , keyrings@vger.kernel.org, Daniel Vetter , linux-fsdevel@vger.kernel.org, Andrew Morton , Christian Koenig , Chandan Babu R Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, Jan 11, 2024 at 10:45:53PM +0000, Matthew Wilcox wrote: > On Thu, Jan 11, 2024 at 02:00:53PM -0800, Andrew Morton wrote: > > On Wed, 10 Jan 2024 12:04:51 -0800 "Darrick J. Wong" wrote: > > > > > > > Fixing this will require a bit of an API change, and prefeably sorting out > > > > > the hwpoison story for pages vs folio and where it is placed in the shmem > > > > > API. For now use this one liner to disable large folios. > > > > > > > > > > Reported-by: Darrick J. Wong > > > > > Signed-off-by: Christoph Hellwig > > > > > > > > Can someone who knows more about shmem.c than I do please review > > > > https://lore.kernel.org/linux-xfs/20240103084126.513354-4-hch@lst.de/ > > > > so that I can feel slightly more confident as hch and I sort through the > > > > xfile.c issues? > > > > > > > > For this patch, > > > > Reviewed-by: Darrick J. Wong > > > > > > ...except that I'm still getting 2M THPs even with this enabled, so I > > > guess either we get to fix it now, or create our own private tmpfs mount > > > so that we can pass in huge=never, similar to what i915 does. :( > > > > What is "this"? Are you saying that $Subject doesn't work, or that the > > above-linked please-review patch doesn't work? > > shmem pays no attention to the mapping_large_folio_support() flag, > so the proposed fix doesn't work. It ought to, but it has its own way > of doing it that predates mapping_large_folio_support existing. Yep. It turned out to be easier to fix xfile.c to deal with large folios than I thought it would be. Or so I think. We'll see what happens on fstestscloud overnight. --D