[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190320115333.GR18740@MiWiFi-R3L-srv>
Date: Wed, 20 Mar 2019 19:53:33 +0800
From: Baoquan He <bhe@...hat.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
pasha.tatashin@...cle.com, mhocko@...e.com,
rppt@...ux.vnet.ibm.com, richard.weiyang@...il.com,
linux-mm@...ck.org
Subject: Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment
On 03/20/19 at 04:19am, Matthew Wilcox wrote:
> On Wed, Mar 20, 2019 at 03:35:38PM +0800, Baoquan He wrote:
> > /*
> > - * returns the number of sections whose mem_maps were properly
> > - * set. If this is <=0, then that means that the passed-in
> > - * map was not consumed and must be freed.
> > + * sparse_add_one_section - add a memory section
> > + * @nid: The node to add section on
> > + * @start_pfn: start pfn of the memory range
> > + * @altmap: device page map
> > + *
> > + * Return 0 on success and an appropriate error code otherwise.
> > */
>
> I think it's worth documenting what those error codes are. Seems to be
> just -ENOMEM and -EEXIST, but it'd be nice for users to know what they
> can expect under which circumstances.
>
> Also, -EEXIST is a bad errno to return here:
>
> $ errno EEXIST
> EEXIST 17 File exists
>
> What file? I think we should be using -EBUSY instead in case this errno
> makes it back to userspace:
>
> $ errno EBUSY
> EBUSY 16 Device or resource busy
OK, will update per your comments. Thanks.
>
Powered by blists - more mailing lists