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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 775D7C43334 for ; Tue, 21 Jun 2022 07:39:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0298C6B007B; Tue, 21 Jun 2022 03:39:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F1D018E0006; Tue, 21 Jun 2022 03:39:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DBDD48E0005; Tue, 21 Jun 2022 03:39:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id CC1236B007B for ; Tue, 21 Jun 2022 03:39:38 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id A6297120DAC for ; Tue, 21 Jun 2022 07:39:38 +0000 (UTC) X-FDA: 79601443236.08.425DBB4 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf30.hostedemail.com (Postfix) with ESMTP id 50EDA80003 for ; Tue, 21 Jun 2022 07:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655797177; 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; bh=N9tiKnq6phB8o+3F1BeH/xJoEGEmyesclfjwFxkzgCE=; b=JVyQemiRW1Znf96EWsJ/UAn3lvPM+TU+f1rog4pNvpZvgALi85R6U10DRBjbwOeDOcDGLl jLNyTqNxAK+D41bbvZl7+a5xSqZ+9p71BnuYbnNawXzE2+YIqxMYLMolVL+YEruabwC7Kx 7Hhe8rTDuk+50cL7kiP56u0GwJhVFkA= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-582-q80wHRAWMuarNKdfxSiilg-1; Tue, 21 Jun 2022 03:39:35 -0400 X-MC-Unique: q80wHRAWMuarNKdfxSiilg-1 Received: by mail-wm1-f69.google.com with SMTP id m23-20020a05600c3b1700b0039c6e3c169aso6018057wms.2 for ; Tue, 21 Jun 2022 00:39:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=N9tiKnq6phB8o+3F1BeH/xJoEGEmyesclfjwFxkzgCE=; b=6TPU8srfs7qmqNr1LhDtFfa1dndxn1EnUdSSl/HHolIBmrHJGmSPWzcGRKs9/UjgI9 q2a11nhlQW5b9FJ8EzDT0Ps6ZdzfQi+xR0Iq6jFZyhz0oCLGRZF42mzhmoGVNyWLNlbr +u+G4VP1Wz45542kKe0neXGDhgToBgPOvccG3vB4XBcG6ee1elpGt6oYpauEgEqjNUp8 TcXhWGoHd5wG/5lL4nWIiRV0gf8b5+Sl7ZLrY5qMSE2XXp5fxekVC6g/pjhFoIzjSYDu gFIEsJsRwGlZnmK85AsEwafJAmvlkQ0uorLYnUWmgwdgng+O4QT4Ss/5aR4nKbkbYWuh 77yg== X-Gm-Message-State: AJIora8EaeGrv1+7sHEtSFeC6pi3mVs87Wdaz0+bhm48uhRxZP+K9F8a /+JsKawnx9t36GWr1i6JtroDYbtd6LLFXswGrseZZJ4HwYkTfHNk6Av2j67Y6IrgzPC0N1EWlrX ilYEZ44O84zg= X-Received: by 2002:adf:e491:0:b0:213:ba6b:b017 with SMTP id i17-20020adfe491000000b00213ba6bb017mr2244116wrm.652.1655797174145; Tue, 21 Jun 2022 00:39:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vOMmayQmvf7SIYR8lv3P/I4QUP1e869MPBj5r5k76l2FUw/Qwk9oItuc7MizEnliZ9dC4/YQ== X-Received: by 2002:adf:e491:0:b0:213:ba6b:b017 with SMTP id i17-20020adfe491000000b00213ba6bb017mr2244092wrm.652.1655797173867; Tue, 21 Jun 2022 00:39:33 -0700 (PDT) Received: from ?IPV6:2003:d8:2f04:2500:cdb0:9b78:d423:43f? (p200300d82f042500cdb09b78d423043f.dip0.t-ipconnect.de. [2003:d8:2f04:2500:cdb0:9b78:d423:43f]) by smtp.gmail.com with ESMTPSA id n15-20020a5d4c4f000000b0021b966abc19sm1468962wrt.19.2022.06.21.00.39.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jun 2022 00:39:33 -0700 (PDT) Message-ID: Date: Tue, 21 Jun 2022 09:39:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v5 1/2] mm: memory_hotplug: enumerate all supported section flags To: Muchun Song , akpm@linux-foundation.org, corbet@lwn.net, mike.kravetz@oracle.com, osalvador@suse.de, paulmck@kernel.org Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, duanxiongchun@bytedance.com, smuchun@gmail.com References: <20220620110616.12056-1-songmuchun@bytedance.com> <20220620110616.12056-2-songmuchun@bytedance.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220620110616.12056-2-songmuchun@bytedance.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=JVyQemiR; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf30.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655797178; h=from:from:sender: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:dkim-signature; bh=N9tiKnq6phB8o+3F1BeH/xJoEGEmyesclfjwFxkzgCE=; b=YzYErz+Cbbh7npjwz56Kfo6j838tSfVM17nbbNpI8NbRCyDgB7dcdezom82N7jekBzEaG7 ELN4UB7kQwvffd/i+l8ue6hY+fFVF6tGMYYYEwIvMS++1sDRbzNfNFv7HRS9Kb72OBohDN khffImkpnq6DHNLlIjT2q0El2t2M71Q= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655797178; a=rsa-sha256; cv=none; b=gZQXD6/CzJjs74XJZxoISejnnbCotF274cKKIWPgRLzjb21ieDYEZTarCEndvI88bm2xvb ikZokcvn1BftL7p982oykMmW2te+0nvTSbZb954mCagmVAovOusrpgV/g3HhaXspijMvGV mCEY0GZWOyDK6Fl/8a6+Mp4C/oedmOk= X-Stat-Signature: ox7rd7czqeonhdh753mkw55sjjbfabw9 X-Rspamd-Queue-Id: 50EDA80003 X-Rspam-User: Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=JVyQemiR; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf30.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam10 X-HE-Tag: 1655797178-110534 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 20.06.22 13:06, Muchun Song wrote: > We are almost running out of section flags, only one bit is available in > the worst case (powerpc with 256k pages). However, there are still some > free bits (in ->section_mem_map) on other architectures (e.g. x86_64 has > 10 bits available, arm64 has 8 bits available with worst case of 64K > pages). We have hard coded those numbers in code, it is inconvenient to > use those bits on other architectures except powerpc. So transfer those > section flags to enumeration to make it easy to add new section flags in > the future. Also, move SECTION_TAINT_ZONE_DEVICE into the scope of > CONFIG_ZONE_DEVICE to save a bit on non-zone-device case. > > Signed-off-by: Muchun Song Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb