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 X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5D15C47082 for ; Tue, 8 Jun 2021 15:22:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9BD4761246 for ; Tue, 8 Jun 2021 15:22:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BD4761246 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 136A46B006C; Tue, 8 Jun 2021 11:22:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 10D5B6B0070; Tue, 8 Jun 2021 11:22:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC9996B0071; Tue, 8 Jun 2021 11:22:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0089.hostedemail.com [216.40.44.89]) by kanga.kvack.org (Postfix) with ESMTP id B89366B006C for ; Tue, 8 Jun 2021 11:22:16 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3F177DB2F for ; Tue, 8 Jun 2021 15:22:16 +0000 (UTC) X-FDA: 78230922672.01.C621D8B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf25.hostedemail.com (Postfix) with ESMTP id E78456000144 for ; Tue, 8 Jun 2021 15:22:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623165735; 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=bYJWERLFV2zpboPIkx4EOqOO/7XiVLEK1TH9KtKSuvE=; b=FPE35oPgkgxJvkQfX6ra+CrqJ/ijBCfNcRtEDcmb1W89m41clKiOiZysH8qfj4KRmeH9kO t3tn892+JudJkHhyuQUAHVHvj2t6aKMT5WyHSfEzpMNZBlqef6gzu7wcrcaotp4wDe+85C AkZFGFuYRgpx8E0MmDOREYGqH0EKjtA= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-354-UCsGdVyvNSySadfXyj-ScA-1; Tue, 08 Jun 2021 11:22:12 -0400 X-MC-Unique: UCsGdVyvNSySadfXyj-ScA-1 Received: by mail-wm1-f72.google.com with SMTP id y129-20020a1c32870000b029016920cc7087so534274wmy.4 for ; Tue, 08 Jun 2021 08:22:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:organization:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=bYJWERLFV2zpboPIkx4EOqOO/7XiVLEK1TH9KtKSuvE=; b=bEesXX8kluEFQ7QPXzyShxP1yKlpY3HhcNVFKG+sBo0MS5cNBb2w5RA4hDtIdiTuBe Xz40gk4nJEeceh0ZQxmWRbXElIC+oScJf0uhxnXtI/r8S+3n3mrTnlqxL4aD5r0Qhasn A26uwfZ1AA80BEfsQsj5GLDEEbGwQVtj4m4uNQ6tSDyQ1JDT0UdlCUKmHHhggLPT4TEJ c9GhGJZwWr7jnbiHUcZ0kyLngXvxKqzjaM7rjSq0S5zMYHJX4H/eQ4yoKkEDfgbYeICx ta17BaqtI49UZVkmVthvTAqm55xP4dRJizz55zXOU0//EkMAp8zYzQrt1nwwojGhAEYL x1yg== X-Gm-Message-State: AOAM533RKLwV2giNgqz9fNae4a6r+3nsF8iSFZGsOYUj70D6Dhv8qOi3 3UcXXIJv6py+Z7Gj9DLk+47FbiYweOGcXcTKm4rOaC9T6UAD3NYHLQE7Po+Zn5PD/dZCuT2KzDT 35O+NRuWas6I= X-Received: by 2002:a5d:58d3:: with SMTP id o19mr23877966wrf.404.1623165731795; Tue, 08 Jun 2021 08:22:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb1sRNRT4qwoKU9b9zHGD5+IxEr/zHjaok1kMzPylTCrAALnQPr0r5QUFLCaneAiDJ3AGpaQ== X-Received: by 2002:a5d:58d3:: with SMTP id o19mr23877952wrf.404.1623165731625; Tue, 08 Jun 2021 08:22:11 -0700 (PDT) Received: from [192.168.3.132] (p5b0c61cf.dip0.t-ipconnect.de. [91.12.97.207]) by smtp.gmail.com with ESMTPSA id l16sm1358435wmq.28.2021.06.08.08.22.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Jun 2021 08:22:11 -0700 (PDT) To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Oscar Salvador , Michal Hocko , Mike Kravetz , Dave Hansen , Matthew Wilcox , Anshuman Khandual , Muchun Song , Pavel Tatashin , Jonathan Corbet , Stephen Rothwell , linux-doc@vger.kernel.org References: <20210525102604.8770-1-david@redhat.com> <385d2bd0-8857-9d40-c8f9-c302f0b56e12@redhat.com> From: David Hildenbrand Organization: Red Hat Subject: Re: [PATCH v1] memory-hotplug.rst: complete admin-guide overhaul Message-ID: Date: Tue, 8 Jun 2021 17:22:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: E78456000144 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=FPE35oPg; spf=none (imf25.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Stat-Signature: rxrd9ecegpxqypk3rxqupn9715opqbq4 X-HE-Tag: 1623165732-917193 Content-Transfer-Encoding: quoted-printable 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: Looks like a was too fast with my resend ;) >>>> -Phases of memory hotplug >>>> +Further, the basic memory hot(un)plug infrastructure in Linux is no= wadays >>>> +also used to expose PMEM, other performance-differentiated >>> >>> ^ persistent memory (PMEM) >>> >=20 > Just in case you've missed this one ^ ;-) I did catch that :) [...] >> >> "If it fails, an error will be returned by the kernel via the systemca= ll >> that triggered modifying of the respective file." >=20 > I also think that write(2) to /sys/devices/system/memory/memoryXXX/onli= ne > will fail. But the inner workings of system call, its return value and= the > ERRNO are probably not very interesting to a person that did >=20 > echo 0 > /sys/devices/system/memory/memoryXXX/online >=20 > Maybe something like >=20 > If it fails, the state of the memory block will remain unchanged and= the > above command will fail. Thanks, I'll use that. >=20 > And maybe an example of how echo reports some unrelated error message := ) >=20 >>>> +Observing the State of Memory Blocks >=20 > ... >=20 >>>> -Now, a boot option for making a memory block which consists of migr= atable pages >>>> -is supported. By specifying "kernelcore=3D" or "movablecore=3D" boo= t option, you can >>>> -create ZONE_MOVABLE...a zone which is just used for movable pages. >>>> -(See also Documentation/admin-guide/kernel-parameters.rst) >>>> + For online memory blocks, ``DMA``, ``DMA32``, ``Normal``, >>>> + ``Movable`` and ``none`` may be returned. ``none`` indicates >>> >>> Highmem? Or we don't support hotplug on 32 bits? >> >> We only support 64 bit: >> >> config MEMORY_HOTPLUG >> ... >> depends on 64BIT || BROKEN >> >> Worth a comment in the document "Introduction": >> >> "Linux only supports memory hot(un)plug on selected 64 bit architectur= es, >> such as x86_64, aarch64, ppc64, s390x and ia64." > =20 > ^ arm64 ? I think aarch64 is historically actually the right(tm) thing to use in=20 general ... but nowadays it doesn't matter anymore. It's "arch/arm64"=20 ... the inconsistency is real. (interesting read:=20 https://stackoverflow.com/questions/31851611/differences-between-arm64-an= d-aarch64) But it's the same mess as using x86 vs. x86_64 vs. x64 vs. AMD64 for the=20 64 bit extension of IA-32. So I'll convert that to arm64. --=20 Thanks, David / dhildenb