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 DCB23C4706C for ; Tue, 16 Jan 2024 12:28:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EAE410E566; Tue, 16 Jan 2024 12:28:14 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 28ADE10E7B7; Wed, 10 Jan 2024 17:55:18 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 912EFB81DC3; Wed, 10 Jan 2024 17:55:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCE8BC433F1; Wed, 10 Jan 2024 17:55:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704909315; bh=fu4Rj/eN06CEkV5JbSMpnHawgZaPLeLIgtEFRQv1w5o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JAygTEqZWVfylCFiDRG7P1l/VNgkre3NkIa+TSKWtjTWzTjqWxGd+6jLl9JLq9Ff0 HkUiC0YShB3RTedTUqQpvGmjzfg4QuMwsAoJ/Jdw+Tb8AoAVZ2vkZw9wgCj3kSgF+j yzwcPO01+qwLDH/Y73uLhuwWnuWnal0emVdoFNiftr94w2BLYKTYdnr0oMLshOaGDd NBbRCi0am1LWayVzGsz33cPYmCO/+nX7iUneIlV6CMd6eTt5zF+47RDDPWe+BOqgei Z9rVGGi0mIBlfrbcxwOpuT5Te9ccn5QkF6yosVtLxF4wzyuFarxC28PHW4SJAiMXg/ agoDkyYabdckg== Date: Wed, 10 Jan 2024 09:55:15 -0800 From: "Darrick J. Wong" To: Christoph Hellwig Subject: Re: [PATCH 2/2] xfs: disable large folio support in xfile_create Message-ID: <20240110175515.GA722950@frogsfrogsfrogs> References: <20240110092109.1950011-1-hch@lst.de> <20240110092109.1950011-3-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240110092109.1950011-3-hch@lst.de> 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 , x86@kernel.org, Hugh Dickins , Matthew Wilcox , 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 Wed, Jan 10, 2024 at 10:21:09AM +0100, Christoph Hellwig wrote: > The xfarray code will crash if large folios are force enabled using: > > echo force > /sys/kernel/mm/transparent_hugepage/shmem_enabled > > 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 --D > --- > fs/xfs/scrub/xfile.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c > index 090c3ead43fdf1..1a8d1bedd0b0dc 100644 > --- a/fs/xfs/scrub/xfile.c > +++ b/fs/xfs/scrub/xfile.c > @@ -94,6 +94,11 @@ xfile_create( > > lockdep_set_class(&inode->i_rwsem, &xfile_i_mutex_key); > > + /* > + * We're not quite ready for large folios yet. > + */ > + mapping_clear_large_folios(inode->i_mapping); > + > trace_xfile_create(xf); > > *xfilep = xf; > -- > 2.39.2 > >