linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org, hch@lst.de,
	Uladzislau Rezki <urezki@gmail.com>
Subject: Re: [PATCH 2/2] vfree: Update documentation
Date: Tue, 22 Sep 2020 16:35:06 +0200	[thread overview]
Message-ID: <20200922143506.GA26664@lst.de> (raw)
In-Reply-To: <20200921224628.20704-2-willy@infradead.org>

On Mon, Sep 21, 2020 at 11:46:28PM +0100, Matthew Wilcox (Oracle) wrote:
>  * Document that you can call vfree() on an address returned from vmap()
>  * Remove the note about the minimum size -- the minimum size of a vmalloc
>    allocation is one page
>  * Add a Context: section
>  * Fix capitalisation
>  * Reword the prohibition on calling from NMI context to avoid a double
>    negative
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
>  mm/vmalloc.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 3893fc8915c4..942a44bdeec6 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -2313,20 +2313,20 @@ static void __vfree(const void *addr)
>  }
>  
>  /**
> - * vfree - release memory allocated by vmalloc()
> - * @addr:  memory base address
> + * vfree - Release memory allocated by vmalloc()
> + * @addr:  Memory base address
>   *
>   * Free the virtually continuous memory area starting at @addr, as
> + * obtained from vmalloc(), vmalloc_32() or __vmalloc().  If called
> + * on an @addr obtained from vmap(), it will put one refcount on each
> + * mapped page, which will free the page if this is the last refcount
> + * on the page.  If @addr is NULL, no operation is performed.

This reads a little confusing.  First it only allows vmalloc* and
then it mentions vmap in the next sentence.  And what about
vmalloc_32_user, vzalloc_node, vmalloc_node, vmalloc_user, vzalloc and
__vmalloc_node?


  reply	other threads:[~2020-09-22 14:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 22:46 [PATCH 1/2] vmalloc: Free pages as a batch Matthew Wilcox (Oracle)
2020-09-21 22:46 ` [PATCH 2/2] vfree: Update documentation Matthew Wilcox (Oracle)
2020-09-22 14:35   ` Christoph Hellwig [this message]
2020-09-22 15:06     ` Matthew Wilcox
2020-09-22 15:09       ` Christoph Hellwig
2020-09-22 15:22         ` Matthew Wilcox
2020-09-22 15:31           ` Christoph Hellwig
2020-09-22 16:42             ` Matthew Wilcox
2020-09-23  8:35 ` [PATCH 1/2] vmalloc: Free pages as a batch Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200922143506.GA26664@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=urezki@gmail.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox