Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2482851imu; Fri, 14 Dec 2018 11:46:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/XNljlwTCrxrSaCpZj13iUifPcAvy9gYBnWyXl12/kpd37Rz2h93miSfRViWO9rHnSJMJm5 X-Received: by 2002:a62:c505:: with SMTP id j5mr4035346pfg.149.1544816787155; Fri, 14 Dec 2018 11:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544816787; cv=none; d=google.com; s=arc-20160816; b=TgJoDbuplCFNHPMawa60qSTCavl9yKaxrAJrD92nhk0eECrFP3wagZsmkdyUGzGnOy K9/6BxRmcSsiUgukODNp6JiOfYKqHqVc8pUwxVnyqjHI8CBbg/0G31XXdKfQaKxKT0HS O0qMS+VgYogNtNpjKmj1pZeXcjru3kAIcNrogcLWeSmxKXf+5ECBFaDft6WFvaj+aRar oC6DLz4b/94SIj6HXVCydDeXKAmITgDml2CIZwJjeSzKOjRA8r/whHpJQuUPwxhVvTyD Q31X87jXu93LrzGeJLXsktkcDT+TAKBGN6WDlIOUT4Fci0DBowIuQmY6XtzNzWsMpxbv XxLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eJitfIF5tV0Tv6OzLWeekme+t2QDJsCN3sHudGCP87s=; b=ybFZ8QUNF1p3BfUpzEDEcjdmWplq9nqKhEZj0SdhFPF2kcJIIt+oECed82dBj5X5GK +f/LMyYr0iKd9Q2MGCstuWKC0umqNi1U5SlZULjTn/rw1GSa8hVTqAiJuxKMcmLSCjWI yK4OSPMX6ZNNGZG1edxdzy+7rGnuYHR8YZLzl8wv19Y4oErHlm6BIQ7IYXqyC4oZ/TUd g4RMvHLR6U3mbedfDbzsTV1s7tiawW0Hp3U6KafwZQlIdZHUIAZIHL+8WM4VY1b25cYm gQxV50s16vIO2NuwM4DucujQz8LFluKLseBKg6MANSntL3ivp6XGuYf4WlCaP9e76cFh Dhhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Fju7Z5EU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m61si4650930plb.154.2018.12.14.11.46.11; Fri, 14 Dec 2018 11:46:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Fju7Z5EU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730667AbeLNTpI (ORCPT + 99 others); Fri, 14 Dec 2018 14:45:08 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:52084 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730123AbeLNTpI (ORCPT ); Fri, 14 Dec 2018 14:45:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=eJitfIF5tV0Tv6OzLWeekme+t2QDJsCN3sHudGCP87s=; b=Fju7Z5EULkU5SinXD4SfxS8KX KltMFuG6RV9PZt6DX46Jf/qmXpIiLUOKtdyllYwnB7NEvUF+0qoyRekxGVWCs7UYkdYFquVTGBiW5 nCkP8RfroO1XudjeD145AA64pC3XfFj16t8c8HRUDrbdlLOAvJZIeZcYrRrWyt1nMSDrTeJm5392y 3jItF9jDWP+b9uimtlA68jmWeq/cTzYG4vraTeddRh0W2HE70bVT5eLqqVssU/rqU04mCavgtpU/P JUNWErCwK6WM9W5OwdWjHLCE8oKI49ObC3Qv14JVlL/zNTwinooapD0p7Db5+sPuHnTP4XjvYNbb7 bIWryUB+A==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gXtOO-0007ZJ-Ca; Fri, 14 Dec 2018 19:45:00 +0000 Date: Fri, 14 Dec 2018 11:45:00 -0800 From: Matthew Wilcox To: Joe Perches 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 Subject: Re: [RFC 2/4] mm: separate memory allocation and actual work in alloc_vmap_area() Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0192c1984f42ad0a33e4c9aca04df90c97ebf412.camel@perches.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > I don't think so. > > I think it is the better style to separate > the error return from the normal return. Umm ... this blank line changed the file from having one blank line after the function to having two blank lines after the function.