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=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 46011C2D0E2 for ; Tue, 22 Sep 2020 14:35:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 917452396D for ; Tue, 22 Sep 2020 14:35:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 917452396D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CD25990008D; Tue, 22 Sep 2020 10:35:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C81E0900086; Tue, 22 Sep 2020 10:35:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B988E90008D; Tue, 22 Sep 2020 10:35:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id A02FB900086 for ; Tue, 22 Sep 2020 10:35:10 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 652E2180AD807 for ; Tue, 22 Sep 2020 14:35:10 +0000 (UTC) X-FDA: 77290944780.24.spy92_3a1838d2714e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 3458B1A4A7 for ; Tue, 22 Sep 2020 14:35:10 +0000 (UTC) X-HE-Tag: spy92_3a1838d2714e X-Filterd-Recvd-Size: 2512 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Tue, 22 Sep 2020 14:35:09 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id DB79767373; Tue, 22 Sep 2020 16:35:06 +0200 (CEST) Date: Tue, 22 Sep 2020 16:35:06 +0200 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, hch@lst.de, Uladzislau Rezki Subject: Re: [PATCH 2/2] vfree: Update documentation Message-ID: <20200922143506.GA26664@lst.de> References: <20200921224628.20704-1-willy@infradead.org> <20200921224628.20704-2-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200921224628.20704-2-willy@infradead.org> User-Agent: Mutt/1.5.17 (2007-11-01) 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: 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) > --- > 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?