From patchwork Fri Sep 14 12:10:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10600701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3751B112B for ; Fri, 14 Sep 2018 12:14:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 121322B2F9 for ; Fri, 14 Sep 2018 12:14:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0445D2B3AA; Fri, 14 Sep 2018 12:14:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61E552B2F9 for ; Fri, 14 Sep 2018 12:14:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 16CD28E001F; Fri, 14 Sep 2018 08:14:12 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 11BB68E0001; Fri, 14 Sep 2018 08:14:12 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F26398E001F; Fri, 14 Sep 2018 08:14:11 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f72.google.com (mail-oi0-f72.google.com [209.85.218.72]) by kanga.kvack.org (Postfix) with ESMTP id C437C8E0001 for ; Fri, 14 Sep 2018 08:14:11 -0400 (EDT) Received: by mail-oi0-f72.google.com with SMTP id m21-v6so9205492oic.7 for ; Fri, 14 Sep 2018 05:14:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:in-reply-to:references:message-id; bh=wGALWnL/uL2COiiLT0TYZIqJXD8iQGtMrkTnNGMKwyg=; b=esJJMO8lrsifnggdfRt+uCG2UIGFS25qv7sn8ijzdEYTKKAmE5AOudythLGC5sk+eC KHaJjSFclHvYKbC+RMQ3juwz0UITIqZ4ukUNMCO8/tGrg2yPOlvriH+10DHJ34Wme/kF JvxLOnquDNZ5d8n3315w1mdL5wnU3cUgaa213woYJ+ID91x60oBUFrd8gnuuVYHJkQxn wN2iE1QAYm2fHArHrMeLajRY1KlU7dzvu4bIsNI07BycreA6cN1g20UmvJnIi87at0GI Bink6ThgoA+wdsV8Xy9p6NAHhNtIrytn+Id7VAhU0qq3NazWx7/PINGA9kifZtvinioP 5psw== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: APzg51DqRr0w2meoHnCIAuyI7m5xz6uNiR/Whz7pMPbe2kPD8DmxmInw B5jGq567ma7gljBFZyqz+d8TiIkseCRUldf30rIRHDTMs6iUMR82j0enaNYtRC6EfvHgrb7pw7m diLnn77j9TWylFOMv9SlknctiKvUmXPxBTh8cvcUJ+AHEynsXi2TefBNCwF2KqEs= X-Received: by 2002:aca:2e86:: with SMTP id u128-v6mr8822660oiu.132.1536927251563; Fri, 14 Sep 2018 05:14:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZuFS5f0wL9LGILqXCKNx543tWuxFrhposFvgm4PpFyM3q/O8DLkAE4Guakvd+PnF1FkXEy X-Received: by 2002:aca:2e86:: with SMTP id u128-v6mr8822616oiu.132.1536927250583; Fri, 14 Sep 2018 05:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536927250; cv=none; d=google.com; s=arc-20160816; b=luVYre/B8vnGsn+KVB3MhclWAIEAoAAb8u+qU7N9rVUT1Jg2Y8/1fGP+EFGZHIM4gA 7g014ZYgAWEEjtypB6QBVaYF3Lej66UQMvdYQr4la8MAzCwX2iDygDB4+o2C02h60diX jG/AuBX5TF8INbGVc6sbl68G7kGfeufvkq6S++4nM/YCEUwjfPZ47+2O9cektmnDT1kS lkH8ekjUs6NcMivLc947wDQVvnmSyn3MewxDMkBsPZrxAUZd2Uwal8pNbjECQTYjwzHQ 1v1gYzQTaYqIu5Nac9l6fgUPuMgfoebbNlmzZRWHS63aXgxpBEsvH10HZ7jy8yeO2T5i lBHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:references:in-reply-to:date:subject:cc:to:from; bh=wGALWnL/uL2COiiLT0TYZIqJXD8iQGtMrkTnNGMKwyg=; b=JS23uxBBjldubqplbB+P5LRH2zknOgrjDt3TwRXorxgql3GWt0+LwFvwe113y4jSLm Kx6AlGsWJelynPLjOz3DvnfD8g00V5qzqngdk4ZUiLseRKCdnOTUMtqD1k2Ud1k2yfHO QXvm22URqjQB/c0MpNbN4y9G+ntJiXhFmVDtePz+9uGG5J0BinANXajCECa30NDdW8qc y4ds7wIWrymzrlCergAQexyFJAglpjrExUaOEmShPVmlsKYQnVRaD67Z6/jGOBuqiV6O qW++J7XN+ziE5Tp+BrmALH13fy6Uigb8tX5FXmDFZL1EqhrswdCTSZEyEEyIX4eoPnm4 YOXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id q54-v6si1554537otc.53.2018.09.14.05.14.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Sep 2018 05:14:10 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.158.5; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8EC52gT080015 for ; Fri, 14 Sep 2018 08:14:10 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2mgb0c4xaj-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Sep 2018 08:14:09 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Sep 2018 13:14:07 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Sep 2018 13:13:56 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8ECDtNn58785798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Sep 2018 12:13:55 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C20D852050; Fri, 14 Sep 2018 15:13:42 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.207.116]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id A432752052; Fri, 14 Sep 2018 15:13:37 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Fri, 14 Sep 2018 15:13:49 +0300 From: Mike Rapoport To: linux-mm@kvack.org Cc: Andrew Morton , Catalin Marinas , Chris Zankel , "David S. Miller" , Geert Uytterhoeven , Greentime Hu , Greg Kroah-Hartman , Guan Xuetao , Ingo Molnar , "James E.J. Bottomley" , Jonas Bonn , Jonathan Corbet , Ley Foon Tan , Mark Salter , Martin Schwidefsky , Matt Turner , Michael Ellerman , Michal Hocko , Michal Simek , Palmer Dabbelt , Paul Burton , Richard Kuo , Richard Weinberger , Rich Felker , Russell King , Serge Semin , Thomas Gleixner , Tony Luck , Vineet Gupta , Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, Mike Rapoport Subject: [PATCH 30/30] docs/boot-time-mm: remove bootmem documentation Date: Fri, 14 Sep 2018 15:10:45 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536927045-23536-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1536927045-23536-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091412-0008-0000-0000-000002715AA3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091412-0009-0000-0000-000021D9A084 Message-Id: <1536927045-23536-31-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-14_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809140129 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: X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Mike Rapoport --- Documentation/core-api/boot-time-mm.rst | 71 +++++---------------------------- 1 file changed, 10 insertions(+), 61 deletions(-) diff --git a/Documentation/core-api/boot-time-mm.rst b/Documentation/core-api/boot-time-mm.rst index 03cb164..e5ec9f1 100644 --- a/Documentation/core-api/boot-time-mm.rst +++ b/Documentation/core-api/boot-time-mm.rst @@ -5,54 +5,23 @@ Boot time memory management Early system initialization cannot use "normal" memory management simply because it is not set up yet. But there is still need to allocate memory for various data structures, for instance for the -physical page allocator. To address this, a specialized allocator -called the :ref:`Boot Memory Allocator `, or bootmem, was -introduced. Several years later PowerPC developers added a "Logical -Memory Blocks" allocator, which was later adopted by other -architectures and renamed to :ref:`memblock `. There is also -a compatibility layer called `nobootmem` that translates bootmem -allocation interfaces to memblock calls. +physical page allocator. -The selection of the early allocator is done using -``CONFIG_NO_BOOTMEM`` and ``CONFIG_HAVE_MEMBLOCK`` kernel -configuration options. These options are enabled or disabled -statically by the architectures' Kconfig files. - -* Architectures that rely only on bootmem select - ``CONFIG_NO_BOOTMEM=n && CONFIG_HAVE_MEMBLOCK=n``. -* The users of memblock with the nobootmem compatibility layer set - ``CONFIG_NO_BOOTMEM=y && CONFIG_HAVE_MEMBLOCK=y``. -* And for those that use both memblock and bootmem the configuration - includes ``CONFIG_NO_BOOTMEM=n && CONFIG_HAVE_MEMBLOCK=y``. - -Whichever allocator is used, it is the responsibility of the -architecture specific initialization to set it up in -:c:func:`setup_arch` and tear it down in :c:func:`mem_init` functions. +A specialized allocator called ``memblock`` performs the +boot time memory management. The architecture specific initialization +must set it up in :c:func:`setup_arch` and tear it down in +:c:func:`mem_init` functions. Once the early memory management is available it offers a variety of functions and macros for memory allocations. The allocation request may be directed to the first (and probably the only) node or to a particular node in a NUMA system. There are API variants that panic -when an allocation fails and those that don't. And more recent and -advanced memblock even allows controlling its own behaviour. - -.. _bootmem: - -Bootmem -======= - -(mostly stolen from Mel Gorman's "Understanding the Linux Virtual -Memory Manager" `book`_) - -.. _book: https://www.kernel.org/doc/gorman/ - -.. kernel-doc:: mm/bootmem.c - :doc: bootmem overview +when an allocation fails and those that don't. -.. _memblock: +Memblock also offers a variety of APIs that control its own behaviour. -Memblock -======== +Memblock Overview +================= .. kernel-doc:: mm/memblock.c :doc: memblock overview @@ -61,26 +30,6 @@ Memblock Functions and structures ======================== -Common API ----------- - -The functions that are described in this section are available -regardless of what early memory manager is enabled. - -.. kernel-doc:: mm/nobootmem.c - -Bootmem specific API --------------------- - -These interfaces available only with bootmem, i.e when ``CONFIG_NO_BOOTMEM=n`` - -.. kernel-doc:: include/linux/bootmem.h -.. kernel-doc:: mm/bootmem.c - :nodocs: - -Memblock specific API ---------------------- - Here is the description of memblock data structures, functions and macros. Some of them are actually internal, but since they are documented it would be silly to omit them. Besides, reading the @@ -89,4 +38,4 @@ really happens under the hood. .. kernel-doc:: include/linux/memblock.h .. kernel-doc:: mm/memblock.c - :nodocs: + :functions: