Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp37971imu; Fri, 14 Dec 2018 14:00:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/WA+2DRp3fQrnyB/qU07piCOedm9S8e+y3/4k8F659PC05+KYps9vW6ih14F1zawOtHGmnS X-Received: by 2002:a17:902:6b46:: with SMTP id g6mr4444218plt.21.1544824830712; Fri, 14 Dec 2018 14:00:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544824830; cv=none; d=google.com; s=arc-20160816; b=YIlIA6p0DY3KxUdK/k2dLg4+IgaX1AQYiLyAFuJT43Ho34nXbDoaPmLw+185HNAzn5 LFgYU/Uh1tOeSck7MYZoolMG0salKspOkTwNAjCyHTr9UBQTCbjIQnmMJmBIPMmllEYe 5amukaolR4+gug4bfBTmYcqMj4fRwp3nABjjzTKKNDiRb20FwQalxlK6erIcfaZ2gkJx byamqdMswK+d30v0C2neQb/1bsI0ccv1dX8UxwjNZM9OkiDSFYlyy+51prGnPXC5xvoo uIbU+WQqnr33lfgdx0XUfto9m9Aoy3orpOj92sjwopAkpZFl+giZVnqZqBBgcEdHWAzp 28iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:spamdiagnosticmetadata:spamdiagnosticoutput :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=h/DScmKHnQ0tHXnmkOFx+tNgVsHO7n8i6Yxpl7bM0+U=; b=Ly4PigP1HaRZ46hdD4UhYIVmdwB4v0T4xwRbR8gMBhACU1CaRQrEL6ersdQfL6/i/C scfiMgJ52VIC9SIjXS9jlQ5XazqkF66518UyP9gGwebwUGz2/HxFtiqARYbkVPtKGxzj vdTwLtcRMNWeBy0g6BhksOlzLF69ibT7bRNAavv7Lu1FkHcx7f50ZQiGcvuheVO69TbX nExqOktjdLCFBoxU4IRK/wC6RSbqUzqQzryVwR6+Wq4n//uG08h+4R4LRgfDyk/z+j7z VMI2L0N61bHuj+TYGqNwf6sKgb8TRCDP8dSBhvqoiEc+Ui5Cw/AZUv0raAIhmNXrdB4B tXjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=DrwMNVOC; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=NNRRo8KO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si4665042plq.345.2018.12.14.14.00.15; Fri, 14 Dec 2018 14:00:30 -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=pass header.i=@fb.com header.s=facebook header.b=DrwMNVOC; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=NNRRo8KO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731409AbeLNV6a (ORCPT + 99 others); Fri, 14 Dec 2018 16:58:30 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:56788 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730987AbeLNV6a (ORCPT ); Fri, 14 Dec 2018 16:58:30 -0500 Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.16.0.27/8.16.0.27) with SMTP id wBELvSus008224; Fri, 14 Dec 2018 13:57:38 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=h/DScmKHnQ0tHXnmkOFx+tNgVsHO7n8i6Yxpl7bM0+U=; b=DrwMNVOCZlyfAhvKzHF73NkJ2bkIdUGa9Xz3JEzzKIy+Ls6qy1c2RnPFjMj2ZyUy8dSa PPE4mAwhPyPI/P9dCbbbVlmpRtZIrmDJjgdYTxbVzPr4nK97NL8daQmSJeWdIl8pbAa2 fS/afRgfQlBWPL92EDLSBup5e4V2eOB4cdU= Received: from maileast.thefacebook.com ([199.201.65.23]) by m0001303.ppops.net with ESMTP id 2pckmwr79h-8 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 14 Dec 2018 13:57:38 -0800 Received: from frc-mbx05.TheFacebook.com (2620:10d:c0a1:f82::29) by frc-hub03.TheFacebook.com (2620:10d:c021:18::173) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3; Fri, 14 Dec 2018 13:57:21 -0800 Received: from frc-hub06.TheFacebook.com (2620:10d:c021:18::176) by frc-mbx05.TheFacebook.com (2620:10d:c0a1:f82::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3; Fri, 14 Dec 2018 13:57:21 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3 via Frontend Transport; Fri, 14 Dec 2018 13:57:21 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h/DScmKHnQ0tHXnmkOFx+tNgVsHO7n8i6Yxpl7bM0+U=; b=NNRRo8KO1KfOs8pPTr1Fsv3eU1lIQ4C0R9GpgjkJ5bpM49p7VDpHoWC7BdMKlmlYpIB7QJvLHULSrgeSkp0ZpRiHyLlH0EGqihVAv0+1bv2U7a1NOnfDzsflvmYNsq3iMTxkWLaVT7AsHRswp2PRXWMdSdg03H0Q70b38fYluHI= Received: from BYAPR15MB2631.namprd15.prod.outlook.com (20.179.156.24) by BYAPR15MB3512.namprd15.prod.outlook.com (20.179.60.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1425.18; Fri, 14 Dec 2018 21:57:19 +0000 Received: from BYAPR15MB2631.namprd15.prod.outlook.com ([fe80::990:c2e0:2a8a:25c5]) by BYAPR15MB2631.namprd15.prod.outlook.com ([fe80::990:c2e0:2a8a:25c5%3]) with mapi id 15.20.1425.021; Fri, 14 Dec 2018 21:57:19 +0000 From: Roman Gushchin To: Matthew Wilcox CC: Joe Perches , Roman Gushchin , "linux-mm@kvack.org" , Alexey Dobriyan , Johannes Weiner , Michal Hocko , Vlastimil Babka , "linux-kernel@vger.kernel.org" , Kernel Team Subject: Re: [RFC 2/4] mm: separate memory allocation and actual work in alloc_vmap_area() Thread-Topic: [RFC 2/4] mm: separate memory allocation and actual work in alloc_vmap_area() Thread-Index: AQHUk9fzDSxUUU4eTEmN2i0i66X5W6V+ibUAgAAYaoCAAAEwAIAAJPOA Date: Fri, 14 Dec 2018 21:57:19 +0000 Message-ID: <20181214215713.GA27488@tower.DHCP.thefacebook.com> 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> In-Reply-To: <20181214194500.GF10600@bombadil.infradead.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR02CA0017.namprd02.prod.outlook.com (2603:10b6:300:4b::27) To BYAPR15MB2631.namprd15.prod.outlook.com (2603:10b6:a03:152::24) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2620:10d:c090:200::4:3282] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BYAPR15MB3512;20:wEJdKAKMcDJl0jTYXXN1q3tKld09zaUmHxtEKjafQpy5HpoUgfEZ2QhfJ8GcvBiT+4KsxT1uQj5gQ+tNJN4gwU2ziACbNaiteyPjCf0HhMboO5dN4teqDuDcs/ihB0KXrhPpWipqmI3wp8U7nLqFj8LPmaGBBT7xBurLSsR8Wyc= x-ms-office365-filtering-correlation-id: 92219e0a-7e0c-46a1-cbab-08d6620f1e52 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BYAPR15MB3512; x-ms-traffictypediagnostic: BYAPR15MB3512: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(3230021)(999002)(11241501185)(6040522)(2401047)(5005006)(8121501046)(823302103)(10201501046)(3231475)(944501520)(52105112)(3002001)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BYAPR15MB3512;BCL:0;PCL:0;RULEID:;SRVR:BYAPR15MB3512; x-forefront-prvs: 08864C38AC x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(376002)(366004)(39860400002)(396003)(136003)(189003)(199004)(305945005)(105586002)(7736002)(6916009)(478600001)(2906002)(6116002)(6486002)(14454004)(229853002)(256004)(6436002)(1076002)(11346002)(6506007)(46003)(186003)(33896004)(4326008)(386003)(102836004)(486006)(6246003)(53936002)(68736007)(25786009)(446003)(9686003)(6512007)(86362001)(5660300001)(52116002)(99286004)(39060400002)(76176011)(8936002)(54906003)(316002)(8676002)(33656002)(93886005)(81166006)(71190400001)(71200400001)(81156014)(106356001)(4001150100001)(476003)(97736004)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR15MB3512;H:BYAPR15MB2631.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 0Z1G/hhkmdLM5n/CIpMtQ0ZFuxpfSNrguTk76gwtq6mHeonW11QG6O+uWYwMv4I4Z2c2PLApxlgCSxSDVZQm79G+l1ITfsQw2sfYhPWkwNyFwfvqiFEXZktkZFNDwH//XaAsvZCCcLclawn/EEDtsUlwQMmTWkaYfLzKDon/OpajWffsFei8rz8rSdbOSKcUbrr23BDzPOYH3JGxVyfrqwoCrmtZjUKT33hqNJiMgHmzeSfE0P6sx6/bOGjuffEKVvxYFiZbJ1fPgaoh3o55CVod0+U9Hq8DHyZRCNayfywqvIeBudnTrBvmj8G8nigV spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 92219e0a-7e0c-46a1-cbab-08d6620f1e52 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2018 21:57:19.4899 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB3512 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-14_12:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe 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:45:00AM -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, w= ithin 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 =3D kmalloc_node(sizeof(struct vmap_area), > > > > + gfp_mask & GFP_RECLAIM_MASK, node); > > > > + if (unlikely(!va)) > > > > + return ERR_PTR(-ENOMEM); > > > > + > > > > + ret =3D init_vmap_area(va, size, align, vstart, vend, node, gfp_m= ask); > > > > + if (ret) { > > > > + kfree(va); > > > > + return ERR_PTR(ret); > > > > + } > > > > + > > > > + return va; > > > > } > > > > =20 > > > > + > > >=20 > > > Another spurious blank line? > >=20 > > I don't think so. > >=20 > > I think it is the better style to separate > > the error return from the normal return. >=20 > Umm ... this blank line changed the file from having one blank line > after the function to having two blank lines after the function. >=20 Yes, it's an odd free line (here and above), will remove them in v2. Thanks!