Re: [PATCH] Link the memory allocation guide from the MM docs
On Mon, Nov 19, 2018 at 08:00:49AM -0800, Matthew Wilcox wrote: > I just went looking for the memory allocation guide in the MM docs instead > of in the core API. For the benefit of the next person who makes that > mistake, link to it from the MM docs. > > Signed-off-by: Matthew Wilcox Acked-by: Mike Rapoport > > diff --git a/Documentation/core-api/memory-allocation.rst > b/Documentation/core-api/memory-allocation.rst > index f8bb9aa120c4..8954a88ff5b7 100644 > --- a/Documentation/core-api/memory-allocation.rst > +++ b/Documentation/core-api/memory-allocation.rst > @@ -1,3 +1,5 @@ > +.. _memory-allocation: > + > === > Memory Allocation Guide > === > diff --git a/Documentation/vm/index.rst b/Documentation/vm/index.rst > index c4ded22197ca..2b3ab3a1ccf3 100644 > --- a/Documentation/vm/index.rst > +++ b/Documentation/vm/index.rst > @@ -2,7 +2,9 @@ > Linux Memory Management Documentation > = > > -This is a collection of documents about Linux memory management (mm) > subsystem. > +This is a collection of documents about the Linux memory management (mm) > +subsystem. If you are looking for advice on simply allocating memory, > +see the :ref:`memory-allocation`. > > User guides for MM features > === > -- Sincerely yours, Mike.
Re: [PATCH v2] Document /proc/pid PID reuse behavior
On Mon, Nov 19, 2018 at 2:54 AM, Pavel Machek wrote: > On Mon 2018-11-05 13:22:05, Daniel Colascione wrote: >> State explicitly that holding a /proc/pid file descriptor open does >> not reserve the PID. Also note that in the event of PID reuse, these >> open file descriptors refer to the old, now-dead process, and not the >> new one that happens to be named the same numeric PID. >> >> Signed-off-by: Daniel Colascione >> --- >> Documentation/filesystems/proc.txt | 7 +++ >> 1 file changed, 7 insertions(+) >> >> Moved paragraphed to start of /proc/pid section; added signed-off-by. >> >> diff --git a/Documentation/filesystems/proc.txt >> b/Documentation/filesystems/proc.txt >> index 12a5e6e693b6..0b14460f721d 100644 >> --- a/Documentation/filesystems/proc.txt >> +++ b/Documentation/filesystems/proc.txt >> @@ -125,6 +125,13 @@ process running on the system, which is named after the >> process ID (PID). >> The link self points to the process reading the file system. Each >> process >> subdirectory has the entries listed in Table 1-1. >> >> +Note that an open a file descriptor to /proc/ or to any of its >> +contained files or subdirectories does not prevent being reused >> +for some other process in the event that exits. Operations on > > "does not" -> "may not"? > > We want to leave this unspecified, so that we can change it in future. No. "Does not". I'm sick and tired of procfs behavior being vague and unspecified to the point where even kernel developers have an incorrect mental model of how it all works. With Christian Brauner's good work in place and hopefully my own work to follow, we're moving firmly in the direction of procfs handles being struct pid references. Instead of waffling further, let's just buy into this model and do the best job we can of making it work well.
Re: [PATCH v1 2/8] mm: convert PG_balloon to PG_offline
> > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h > index 50ce1bddaf56..f91da3d0a67e 100644 > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -670,7 +670,7 @@ PAGEFLAG_FALSE(DoubleMap) > #define PAGE_TYPE_BASE 0xf000 > /* Reserve 0x007f to catch underflows of page_mapcount */ > #define PG_buddy 0x0080 > -#define PG_balloon 0x0100 > +#define PG_offline 0x0100 > #define PG_kmemcg0x0200 > #define PG_table 0x0400 > > @@ -700,10 +700,13 @@ static __always_inline void __ClearPage##uname(struct > page *page) \ > PAGE_TYPE_OPS(Buddy, buddy) > > /* > - * PageBalloon() is true for pages that are on the balloon page list > - * (see mm/balloon_compaction.c). > + * PageOffline() indicates that the pages is logically offline although the s/pages/page/ :) -- Thanks, David / dhildenb
[PATCH] Link the memory allocation guide from the MM docs
I just went looking for the memory allocation guide in the MM docs instead of in the core API. For the benefit of the next person who makes that mistake, link to it from the MM docs. Signed-off-by: Matthew Wilcox diff --git a/Documentation/core-api/memory-allocation.rst b/Documentation/core-api/memory-allocation.rst index f8bb9aa120c4..8954a88ff5b7 100644 --- a/Documentation/core-api/memory-allocation.rst +++ b/Documentation/core-api/memory-allocation.rst @@ -1,3 +1,5 @@ +.. _memory-allocation: + === Memory Allocation Guide === diff --git a/Documentation/vm/index.rst b/Documentation/vm/index.rst index c4ded22197ca..2b3ab3a1ccf3 100644 --- a/Documentation/vm/index.rst +++ b/Documentation/vm/index.rst @@ -2,7 +2,9 @@ Linux Memory Management Documentation = -This is a collection of documents about Linux memory management (mm) subsystem. +This is a collection of documents about the Linux memory management (mm) +subsystem. If you are looking for advice on simply allocating memory, +see the :ref:`memory-allocation`. User guides for MM features ===