Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4861738imj; Wed, 13 Feb 2019 02:19:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IZVtK7YrfGqFQ65FpotDAHCwP3VCdjhRxEC28bcsxpwXUCSem+FG1Nw/1yFO4/ENrZsW5q/ X-Received: by 2002:a63:5964:: with SMTP id j36mr8230936pgm.210.1550053169328; Wed, 13 Feb 2019 02:19:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550053169; cv=none; d=google.com; s=arc-20160816; b=QKcreBYnw7Xt6P1ye9MF/0GN2/Z7/iDx32DbbuG2FQmEexiklqb+9S4ZE9Rr3qxNUr oB5b91/yhgCks11VClrPaTqKaL7siuZ578D5qLOkgrl7vmZsoLFojJsngp5juxzRfD8m VV4vGbxy7Ppz9cWljRxhakyXW3SyLeTsVZ3MNWy5emHVJWiuRVUpjC8/GU+2gYEiW3mp u1/jEczoR/FXgdZGybaJil7k/QGNS23hCB9wUwi3ueXbfyl4vwCrh0R86du6r6N7dPZa RoZy/7EPa/nexm4QcIXGxdcVnvIvEyaJ0PT3NuoSyaiOdSF6XBCsLTo9FWonf2Nw2PNf tdzQ== 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 :wdcipoutbound:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:dkim-signature; bh=YMct5sjsE/LEJf6skM2WjLnLw0RFLIEMPAOzaCMIZG8=; b=ETA7mk45a4o5ZQTZki4Wafw1R4HuOyFYchL4+8F8Pj0rEcoNuCpRLvFa3NRfQIAL0s 3iFlYo2TAP4dQVJBORjASZpPG3Ek7OO3d7cmB/fPl1FUy+jq3xR9Vg2P5TtC/sVEGnol FDrkxPl6MJrp3v+dIclk4YWurBA5mYHYn8qS3nnzrDZvw29gTL+/j/6arH+TKxtktCNJ du+5fRl4Y7T51wYX2R2Lb+yuxUVBE0g/wsDjDYoCIZEX9FW3pJrEj/OFk863QwYOqa7E ec76pIaYYF/OHBice6wRtVF0fczsZyFeKfFewbqMFYqP3mqvkxIdPtGimuETbpPsnzL0 X+pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=MTKDj4CX; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector1-wdc-com header.b=OzaTj33T; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4si4621098pgb.241.2019.02.13.02.19.10; Wed, 13 Feb 2019 02:19:29 -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=@wdc.com header.s=dkim.wdc.com header.b=MTKDj4CX; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector1-wdc-com header.b=OzaTj33T; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387714AbfBMHtm (ORCPT + 99 others); Wed, 13 Feb 2019 02:49:42 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:37979 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728060AbfBMHtm (ORCPT ); Wed, 13 Feb 2019 02:49:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550044182; x=1581580182; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=10LKNl0rya7UiDduqXXjWfStYMavURyHQmrOFPcRTvo=; b=MTKDj4CXw/lRbxCEA8Xu8yK07N39+6XqFSv+IP9NaORP2EVbu83DzNbn aC9IQw6GJWSR5TU/tpsO00CmI2Zq08LP9L2aI5hMKg6OYNDOZ7GJkQ0EH f3Ei3nHm6ge/H6uaQbNEbAH6Nf6HnLlLplGrNWBLmnsDmgK7SZ+L61azl A9U0fL5z2yOFJ92AJltBs8fU/NcxAFRE2NWlgLUvUHAmVFb4BuTfCW6Ld 97oKhlS04iGeFH6StX6v6yxYSGtkBIS/EQl0+XyGb9I+jhZIsPqvDrjAh g+Ej0T78fxz/ZEGM8M4vIoD0gunOWDEU/2r3K+5LrnUUIHlNMKnZtNPJR Q==; X-IronPort-AV: E=Sophos;i="5.58,365,1544457600"; d="scan'208";a="102867437" Received: from mail-by2nam05lp2055.outbound.protection.outlook.com (HELO NAM05-BY2-obe.outbound.protection.outlook.com) ([104.47.50.55]) by ob1.hgst.iphmx.com with ESMTP; 13 Feb 2019 15:49:41 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YMct5sjsE/LEJf6skM2WjLnLw0RFLIEMPAOzaCMIZG8=; b=OzaTj33TxroT+L0VIaboey36tGONmqqTLFioKAUHZmjeA1PyXa4UQALvLq0QGsi/F/D5RAtb5Y8eztQZBjnULtR8lWblWJQnX/Pc+gsMFF93CoPlTaeEp0eYG+VeSFSmnxDGsAi1FUqR8ItDguDjN3JmCT+Gb6mf+/whIQzKKaw= Received: from DM6PR04MB6059.namprd04.prod.outlook.com (20.178.226.89) by DM6PR04MB5849.namprd04.prod.outlook.com (20.179.51.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.21; Wed, 13 Feb 2019 07:49:39 +0000 Received: from DM6PR04MB6059.namprd04.prod.outlook.com ([fe80::d006:5be7:c3f:ba6c]) by DM6PR04MB6059.namprd04.prod.outlook.com ([fe80::d006:5be7:c3f:ba6c%2]) with mapi id 15.20.1601.023; Wed, 13 Feb 2019 07:49:39 +0000 From: Anup Patel To: Mike Rapoport , Christoph Hellwig CC: Palmer Dabbelt , Albert Ou , Atish Patra , Paul Walmsley , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v4 6/6] RISC-V: Free-up initrd in free_initrd_mem() Thread-Topic: [PATCH v4 6/6] RISC-V: Free-up initrd in free_initrd_mem() Thread-Index: AQHUw2XhneCVLsk8fkmL4zO8eU0wjqXdSEuAgAAPKgCAAALWoA== Date: Wed, 13 Feb 2019 07:49:39 +0000 Message-ID: References: <20190213063127.28703-1-anup.patel@wdc.com> <20190213063127.28703-7-anup.patel@wdc.com> <20190213064419.GA27012@infradead.org> <20190213073835.GA18267@rapoport-lnx> In-Reply-To: <20190213073835.GA18267@rapoport-lnx> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Anup.Patel@wdc.com; x-originating-ip: [129.253.179.161] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6efb6ebd-775f-4fd8-cd86-08d69187ce92 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020);SRVR:DM6PR04MB5849; x-ms-traffictypediagnostic: DM6PR04MB5849: wdcipoutbound: EOP-TRUE x-microsoft-exchange-diagnostics: =?us-ascii?Q?1;DM6PR04MB5849;23:9CYY7RQ4Zkqdnu6yBmgjNiQrNfIB6uG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cGE9GlKpXdzBRwYZNqyAetEFZDtl?= =?us-ascii?Q?Qn1OMdSVdn7vl+46kOb29QeEHyIvxMnpYOUzsk5cbGemEUmk04dRACoHqcep?= =?us-ascii?Q?oiyUKjoBn8vXTpEWRuvF0pvPflYRIac9TvdrrwQkXyM/0KoOLtbfwWwgqF/u?= =?us-ascii?Q?SF69l3KKaYyZjqxQt8xNUXMnW0JPOtA8qnkwUR0rXXmYah10VMkXOozXb3fL?= =?us-ascii?Q?gzJGprAvO5BM66+YPKzi0iKpyXrVXjDdX8oWU/rqVFmRLARraoVCWX7pIsu/?= =?us-ascii?Q?Wa8ExowhFj4GUv1aPTNTwPxDc/i6dOacT92nmOi4Ophq8JLPlmEXklc5zXQJ?= =?us-ascii?Q?t83EFScJtyzaTfLLcjj6yQ/BEe2nsnBDqA9rs+xLAkInQLXZH1BzxNpzfMwm?= =?us-ascii?B?QT09?= x-microsoft-antispam-prvs: x-forefront-prvs: 094700CA91 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(366004)(39860400002)(346002)(396003)(376002)(13464003)(189003)(199004)(51914003)(6246003)(68736007)(305945005)(229853002)(81166006)(74316002)(6116002)(8676002)(81156014)(256004)(14444005)(7736002)(3846002)(106356001)(8936002)(105586002)(6436002)(316002)(97736004)(2906002)(53936002)(86362001)(54906003)(110136005)(9686003)(99286004)(55016002)(11346002)(446003)(76176011)(66066001)(486006)(14454004)(478600001)(7696005)(102836004)(186003)(72206003)(53546011)(93886005)(71190400001)(33656002)(6506007)(25786009)(71200400001)(4326008)(26005)(476003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR04MB5849;H:DM6PR04MB6059.namprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: odDcxrD0/dzXEHIjbHITVaUI7JewdazFIyPaZRZ/ZiZ7GaSn08upieLID2/rJsOYwy+i0TKm+9+cOpR86ehUqvH10/rV4Fqb/enGqhC39Cf1PEowDwlIiRCgWH0KDGhCigsnq7wyMEGRxfRBQqe0xATR542E9fgwU8C/4ZHooRyTrRGIbvyX3TloR+c0gQzBe/sxNBegl2QHkKaZIDn+oIQyrgMBN/jeoUcAq/WCdyWMuthGjoNaFIL0/Wg0gPpChsVFSNGhVk00jqig8hCPVNTWNPcnX4pbj9aMwQa5tlsrBdmnJxeFVNYLsFZsyirQ8PmTo+km7yVrueYCmB2t2PslduMv3u3FJq2+BjyRdTOjNABzPLHDUWthcFInA0/tMDE2kGAc3wZ2Aqz3v+V6R9b01LS9DiYAWzeaneqz+z4= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6efb6ebd-775f-4fd8-cd86-08d69187ce92 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Feb 2019 07:49:39.0602 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5849 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Mike Rapoport [mailto:rppt@linux.ibm.com] > Sent: Wednesday, February 13, 2019 1:09 PM > To: Christoph Hellwig > Cc: Anup Patel ; Palmer Dabbelt > ; Albert Ou ; Atish Patra > ; Paul Walmsley ; linux- > riscv@lists.infradead.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH v4 6/6] RISC-V: Free-up initrd in free_initrd_mem() >=20 > Hi, >=20 > On Tue, Feb 12, 2019 at 10:44:19PM -0800, Christoph Hellwig wrote: > > On Wed, Feb 13, 2019 at 06:32:24AM +0000, Anup Patel wrote: > > > index 9cd583b6d1cd..c22b873de856 100644 > > > --- a/arch/riscv/kernel/setup.c > > > +++ b/arch/riscv/kernel/setup.c > > > @@ -97,8 +97,9 @@ static void __init setup_initrd(void) > > > initrd_end =3D 0; > > > } > > > > > > -void free_initrd_mem(unsigned long start, unsigned long end) > > > +void __init free_initrd_mem(unsigned long start, unsigned long end) > > > { > > > + memblock_free(__pa(start), end - start); > > > > I'm pretty sure this should be a call to free_reserved_area instead. > > > > All regions reserved using memblock_reserved and not freed before > > initializing the MM are marked reserved and don't have valid page > > counts, etc. > > > > So we need the actions in free_reserved_area to actually make the > > memory useful. Now every other architecture except for arm64 seems to > > do fine without a memblock_free. I'm not an expert on memblock (but > > I've CCed one), but I guess the reason is that once the kernel has > > booted we don't really care about freeing memblock area. >=20 > This late in the boot process there should be a call to > free_reserved_area() to give pages to the buddy allocator. >=20 > memblock_free() is has no real effect at this point, no idea why arm64 ca= lls it. Thanks for the info. I will update this patch to use free_reserved_area(). Regards, Anup