Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2466646rbb; Wed, 28 Feb 2024 02:45:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWdnou/jmmTPYMurCmojyfpcvi4tS0JM1FKBshhRT/0gEBzRj0uHRiafUNYfPQgsDyekJmwFX7RIC6D3v4BJyuW61pnHoHEncrpRJBcRw== X-Google-Smtp-Source: AGHT+IHrG5/d79vOaqRrj32zEKXNd/OlvKcnr7tvFLmt3BxbvPzbNwkn4UW/rdSoq8ON3t3fAsbm X-Received: by 2002:a05:6a21:1706:b0:1a1:e41:97a8 with SMTP id nv6-20020a056a21170600b001a10e4197a8mr4882779pzb.0.1709117141038; Wed, 28 Feb 2024 02:45:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709117141; cv=pass; d=google.com; s=arc-20160816; b=a3YDKJrEzzp6MgI1LW1R9Vi6tQVg7rddaK4996jS3Y2ldEajAgiaC2adu1+MriK/cm cMg0thLaILVc1Sh6B8/BbjBxqwL+EWhYX1ekT30nSgUOLGcouxgdV2u53fXr5FdLWWLo SJoI6m8Mx6eo4qQCOqhX1RM/XQzrIPVvwncW8qNVouZBvPZR0fDgQlgRo6ifgdlThvxN 0Uv5TcU0rKDC5dAfrZmZgoe5x8DMyTQrIBlAYnIL/N/MqbHiCuO6SJvsWpZEpKP6z24+ hgdMe4z6XlQzbiWJFIrqcT3M3XXH525DN0tvfli/kJUsjtDU8P69zvRw+MRofcgeCKAo fS4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=R5nPJc5wHy0mfNIo9LccGmQA1ipGTS8wbRwCe+Rx9QU=; fh=UOYTFBrG/n+KBA/lnLNo8c3O2GaUcdJ2cUXiZIMJ38c=; b=Pfw85BWTdfYqN7XknQY1dxH31b4Ax+vf+gx4wjcb3zxWn4BTS6oZdEwmP167HBsrzB GqSnRRNTmCoaed1pyk8WUUmBfmsSscJBm1LDuWlBEsLL3yMqb6Ae7Ymf9zQkRNtC5obY YYxGwsfCRb3+WIWikFsv46htm6ad3Kc85iQNicprC1YX7K/+RuqztEIewxaYbZY1X5O3 ZFuTF/cqVPnpZXl54ywez0XdG763IgPhBWHsSlET1NexNPbRoQva877J3BVUJSX5C06f oRrtp+qMV2BejxLsoq3cnbTRxwiw6LZoR1bLwxCLK74PuxLV8dsI6bGC+Egm1LZxgyyx VBzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RDUIKRk6; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-84833-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84833-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u16-20020a1709026e1000b001dc89fe5716si3018027plk.181.2024.02.28.02.45.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 02:45:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84833-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RDUIKRk6; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-84833-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84833-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 85296B23416 for ; Wed, 28 Feb 2024 10:32:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C48477A04; Wed, 28 Feb 2024 10:31:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RDUIKRk6" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 B7B01745FE for ; Wed, 28 Feb 2024 10:31:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709116318; cv=none; b=QqjoCTX8Lj+NQ2L0TR+5Sryd2VeXPMzroozjCLVzj5eziJA45cZaOPesSf5qvta3FbVNcUYyhp2JrUg2A3znIPIbsUAYR4uzz+RoimBz2XeMjZJ9SzLcxh9drI/X9hE90w83VUVGl9scMuzUQV01wM2BeHRgyTvBITzupRba4f0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709116318; c=relaxed/simple; bh=QtMVd8MfOkwZVeJr+7bvKB+Jv/uBDmSwr8adt/Z3VcI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ZAxdHfva/Q+rbfx4/c+ZaGf7DJ7fkjLdKtwfw6SIB9nBzYfO2ygIzZnywERpX5Wgd9Zl3asI8NNYMx/SU1bdEodPahuwpQwIDUOzh6bQL0wkyuGiWOotg0c7LfYJMnmp85u91CGhn55Hfr4WeF39pRkcS+PRSbonpTQnAPKwo2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=RDUIKRk6; arc=none smtp.client-ip=170.10.133.124 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=1709116315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=R5nPJc5wHy0mfNIo9LccGmQA1ipGTS8wbRwCe+Rx9QU=; b=RDUIKRk625lLwS6sTxrTJYTkwCrz+RPHxWyEQGVeNL8CPm2fdd7e19u8rJt1V0UXmWllkJ W1ZgdX+gqUymZxpolv4KSKaDHNT13uEpJ7Eor1DZDCtStv4XiB1G3agA3XZmbcxQKdzaP6 edWKm1hkSzgD/lOCfEqZzzk+J0BuJuk= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-302-QMICCpHSNmyyRxh0Avw1Eg-1; Wed, 28 Feb 2024 05:31:54 -0500 X-MC-Unique: QMICCpHSNmyyRxh0Avw1Eg-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-5131eb8137aso89995e87.3 for ; Wed, 28 Feb 2024 02:31:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709116313; x=1709721113; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=R5nPJc5wHy0mfNIo9LccGmQA1ipGTS8wbRwCe+Rx9QU=; b=wwA/2cBQWSwcY3ONTyWEsOx0aZmaJTzEvITWdRy9rLUSPEN1lXfbxu7M3/RhgDwy4R Xmx9zkpNEjnXnRaL9aWGZwjR6mFQXiuZLGkICh+Z2d6dlqjkz3+oqsY15GWMp1awWXo9 ixTQF/X2I/T9ZfX4zYXImibfcpifVfIadJWqDRwvDQ3gv+TpYlxAQ4twJl3Rx9dsTTMl CFhvGgbUPdZiBB1S73AUnNGvd9Zu+umlpwVJKtdpRkNDTgHH011fDJJUWLK/Yz/KQprN CNyx+vLPFdaVmzNkbSSjMHV4SRHbdi1rS3yGAWoRVRQ90aGfo2GHskiDE1nZWBLEnevG yG6A== X-Forwarded-Encrypted: i=1; AJvYcCU1qbCkB65AJ8/9oahhQOsudq9gNWlUfsW777qDpkcFpkPI1zfAEP9p0B9fbtT96LBwNsKh2cSL4JEcn0Wa7VUwIFZLble7WwChIchd X-Gm-Message-State: AOJu0Ywzqj+vcvEivDLlR8CzHRgrdhi1WtDreOhrTCvt7NLncmFCSbO2 jUwnpmLKbIUdsGCKwOtrRlE1VjqcLFdob4pXaDOCgX1Dvldgb5IJWxbySqsYbkP2Vp+vwTty6Xu AGNFLFN//jg2NHQYtubomU7LeLGuvtX7EGdU3p1+gvd4HYHpZ+N3UY3HpQtF9oQ== X-Received: by 2002:a05:6512:3d1a:b0:513:43e:e22d with SMTP id d26-20020a0565123d1a00b00513043ee22dmr3680423lfv.35.1709116312657; Wed, 28 Feb 2024 02:31:52 -0800 (PST) X-Received: by 2002:a05:6512:3d1a:b0:513:43e:e22d with SMTP id d26-20020a0565123d1a00b00513043ee22dmr3680399lfv.35.1709116311831; Wed, 28 Feb 2024 02:31:51 -0800 (PST) Received: from [10.32.64.237] (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id c2-20020a5d4142000000b0033cf453f2bbsm14023061wrq.35.2024.02.28.02.31.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Feb 2024 02:31:51 -0800 (PST) Message-ID: <75fb8bf8-f9bc-410d-8c22-f69cbf2080a9@redhat.com> Date: Wed, 28 Feb 2024 11:31:50 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 6/8] mm: page_owner: add support for splitting to any order in split page_owner. Content-Language: en-US To: Zi Yan , "Pankaj Raghav (Samsung)" , linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , Yang Shi , Yu Zhao , "Kirill A . Shutemov" , Ryan Roberts , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Roman Gushchin , Zach O'Keefe , Hugh Dickins , Luis Chamberlain , Andrew Morton , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20240226205534.1603748-1-zi.yan@sent.com> <20240226205534.1603748-7-zi.yan@sent.com> From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4Q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S3dyVRxDcDHIlmguXjC1Q5tZTwNB boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq 3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: <20240226205534.1603748-7-zi.yan@sent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 26.02.24 21:55, Zi Yan wrote: > From: Zi Yan > > It adds a new_order parameter to set new page order in page owner. > It prepares for upcoming changes to support split huge page to any > lower order. > > Signed-off-by: Zi Yan > --- > include/linux/page_owner.h | 13 ++++++++----- > mm/huge_memory.c | 2 +- > mm/page_alloc.c | 4 ++-- > mm/page_owner.c | 7 +++---- > 4 files changed, 14 insertions(+), 12 deletions(-) > > diff --git a/include/linux/page_owner.h b/include/linux/page_owner.h > index 2b39c8e19d98..debdc25f08b9 100644 > --- a/include/linux/page_owner.h > +++ b/include/linux/page_owner.h > @@ -11,7 +11,8 @@ extern struct page_ext_operations page_owner_ops; > extern void __reset_page_owner(struct page *page, unsigned short order); > extern void __set_page_owner(struct page *page, > unsigned short order, gfp_t gfp_mask); > -extern void __split_page_owner(struct page *page, int order); > +extern void __split_page_owner(struct page *page, int old_order, > + int new_order); > extern void __folio_copy_owner(struct folio *newfolio, struct folio *old); > extern void __set_page_owner_migrate_reason(struct page *page, int reason); > extern void __dump_page_owner(const struct page *page); > @@ -31,10 +32,11 @@ static inline void set_page_owner(struct page *page, > __set_page_owner(page, order, gfp_mask); > } > > -static inline void split_page_owner(struct page *page, int order) > +static inline void split_page_owner(struct page *page, int old_order, > + int new_order) > { > if (static_branch_unlikely(&page_owner_inited)) > - __split_page_owner(page, order); > + __split_page_owner(page, old_order, new_order); > } > static inline void folio_copy_owner(struct folio *newfolio, struct folio *old) > { > @@ -56,10 +58,11 @@ static inline void reset_page_owner(struct page *page, unsigned short order) > { > } > static inline void set_page_owner(struct page *page, > - unsigned int order, gfp_t gfp_mask) > + unsigned short order, gfp_t gfp_mask) > { > } > -static inline void split_page_owner(struct page *page, int order) > +static inline void split_page_owner(struct page *page, int old_order, > + int new_order) > { > } > static inline void folio_copy_owner(struct folio *newfolio, struct folio *folio) > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 5d4b7c17b9bc..b2df788c11fa 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -2933,7 +2933,7 @@ static void __split_huge_page(struct page *page, struct list_head *list, > unlock_page_lruvec(lruvec); > /* Caller disabled irqs, so they are still disabled here */ > > - split_page_owner(head, order); > + split_page_owner(head, order, 0); > > /* See comment in __split_huge_page_tail() */ > if (PageAnon(head)) { > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index c31a468fe317..cc41341c08f4 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -2652,7 +2652,7 @@ void split_page(struct page *page, unsigned int order) > > for (i = 1; i < (1 << order); i++) > set_page_refcounted(page + i); > - split_page_owner(page, order); > + split_page_owner(page, order, 0); > split_page_memcg(page, order, 0); > } > EXPORT_SYMBOL_GPL(split_page); > @@ -4839,7 +4839,7 @@ static void *make_alloc_exact(unsigned long addr, unsigned int order, > struct page *page = virt_to_page((void *)addr); > struct page *last = page + nr; > > - split_page_owner(page, order); > + split_page_owner(page, order, 0); > split_page_memcg(page, order, 0); > while (page < --last) > set_page_refcounted(last); > diff --git a/mm/page_owner.c b/mm/page_owner.c > index b678f7a6e702..033e349f6479 100644 > --- a/mm/page_owner.c > +++ b/mm/page_owner.c > @@ -306,19 +306,18 @@ void __set_page_owner_migrate_reason(struct page *page, int reason) > page_ext_put(page_ext); > } > > -void __split_page_owner(struct page *page, int order) > +void __split_page_owner(struct page *page, int old_order, int new_order) > { > int i; > struct page_ext *page_ext = page_ext_get(page); > struct page_owner *page_owner; > - unsigned int nr = 1 << order; > > if (unlikely(!page_ext)) > return; > > - for (i = 0; i < nr; i++) { > + for (i = 0; i < (1 << old_order); i++) { > page_owner = get_page_owner(page_ext); > - page_owner->order = 0; > + page_owner->order = new_order; > page_ext = page_ext_next(page_ext); > } > page_ext_put(page_ext); Acked-by: David Hildenbrand -- Cheers, David / dhildenb