Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp14888lqp; Tue, 11 Jun 2024 12:52:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW2zo2k4tzFDEKE9txcC1E+3Zmm8NjqfeU4k6kfLEqgQ8ZZ7r86fw6IvDfI4P+DFl+D1okeqqrNn5XZn2V/EC12sIvmdsZMZfIPzn9B/w== X-Google-Smtp-Source: AGHT+IGazUtA5gbIFxDWY3nfqy2xgp8M4b/79cBjwUcV4sz0gF82FkQGJhUg7zzP2lOO/x0bTrdi X-Received: by 2002:a05:6a21:788a:b0:1b6:6e1e:46cd with SMTP id adf61e73a8af0-1b86bc48d59mr5205436637.1.1718135574394; Tue, 11 Jun 2024 12:52:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718135574; cv=pass; d=google.com; s=arc-20160816; b=zbT4EgiIzoW/kLnBvSy0HiCPNgzT57xbGTWR3J4iyxjVStUcGUtf6j6OksgpFtHi9Z a1rrCeXt2UD6SMFaAY6z1fdrhgzahkUvnnnFiLWBAddldhuP0b2qamY8A+2eAuyjuCPz 7nVnI3sfNwEmLpgDc1S8CuZyvILpL+OoARi7nwkmOrGn/q4F4ETJXiU346Db/sGYJVRR jsBzi2GkHqtwK6/xrpWXkviViq8K2QuMPUTduX8b0NtfTbgVcICmeR0LmIxQ9wTwFVVL xni+zeil+YuGmLEmr3zpyxFfQ9eq3hh1d6HYFZ2IOAwu6pAIBizQDk3eTPyhJ7wHbDvo IEwA== 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 :content-language:from:references:cc:to:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=VC/FKQpyiv8QuT0prkiboQ+mv2U8+abllOC5cV7bqrg=; fh=h7AEw4WauszQ0aGokKSUrGb4k+Phzu0IFQ8e4FGute0=; b=X9sMhmaTO5T+FFK1D9CL+fEtho/tzF7m9KGrVotFm1e6UY+FySySa1yDdUv6IAIXYi su6TQDT39Bq/4Nw00wO8yZ5GAw+CLDOAy0Lw3jUulaR9VJ85lMKa3ETTU1XYgT8v+eNI t1I1/Goii+d63ILj6ZB47jjJ6LID+T9RnqWOZat+nbk3YQ+pKCpvzvF/O35EnCg37zLk MfFDxSWyWa0DxGg+tqdt4JHJDjYdAjs07XcGETXMVDh2qQ/pegqtJq1626RpTl21VSNj nPxBPt5lS5oMUquLWTgu++v19YF/O3egQo4qo4KyRlP+EjD0VumzBN640tQL07KRBWG3 rUcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="LIHd12/+"; 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-210532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210532-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e7d7a4eaf3si6576047a12.275.2024.06.11.12.52.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 12:52:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="LIHd12/+"; 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-210532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210532-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 056C5282274 for ; Tue, 11 Jun 2024 19:51:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7829215383D; Tue, 11 Jun 2024 19:51:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LIHd12/+" 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 E260B1514D8 for ; Tue, 11 Jun 2024 19:50:58 +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=1718135462; cv=none; b=THnyAKauKhR8WRs4/kPGYlrMZDIeh3L9PkaaLSEsAc73wEqjuzQ3ksjBsqGjrwuIVR+eygrbVgGMSpGwqxSal4wzF+A/GgDsA57sVQSpfIVXzm54UDrdJu2VpeL5xZW4PgeolXD6R1feTymQ1TUv9gtNbC8a7mp4wjNYCeAiWFY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718135462; c=relaxed/simple; bh=tLhF0gzIDb0MMKkTBdWoOAVCCwxF0E4J4wjD9vy2SBU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FrwaX6TRX9Jyu+1HR8k0R68wPmdG4WIH0dO4FodW2PxEG0ESB0NWGjqbMngxeN9nuwofh4AQT45q9dQjmwjLkaNEmje6w9cg2MUFWj4IAdo+DPeKoZWIxNq+5/1MiylFJWppnj1cDoDd245FzAiMbsCEfahkbaxuwNUij+7Q1Ys= 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=LIHd12/+; 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=1718135457; 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=VC/FKQpyiv8QuT0prkiboQ+mv2U8+abllOC5cV7bqrg=; b=LIHd12/+iiuaD64VAKpt0kUPqHDOin39OncI1af6A8GWSipj7qOYseukDigUEiwfZD20IY KvQgDisbRAwu7xDPn+gMuGJtbsuvyRV7QRURfLzED9ZkOTqiVm/B18xWLCEc6RvIFs9lo4 aW6DmYh144JfkVJ9Ak4Q/qUJUWcMrEY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-12-MAwHma3fM5ii77aLpsyykw-1; Tue, 11 Jun 2024 15:50:56 -0400 X-MC-Unique: MAwHma3fM5ii77aLpsyykw-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-421e17ae038so18629125e9.0 for ; Tue, 11 Jun 2024 12:50:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718135455; x=1718740255; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=VC/FKQpyiv8QuT0prkiboQ+mv2U8+abllOC5cV7bqrg=; b=oYejyjLrI2Lao4SHlIIqxiC78i1jOBE0djTEjqEMexDfym8FFkGkbhFuurkpDaf/SE KPQmxOddKFYWVSjkZb5CCvxRKkpFuvhC2FxduO4jcEIGoIg4idp60RW0nuDKqTdkaYlZ yOqPC3OkPoXLViGYG8NngkkFgXKzXeRB2TQDeJ1JQiRDqE60IG8MD0r8fPbztDWdTj0Y xoolesu44eppw1DXrrKpMfDTEtE7lBMMJGdxuERNNKqsXR1gAnpclGRKZMk7VJwaJb+e vFNCgumoylEPwUa2Mi9WjhKz2ycR3CWJpLLv+w7o4YeQ4CwPs1NRB1iPyD99nJMngBqo 7V5Q== X-Forwarded-Encrypted: i=1; AJvYcCU4DQgDNW3NS0iwMr66x4dVbQn0D/hDMc3Whw9/340JH5BKQMVjIVWwepehNVehYTxmqRvpEfNL8l7JTtZ0tmPAl/1OI48+P6iJQW5G X-Gm-Message-State: AOJu0Yz65d2IVcqNrUiGCMy4HBPwRD1K+mC/cEOO8ga7j5jFJNjXbANU XRpZTI8T1NsL/RED1RGgyzPcXGgXfLTvG/cQEMGv9Pc2UwAfS6UtZES9/qr+wN1JS0alo/jNbRU DX5JtTioWT2sPNxmW6lRly+QD3pbYDADtNBbuUf+BItEIf1OIezr9s32yL+ZQ5g== X-Received: by 2002:a05:600c:1c91:b0:421:8028:a507 with SMTP id 5b1f17b1804b1-4218028a5f6mr70330335e9.18.1718135455358; Tue, 11 Jun 2024 12:50:55 -0700 (PDT) X-Received: by 2002:a05:600c:1c91:b0:421:8028:a507 with SMTP id 5b1f17b1804b1-4218028a5f6mr70330165e9.18.1718135454911; Tue, 11 Jun 2024 12:50:54 -0700 (PDT) Received: from ?IPV6:2003:cb:c748:ba00:1c00:48ea:7b5a:c12b? (p200300cbc748ba001c0048ea7b5ac12b.dip0.t-ipconnect.de. [2003:cb:c748:ba00:1c00:48ea:7b5a:c12b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42274379b83sm16254225e9.28.2024.06.11.12.50.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jun 2024 12:50:54 -0700 (PDT) Message-ID: Date: Tue, 11 Jun 2024 21:50:52 +0200 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 v1 1/3] mm: pass meminit_context to __free_pages_core() To: Tim Chen , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-hyperv@vger.kernel.org, virtualization@lists.linux.dev, xen-devel@lists.xenproject.org, kasan-dev@googlegroups.com, Andrew Morton , Mike Rapoport , Oscar Salvador , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , =?UTF-8?Q?Eugenio_P=C3=A9rez?= , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Alexander Potapenko , Marco Elver , Dmitry Vyukov References: <20240607090939.89524-1-david@redhat.com> <20240607090939.89524-2-david@redhat.com> <80532f73e52e2c21fdc9aac7bce24aefb76d11b0.camel@linux.intel.com> From: David Hildenbrand Content-Language: en-US Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE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b2cqtc1xMOkYN/MpN3hD3 AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB 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: <80532f73e52e2c21fdc9aac7bce24aefb76d11b0.camel@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11.06.24 21:41, Tim Chen wrote: > On Fri, 2024-06-07 at 11:09 +0200, David Hildenbrand wrote: >> In preparation for further changes, let's teach __free_pages_core() >> about the differences of memory hotplug handling. >> >> Move the memory hotplug specific handling from generic_online_page() to >> __free_pages_core(), use adjust_managed_page_count() on the memory >> hotplug path, and spell out why memory freed via memblock >> cannot currently use adjust_managed_page_count(). >> >> Signed-off-by: David Hildenbrand >> --- >> mm/internal.h | 3 ++- >> mm/kmsan/init.c | 2 +- >> mm/memory_hotplug.c | 9 +-------- >> mm/mm_init.c | 4 ++-- >> mm/page_alloc.c | 17 +++++++++++++++-- >> 5 files changed, 21 insertions(+), 14 deletions(-) >> >> diff --git a/mm/internal.h b/mm/internal.h >> index 12e95fdf61e90..3fdee779205ab 100644 >> --- a/mm/internal.h >> +++ b/mm/internal.h >> @@ -604,7 +604,8 @@ extern void __putback_isolated_page(struct page *page, unsigned int order, >> int mt); >> extern void memblock_free_pages(struct page *page, unsigned long pfn, >> unsigned int order); >> -extern void __free_pages_core(struct page *page, unsigned int order); >> +extern void __free_pages_core(struct page *page, unsigned int order, >> + enum meminit_context); > > Shouldn't the above be > enum meminit_context context); Although C allows parameters without names in declarations, this was unintended. Thanks! -- Cheers, David / dhildenb