From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) by kanga.kvack.org (Postfix) with ESMTP id E2CCE8E021D for ; Fri, 14 Dec 2018 21:22:37 -0500 (EST) Received: by mail-io1-f70.google.com with SMTP id d63so6424553iog.4 for ; Fri, 14 Dec 2018 18:22:37 -0800 (PST) Received: from smtprelay.hostedemail.com (smtprelay0024.hostedemail.com. [216.40.44.24]) by mx.google.com with ESMTPS id 192si3926790its.82.2018.12.14.18.22.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 18:22:36 -0800 (PST) Message-ID: Subject: Re: [RFC 2/4] mm: separate memory allocation and actual work in alloc_vmap_area() From: Joe Perches Date: Fri, 14 Dec 2018 18:22:33 -0800 In-Reply-To: <20181214194500.GF10600@bombadil.infradead.org> References: <20181214180720.32040-1-guro@fb.com> <20181214180720.32040-3-guro@fb.com> <20181214181322.GC10600@bombadil.infradead.org> <0192c1984f42ad0a33e4c9aca04df90c97ebf412.camel@perches.com> <20181214194500.GF10600@bombadil.infradead.org> Content-Type: text/plain; charset="ISO-8859-1" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Matthew Wilcox Cc: Roman Gushchin , linux-mm@kvack.org, Alexey Dobriyan , Johannes Weiner , Michal Hocko , Vlastimil Babka , linux-kernel@vger.kernel.org, kernel-team@fb.com, Roman Gushchin On Fri, 2018-12-14 at 11:45 -0800, Matthew Wilcox wrote: > On Fri, Dec 14, 2018 at 11:40:45AM -0800, Joe Perches wrote: > > On Fri, 2018-12-14 at 10:13 -0800, Matthew Wilcox wrote: > > > On Fri, Dec 14, 2018 at 10:07:18AM -0800, Roman Gushchin wrote: > > > > +/* > > > > + * Allocate a region of KVA of the specified size and alignment, within the > > > > + * vstart and vend. > > > > + */ > > > > +static struct vmap_area *alloc_vmap_area(unsigned long size, > > > > + unsigned long align, > > > > + unsigned long vstart, > > > > + unsigned long vend, > > > > + int node, gfp_t gfp_mask) > > > > +{ > > > > + struct vmap_area *va; > > > > + int ret; > > > > + > > > > + va = kmalloc_node(sizeof(struct vmap_area), > > > > + gfp_mask & GFP_RECLAIM_MASK, node); > > > > + if (unlikely(!va)) > > > > + return ERR_PTR(-ENOMEM); > > > > + > > > > + ret = init_vmap_area(va, size, align, vstart, vend, node, gfp_mask); > > > > + if (ret) { > > > > + kfree(va); > > > > + return ERR_PTR(ret); > > > > + } > > > > + > > > > + return va; > > > > } > > > > > > > > + > > > > > > Another spurious blank line? [wrong spacing noticed] > Umm ... this blank line changed the file from having one blank line > after the function to having two blank lines after the function. right. thanks.