From patchwork Mon Aug 14 08:44:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 9898463 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AAE4A602BA for ; Mon, 14 Aug 2017 10:02:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CB2F28533 for ; Mon, 14 Aug 2017 10:02:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90C18285F2; Mon, 14 Aug 2017 10:02:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1E1F1285E5 for ; Mon, 14 Aug 2017 10:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=85zaF67C0G4cncbM/3tf5PxhdONEtxniM6Anz+odmpw=; b=juLBgKv+CWoskz0lLbES3DFrbj tk3PtyUmdDc88yeBZBb6+VTy3PQTodFV4Q4MukYxc14YjexKwNM9NWfXdArX6oZ4oNyFVRNnyAUw8 SrRM0Ycrm/c6G2zUSxDC5V6toN0vyKyEjUgm3oo0Cmfs/WWQ2pdasKWEf0eYDViK5N22S+GhidGMZ kDYCgFyK7ujKLU/36XwZR7U8DysvjUQa0O/abdqT1N09M9wxMcw+ZDPp9imB/kq5Qv2d3+F+Umb9d U1LnoWYeqEgjnkQRtXY2wHcwimMNt8P47EizkdUG8jd4mP5qune9z2eQ5a1Eiw6SYzbuk5E4f92LJ jKa7dxGg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dhCCw-0006AB-Qv; Mon, 14 Aug 2017 10:02:50 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dhBzm-0004RF-Gk for linux-arm-kernel@bombadil.infradead.org; Mon, 14 Aug 2017 09:49:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: 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=2qj79eNwYcrfDaWI3c1d/4gtJG3BxqpO5jgSTshCbh8=; b=VxIQJ/RnCDUHhZRAH0r6QWmsk YVRgeMhSpDYG7oDktQmy0PQUZvwPRLv1KDp3cO5tJH4I0ImCbH1CMlJsZJ7EI3eANVbZk/VVknaue fhN7l7YEWGYGM4CB9CMfe/l5NBOIEqbRwLZLk0mPgdW4tlfwmHQCAeD3yZp6WOJLFfvwrjT/m59Xw FDmj4qHgTd8LfVfdqU+XNr4/gduRuXNVimQq3Ez+SWup2BxS3UCXjQkapt1Yh/InYJiZlGWFSu2QA vp+5stG+c1QiFfqtRz6Vezw2NZcwDNX/rM5gRfyq2Sp68/CK/3oCFsqzni+kAfQWpU6Dss3Iui89Y UXYkA1zow==; Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by merlin.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dhB03-00056m-GV for linux-arm-kernel@lists.infradead.org; Mon, 14 Aug 2017 08:45:28 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 04E1815BE; Mon, 14 Aug 2017 01:45:05 -0700 (PDT) Received: from login2.euhpc.arm.com (login2.euhpc.arm.com [10.6.26.144]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 349E23F577; Mon, 14 Aug 2017 01:45:04 -0700 (PDT) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: mm: Remove dead code in mem_init() Date: Mon, 14 Aug 2017 09:44:29 +0100 Message-Id: <1502700269-24384-3-git-send-email-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1502700269-24384-1-git-send-email-vladimir.murzin@arm.com> References: <1502700269-24384-1-git-send-email-vladimir.murzin@arm.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux@armlinux.org.uk, kbuild-all@01.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The code in question checks memory constrains to set default policy for overcommit; however we support page size of 4K only thus condition is always evaluated to false. Remove that dead code. Signed-off-by: Vladimir Murzin --- arch/arm/mm/init.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index ad80548..81d4482 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -580,16 +580,6 @@ void __init mem_init(void) BUILD_BUG_ON(PKMAP_BASE + LAST_PKMAP * PAGE_SIZE > PAGE_OFFSET); BUG_ON(PKMAP_BASE + LAST_PKMAP * PAGE_SIZE > PAGE_OFFSET); #endif - - if (PAGE_SIZE >= 16384 && get_num_physpages() <= 128) { - extern int sysctl_overcommit_memory; - /* - * On a machine this small we won't get - * anywhere without overcommit, so turn - * it on by default. - */ - sysctl_overcommit_memory = OVERCOMMIT_ALWAYS; - } } #ifdef CONFIG_STRICT_KERNEL_RWX