Skip to contentSkip to conversation

docs/core-api: add memory allocation guide

PATCH In review Mike Rapoport 2 participants 6 messages Sep 14, 2018 – Sep 20, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v4 cover docs/core-api: add memory allocation guide

Hi,

As Vlastimil mentioned at [1], it would be nice to have some guide about memory allocation. This set adds such guide that summarizes the "best practices".

The changes from the RFC include additions and corrections from Michal and Randy. I've also added markup to cross-reference the kernel-doc documentation.

I've split the patch into three to separate labels addition to the exiting files from the new contents.

v3 -> v4:
* make GFP_*USER* description less confusing

v2 -> v3:
* s/HW/hardware

[1] https://www.spinics.net/lists/netfilter-devel/msg55542.html

Mike Rapoport (3):
docs: core-api/gfp_mask-from-fs-io: add a label for cross-referencing
docs: core-api/mm-api: add a lable for GFP flags section
docs: core-api: add memory allocation guide

 Documentation/core-api/gfp_mask-from-fs-io.rst |   2 +
 Documentation/core-api/index.rst               |   1 +
 Documentation/core-api/memory-allocation.rst   | 122 +++++++++++++++++++++++++
 Documentation/core-api/mm-api.rst              |   2 +
 4 files changed, 127 insertions(+)
 create mode 100644 Documentation/core-api/memory-allocation.rst
Signature · 1 line
2.7.4
#1 lore raw

PATCH v4 1/3 docs: core-api/gfp_mask-from-fs-io: add a label for cross-referencing

---
 Documentation/core-api/gfp_mask-from-fs-io.rst | 2 ++
 1 file changed, 2 insertions(+)
Documentation/core-api/gfp_mask-from-fs-io.rst +2 -0
index e0df8f4..e7c32a8 100644
@@ -1,3 +1,5 @@
+.. _gfp_mask_from_fs_io:
+
 =================================
 GFP masks used from FS/IO context
 =================================
Signature · 1 line
2.7.4
#2 lore raw

PATCH v4 2/3 docs: core-api/mm-api: add a lable for GFP flags section

In reply to Mike Rapoport
---
 Documentation/core-api/mm-api.rst | 2 ++
 1 file changed, 2 insertions(+)
Documentation/core-api/mm-api.rst +2 -0
index 46ae353..5ce1ec1 100644
@@ -14,6 +14,8 @@ User Space Memory Access
 .. kernel-doc:: mm/util.c
    :functions: get_user_pages_fast
 
+.. _mm-api-gfp-flags:
+
 Memory Allocation Controls
 ==========================
 
Signature · 1 line
2.7.4
#3 lore raw

PATCH v4 3/3 docs: core-api: add memory allocation guide

In reply to Mike Rapoport
---
 Documentation/core-api/index.rst             |   1 +
 Documentation/core-api/memory-allocation.rst | 122 +++++++++++++++++++++++++++
 2 files changed, 123 insertions(+)
 create mode 100644 Documentation/core-api/memory-allocation.rst
Documentation/core-api/index.rst +1 -0
index 26b735c..165d7688 100644
@@ -27,6 +27,7 @@ Core utilities
    errseq
    printk-formats
    circular-buffers
+   memory-allocation
    mm-api
    gfp_mask-from-fs-io
    timekeeping
Documentation/core-api/memory-allocation.rst new file +122 -0

122 lines not on this page · raw message

Signature · 1 line
2.7.4
#4 lore raw
In reply to Mike Rapoport

Ping?

Quoted 36 lines · Mike Rapoport

Hi,

As Vlastimil mentioned at [1], it would be nice to have some guide about memory allocation. This set adds such guide that summarizes the "best practices".

The changes from the RFC include additions and corrections from Michal and Randy. I've also added markup to cross-reference the kernel-doc documentation.

I've split the patch into three to separate labels addition to the exiting files from the new contents.

v3 -> v4:
* make GFP_*USER* description less confusing

v2 -> v3:
* s/HW/hardware

[1] https://www.spinics.net/lists/netfilter-devel/msg55542.html

Mike Rapoport (3):
docs: core-api/gfp_mask-from-fs-io: add a label for cross-referencing
docs: core-api/mm-api: add a lable for GFP flags section
docs: core-api: add memory allocation guide

 Documentation/core-api/gfp_mask-from-fs-io.rst |   2 +
 Documentation/core-api/index.rst               |   1 +
 Documentation/core-api/memory-allocation.rst   | 122 +++++++++++++++++++++++++
 Documentation/core-api/mm-api.rst              |   2 +
 4 files changed, 127 insertions(+)
 create mode 100644 Documentation/core-api/memory-allocation.rst
Signature · 1 line
2.7.4
Signature · 2 lines
Sincerely yours,
Mike.
maintainer
#5 lore raw
Quoted 18 lines · On Thu, 20 Sep 2018 07:29:30 +0300 Mike Rapoport <[email protected]>…

Ping?

Quoted 15 lines · Mike Rapoport

Hi,

As Vlastimil mentioned at [1], it would be nice to have some guide about memory allocation. This set adds such guide that summarizes the "best practices".

The changes from the RFC include additions and corrections from Michal and Randy. I've also added markup to cross-reference the kernel-doc documentation.

I've split the patch into three to separate labels addition to the exiting files from the new contents.

v3 -> v4:
* make GFP_*USER* description less confusing

Sorry...but it's been less than a week. And this week has been ... busy ...

Anyway, I've applied the set now, thanks.

jon