Message ID | 20240103091423.400294-2-peterx@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-15316-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp4911113dyb; Wed, 3 Jan 2024 01:16:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmlmUvWFq+9D02Lk0vQxBIYpfYmxAhBKb2VzmFEaO2Toc+krtybdQne7EY20eBi9bgXRRk X-Received: by 2002:ad4:5ccc:0:b0:67f:47e9:fd07 with SMTP id iu12-20020ad45ccc000000b0067f47e9fd07mr33342220qvb.25.1704273367231; Wed, 03 Jan 2024 01:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704273367; cv=none; d=google.com; s=arc-20160816; b=0YmOP+eKMjRVYcZrGDyuAu03Mc3YSF35+0hJ1GLa7mT32l5TK/THxcqImfiESMrFqM ceIRhZUtJrERWWM2Vn4LO+fLSz2vot2z1ijf6DELKQ0jciSl5x2CADHlwYkaNpu6xtkN lpG7kl3hwXCDti8CV/mvzocEaXet81I9BxUy8B28W4ICEbOAxklOqheUUKmxTWU4LECL Bk8Mv1+be85vuzp+9EQugxHbohXoImG4P+2amMzGmHL7qocn1BVsjtzHDDnw7jWLCz1G d/VixipHgbNnK6BsYJb5DRRaByfdJqptLZijRd7WiiO21Idzf9KEugXr9JyNAOK2JebX XC/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=YJJA5xKvoSxf1aIwLnbJbk4H1JjSjqj4D+JMLQtFT+4=; fh=JvQ3nGflNTIwPBfhSW2OJAIjHOHR+R1SiFkwzYoQoWY=; b=OAlavCwBl4RzjTNJInCUJ8hpEJG0XuSNVJxgyiMdeQRYXDKVUb22+x24qrn8vdc6cl Ayxda0zK5Kb8To7QzOuseft451L/zz0CD595FDE1njUYKJnSwtPvROdgFu5+YJ7NQvYb 7g4Z2Xy4tMPmAkU2MCyxwyd0Q09DqIkOdUeExeJxbaYOz5okLp8noC5a8JmmuUjsaVXO N3QhaIiDv17wl0sqb7Et34tNTkyQuukeV7mYCUEtH11pKBrD3NYG1lUw5dm9YToeNiGn YDxpf/dssWP3fxdmpGWX/Qp7Ds05ldMBdanOx/9uU8UihJ5rCfKpZi2sZm3hVNUHwALL qPSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CeYPuBwx; spf=pass (google.com: domain of linux-kernel+bounces-15316-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15316-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r3-20020a0cc403000000b0067f38d1c2a6si28945397qvi.391.2024.01.03.01.16.07 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 01:16:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15316-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CeYPuBwx; spf=pass (google.com: domain of linux-kernel+bounces-15316-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15316-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 035481C23099 for <ouuuleilei@gmail.com>; Wed, 3 Jan 2024 09:16:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85E6B18E08; Wed, 3 Jan 2024 09:15:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CeYPuBwx" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 7A09218C1A for <linux-kernel@vger.kernel.org>; Wed, 3 Jan 2024 09:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704273300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YJJA5xKvoSxf1aIwLnbJbk4H1JjSjqj4D+JMLQtFT+4=; b=CeYPuBwxAtl9j2+v6pIK0Wz0WCD14dkeoviaOo1ld+BPzhWCeRklgHiqIH/eOuRP9M+8IZ j9WU8CqvEu0/Fy+5oalpUNqUvEufofMyXPJlLTQNEjjKIPLaVWRxKHms1iJvwTw+LvvUEB aZmWCkRhFrbLNXgYqBXIw276znxG33U= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-173-O3owD6t5PRKmlxLnlxARAQ-1; Wed, 03 Jan 2024 04:14:53 -0500 X-MC-Unique: O3owD6t5PRKmlxLnlxARAQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E7E9B87DC02; Wed, 3 Jan 2024 09:14:51 +0000 (UTC) Received: from x1n.redhat.com (unknown [10.72.116.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40971492BE6; Wed, 3 Jan 2024 09:14:39 +0000 (UTC) From: peterx@redhat.com To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: James Houghton <jthoughton@google.com>, David Hildenbrand <david@redhat.com>, "Kirill A . Shutemov" <kirill@shutemov.name>, Yang Shi <shy828301@gmail.com>, peterx@redhat.com, linux-riscv@lists.infradead.org, Andrew Morton <akpm@linux-foundation.org>, "Aneesh Kumar K . V" <aneesh.kumar@kernel.org>, Rik van Riel <riel@surriel.com>, Andrea Arcangeli <aarcange@redhat.com>, Axel Rasmussen <axelrasmussen@google.com>, Mike Rapoport <rppt@kernel.org>, John Hubbard <jhubbard@nvidia.com>, Vlastimil Babka <vbabka@suse.cz>, Michael Ellerman <mpe@ellerman.id.au>, Christophe Leroy <christophe.leroy@csgroup.eu>, Andrew Jones <andrew.jones@linux.dev>, linuxppc-dev@lists.ozlabs.org, Mike Kravetz <mike.kravetz@oracle.com>, Muchun Song <muchun.song@linux.dev>, linux-arm-kernel@lists.infradead.org, Jason Gunthorpe <jgg@nvidia.com>, Christoph Hellwig <hch@infradead.org>, Lorenzo Stoakes <lstoakes@gmail.com>, Matthew Wilcox <willy@infradead.org> Subject: [PATCH v2 01/13] mm/Kconfig: CONFIG_PGTABLE_HAS_HUGE_LEAVES Date: Wed, 3 Jan 2024 17:14:11 +0800 Message-ID: <20240103091423.400294-2-peterx@redhat.com> In-Reply-To: <20240103091423.400294-1-peterx@redhat.com> References: <20240103091423.400294-1-peterx@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787060150428975946 X-GMAIL-MSGID: 1787060150428975946 |
Series |
mm/gup: Unify hugetlb, part 2
|
|
Commit Message
Peter Xu
Jan. 3, 2024, 9:14 a.m. UTC
From: Peter Xu <peterx@redhat.com> Introduce a config option that will be selected as long as huge leaves are involved in pgtable (thp or hugetlbfs). It would be useful to mark any code with this new config that can process either hugetlb or thp pages in any level that is higher than pte level. Signed-off-by: Peter Xu <peterx@redhat.com> --- mm/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
Comments
On Wed, Jan 03, 2024 at 05:14:11PM +0800, peterx@redhat.com wrote: > From: Peter Xu <peterx@redhat.com> > > Introduce a config option that will be selected as long as huge leaves are > involved in pgtable (thp or hugetlbfs). It would be useful to mark any > code with this new config that can process either hugetlb or thp pages in > any level that is higher than pte level. > > Signed-off-by: Peter Xu <peterx@redhat.com> > --- > mm/Kconfig | 3 +++ > 1 file changed, 3 insertions(+) So you mean anything that supports page table entires > PAGE_SIZE ? Makes sense to me, though maybe add a comment in the kconfig? Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Jason
On Mon, Jan 15, 2024 at 01:37:37PM -0400, Jason Gunthorpe wrote: > On Wed, Jan 03, 2024 at 05:14:11PM +0800, peterx@redhat.com wrote: > > From: Peter Xu <peterx@redhat.com> > > > > Introduce a config option that will be selected as long as huge leaves are > > involved in pgtable (thp or hugetlbfs). It would be useful to mark any > > code with this new config that can process either hugetlb or thp pages in > > any level that is higher than pte level. > > > > Signed-off-by: Peter Xu <peterx@redhat.com> > > --- > > mm/Kconfig | 3 +++ > > 1 file changed, 3 insertions(+) > > So you mean anything that supports page table entires > PAGE_SIZE ? Yes. > > Makes sense to me, though maybe add a comment in the kconfig? Sure I'll add some. > > Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Thanks for your reviews and also positive comments in previous versions, Jason. I appreciate that. I'm just pretty occupied with other tasks recently so I don't yet have time to revisit this series, along with other comments yet. I'll do so and reply to the comments / discussions together afterwards.
diff --git a/mm/Kconfig b/mm/Kconfig index cb9d470f0bf7..9350ba180d52 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -904,6 +904,9 @@ config READ_ONLY_THP_FOR_FS endif # TRANSPARENT_HUGEPAGE +config PGTABLE_HAS_HUGE_LEAVES + def_bool TRANSPARENT_HUGEPAGE || HUGETLB_PAGE + # # UP and nommu archs use km based percpu allocator #