Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1038182lqt; Tue, 19 Mar 2024 10:52:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW1cegPM5sMTPcEOzbAw9G63vNc8AoPFwIwFUqFW/CV2G4KeE91qgyeEZ8Kxp98b/VEK1SejHYEXkQ35y+O4kjZFbP3QivLek7U+L74zw== X-Google-Smtp-Source: AGHT+IGWGgWtR/4Ji6erL9aQejOxXbwoD0bhBKru07+f2mMA9TmqeKRNuDwIel2a8N95EM+d3m2R X-Received: by 2002:a17:903:1c9:b0:1de:f32d:f5ba with SMTP id e9-20020a17090301c900b001def32df5bamr15535128plh.42.1710870743855; Tue, 19 Mar 2024 10:52:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710870743; cv=pass; d=google.com; s=arc-20160816; b=xRoYHiyfgQKvwNZh5WtcD2vTtsw0e53PTf8LtsCsZPHUVetpCZ1Ci+b+nSVVPEFR24 5HxbS85lO+6H8uxozMP+D+5TKYu2gJUp+Prgr2RVn7bkgzPzdar5nib59NMm3totfHz+ UY2dX6UJtPZyWoZWAQrC04PwRgTgDvSakr939Y8e/OFITqRo1L4sb0uxb6zo+jPbdTh7 nKbPYW7Pku36CdNhOfrY3oty82XLKtt5o0NWIbp85cV6g0KQx6I/I4xP3zlJLai+C41G WOroubs/JlNJ4MB2JwjHn0EfgVvwBxIh+6SjujvJuOpEhZQsUGPz3z65IAIVuOLn4+v2 ZD4A== 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=V0SBy7Ck4tFXpJEBaySgBj+pOkXYLCrjbnWaEi08VzU=; fh=/CXW8othc9vUVuQUIDldUW1M5KhzEsnAKgjh+tGIJew=; b=GQ7kk0MFpWW4Z2OBdAyTgslbOmIkzgxMxZwoJr+V15eBeJqXt/kKdMD2DtqKfycVVV 3zs4UsFqsJFoblDLnNOlmedHPXRJKWwD4DnUK75RWA06qwwD/UdCzLz1og4GWufZRj0E 8pJgvTMtEsW8Bho2mO58vC9fk45YcldbNUHTzsnHOVyUeAolpyqoTaopQdx4V+EilFQt TKVa/uqSwR9QHb8596I1TEp+mzcryRXrP/5LYqUwFi5q4FRxC74odA9KwLUULI4175rD S7q++0g+zShydPleml1J2iIjDQOHwXd3lu0lZEH6ZHKdqML7GJ++SxRgCVpT7x3VvfyZ AmRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=LJttsfsk; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-107864-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107864-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u10-20020a17090282ca00b001dd8be49c72si11171956plz.292.2024.03.19.10.52.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 10:52:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107864-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=LJttsfsk; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-107864-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107864-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 682ABB2485A for ; Tue, 19 Mar 2024 16:48:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF9CB107B2; Tue, 19 Mar 2024 16:48:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="LJttsfsk" 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 1E0E3208A1 for ; Tue, 19 Mar 2024 16:48:08 +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=1710866890; cv=none; b=hZaiekfY/WE5Jl3N6uV0F5yYG8aejCGgIMKbmrASDkE2aPSQzidO3+1YE+XJP4il+qj5XrcKo4tS9E9MoyZCmyYIS4dLFIfid2TJDJFZhlRRyAU0dFePg8B+aoETVuc3DpFXGYQ4H6K5BfdkwOmYMWDh/6jusiovUWg4OXw5jGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710866890; c=relaxed/simple; bh=9pjVQ10M/8aXW/FknymC3twMMiIlNIpq1dAY7tnn1bg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rIPBhJgRxYyO4jjR1v/c+zdL2AZVOgwZKGbByNOTE2TcapfZYTWCWPGqJbz383j6TDiE4YfOosMxTjHBdqb2VntzxH/bK3n8mYGuUxjJsdDWqzJ/uiC3YfrqhVC5Q4rOAi1Ja5qyuSQBxirLAX/iof7DpFgKPcyJLy9K8xO1f/M= 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=LJttsfsk; 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=V0SBy7Ck4tFXpJEBaySgBj+pOkXYLCrjbnWaEi08VzU=; b=LJttsfskNs00fcnL0LgG1jB0L7 iVg5ZWYK6v7D9MxeDFhiNq+xVqA8/QtmSqnqvmJC/e6foEa1JhM0Db6tcmPI/JPkp7jDW+yOTPWMn WilAJqWRKvQIZAkq/Q4p8kUlJZ2LmzFoAg3qBpriJ4DTo+kpUbVOD8N10ZVpCfOL8iYtEF7mC1bDj 9huXxDkp5hlugXLcwrpQtM7b43tZU7AselHCO3weExvnt08EY+hfPzSbgmJqDhoeU0OceGQbDzFFm ZYTYMdtbLWWnF8zlY8cKhuL2HH4ceArXYmy5MC6HfDKq8Modl2owyL8MqnMC51LmraH9342/Ypyzx E3zTsdOg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmcd9-00000002KxF-0cSH; Tue, 19 Mar 2024 16:48:03 +0000 Date: Tue, 19 Mar 2024 16:48:03 +0000 From: Matthew Wilcox To: Kairui Song Cc: linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] mm/filemap: clean up hugetlb exclusion code Message-ID: References: <20240319092733.4501-1-ryncsn@gmail.com> <20240319092733.4501-3-ryncsn@gmail.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: <20240319092733.4501-3-ryncsn@gmail.com> On Tue, Mar 19, 2024 at 05:27:31PM +0800, Kairui Song wrote: > From: Kairui Song > > __filemap_add_folio only has two callers, one never passes hugetlb > folio and one always passes in hugetlb folio. So move the hugetlb > related cgroup charging out of it to make the code cleaner. > > Signed-off-by: Kairui Song Ah; excellent. I once had a patch along these lines, but it never made it in. Happy things got refactored to the point where it's now easy, and mildly annoyed at myself that I hadn't spotted it yet. Acked-by: Matthew Wilcox (Oracle) (I'm acking these on the assumption that Andrew's just going to take them; I can collect them myself if that makes anybody else's life easier)