Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp882185imm; Fri, 3 Aug 2018 13:19:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdb/UebdSNp8E6dZiI/ynferIYmzLlGUG/7vezP4P4aFa8LjBxjkXkAegxt6Ykl+4ZOa8Tv X-Received: by 2002:a63:a70f:: with SMTP id d15-v6mr5169551pgf.168.1533327565426; Fri, 03 Aug 2018 13:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533327565; cv=none; d=google.com; s=arc-20160816; b=GJqKEAly7GbvCEXGS6iN3EJLcub0cMcV/mQGlLL8aAb998bxo9Nic3+kRMYSppAaJm 0pSrFnwxdVlQ6W5P6z1FImTj5AK6ufPuudNZJHqYKCBl8VSescUTES3waMf813KyHXEL wRxpKKrEcigqB+KLXesYTuAN0uIMhzIMM3GISWVJ1YnPcIlsKDTT6H6wa4UiGyJyh/Co 17fQDM9MBe3ffMp0muq2BaGutVxA5D9HIjjiPkFFjztFCL4/C/suOO14fO5Kv3+DSzGV GA5TFha1oLOPqCTrvaJ82FzOPFGJ14xDgb56XlHcD3FNJrSy8Q0Vb+II8WsulkAthapk P78Q== 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:arc-authentication-results; bh=xxm5yzE2KCpnBtC1Vb+Gai4nuBcF6u96ZhelvTjYrLo=; b=l1MwhbE4qzcwkKd3TNbGgJd6J4AtTinQBAOl+qwGZlCcPXBu5PZe5oU8opaRPb4hIj X2SQ8rVDgpQkahcwU75kfthTSsgQzQTD290okFzBCk9b58QLgtLbRtf3WQEKx0iNiETd mEgbNIordxMLxNaZZlRxJ7tteHMnYsXIClMZ1yOOPDlZbG8XTY9LanHCdeVFwYjOn9xb YaNepgZC81Nh5cJt6smI1t9km2utd9A0ag/vK+tVEcSdzbO4O0PSoPP7MP8F/sd6ZIxW LAlQVk0fZsP6IqadlPA4aZvNxOBaAl71a42DWoV8vEaFTRcePcXYcjFRcuZ9bTfRXGNN 3GBQ== ARC-Authentication-Results: i=1; mx.google.com; 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 t18-v6si4091121plo.191.2018.08.03.13.19.10; Fri, 03 Aug 2018 13:19:25 -0700 (PDT) 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; 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 S1731885AbeHCWQI (ORCPT + 99 others); Fri, 3 Aug 2018 18:16:08 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:39828 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728470AbeHCWQI (ORCPT ); Fri, 3 Aug 2018 18:16:08 -0400 Received: from ravnborg.org (unknown [158.248.196.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 644EF20026; Fri, 3 Aug 2018 22:18:17 +0200 (CEST) Date: Fri, 3 Aug 2018 22:18:16 +0200 From: Sam Ravnborg To: Mike Rapoport Cc: "David S. Miller" , Michal Hocko , sparclinux@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] sparc32: tidy up ramdisk memory reservation Message-ID: <20180803201816.GB7789@ravnborg.org> References: <1533210833-14748-1-git-send-email-rppt@linux.vnet.ibm.com> <1533210833-14748-3-git-send-email-rppt@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1533210833-14748-3-git-send-email-rppt@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=dqr19Wo4 c=1 sm=1 tr=0 a=ddpE2eP9Sid01c7MzoqXPA==:117 a=ddpE2eP9Sid01c7MzoqXPA==:17 a=kj9zAlcOel0A:10 a=voM4FWlXAAAA:8 a=CucM_c5qC89G46TZzaAA:9 a=CjuIK1q_8ugA:10 a=IC2XNlieTeVoXbcui8wp:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike. On Thu, Aug 02, 2018 at 02:53:53PM +0300, Mike Rapoport wrote: > The detection and reservation of ramdisk memory were separated to allow > bootmem bitmap initialization after the ramdisk boundaries are detected. > Since the bootmem initialization is removed, the reservation of ramdisk > memory can be done immediately after its boundaries are found. When touching this area could you look at introducing a find_ramdisk() function like we do for sparc64? It is always nice when the codebases look alike. Then you could combine your simplification with some refactoring that further increases readability. See: https://patchwork.ozlabs.org/patch/151194/ for my attempt from long time ago. Sam