Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp963039pxb; Wed, 3 Mar 2021 22:42:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJyncVTr8iGKmHvrrKP3laaRH9aJRsjiLJnLjX3OokVIpb8nTc9kh5wIMKY5T0QXudg7EqaI X-Received: by 2002:a17:907:9862:: with SMTP id ko2mr2554031ejc.222.1614840136163; Wed, 03 Mar 2021 22:42:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614840136; cv=none; d=google.com; s=arc-20160816; b=rQPfW7Od3cpEg577OkrPKT+u/rS0i5YJnMARHvWZ//J+0ESkeFTz+gN5E01VA78Rr7 FFntvx4a/nqw1mf1FwlLndfj36rGcbSlkVjpinAyPS8bfsUsfTeQn42gfhj3OUhEa+/r hSU9lW+65bt8l63P43a+LMXsJ5FqS8pxpf9CfgF/iPFU5WZk2jerkRY+CaHA+IYlHgjS bsRBiMGrIG+UoiRJtbUU6EsL7KYprwWpf7DvFo5cG7DQY1J2ZrxJQ05spC4H5WzZAHc8 U6kh9BIu/coPuVY/UDsWhnvOk7hJwng3abw3qyq1t5O9ga+n4ALCX33/8YkJ77pNmq3O /K6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=sQlYOY3q+jwKIF/p4KAZwYdxXwoIWL9zgjlvvo6D0x0=; b=rN4r1gjVJmkPwpv7CVNXh8h8bkdDLYH6kUEhbKuC9qAG2RfAvPViJ2CWK8xh9noG7w kUI0Xzmc2v5xpNYxsJCce/r9nBL1/aE3BTEJJCvAwR62o+7ZoACOxvYYOPqJd/okXHG1 Rxat0NWMVR/EzlB1Q/q1mabHtZTw52WOC3+uPaL8A7+woBemO+iPFey6c3RfkHnhUNxQ falYAZGP2Qb+GkLoY/BHqsOLOSFBQ59pCOUZOqmDMouTLg1iHrZtOMpIKy+80iyQxJbQ 2IySyXC5cHT0HGzm7b2IPXjYP1vJy+hi7h9Jc2dDxUX+Sle+OZHXlizsjMZxt+FQGfml nCNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=iPDVkOfF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si4669641edt.283.2021.03.03.22.41.54; Wed, 03 Mar 2021 22:42:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=iPDVkOfF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1448182AbhCBVS5 (ORCPT + 99 others); Tue, 2 Mar 2021 16:18:57 -0500 Received: from z11.mailgun.us ([104.130.96.11]:44753 "EHLO z11.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244388AbhCBS07 (ORCPT ); Tue, 2 Mar 2021 13:26:59 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1614709549; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=sQlYOY3q+jwKIF/p4KAZwYdxXwoIWL9zgjlvvo6D0x0=; b=iPDVkOfF08kk7drl8B+2tsJ89X4UlK5wv0QRTWWAVnVarWz1BcJ/X1Nz1bIuEB/K3Z2eIDkX XB0ALDv6UoXHyCQAiPQ8nQCS84XBBk6yZF0T1AvDmvHLb3vZv0e3o5fJbD7VR0VbS1FCfifQ GmyriyIwrnsWU6JSWm4dtQeR/mE= X-Mailgun-Sending-Ip: 104.130.96.11 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-east-1.postgun.com with SMTP id 603e7c4f2a53a9538a3e6f98 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 02 Mar 2021 17:56:31 GMT Sender: pintu=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 777ABC43461; Tue, 2 Mar 2021 17:56:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from blr-ubuntu-498.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pintu) by smtp.codeaurora.org (Postfix) with ESMTPSA id E9F57C433C6; Tue, 2 Mar 2021 17:56:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E9F57C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=pintu@codeaurora.org From: Pintu Kumar To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, pintu@codeaurora.org, iamjoonsoo.kim@lge.com, sh_def@163.com, mateusznosek0@gmail.com, bhe@redhat.com, nigupta@nvidia.com, vbabka@suse.cz, yzaikin@google.com, keescook@chromium.org, mcgrof@kernel.org, mgorman@techsingularity.net Cc: pintu.ping@gmail.com Subject: [PATCH] mm/compaction: remove unused variable sysctl_compact_memory Date: Tue, 2 Mar 2021 23:26:13 +0530 Message-Id: <1614707773-10725-1-git-send-email-pintu@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sysctl_compact_memory is mostly unsed in mm/compaction.c It just acts as a place holder for sysctl. Thus we can remove it from here and move the declaration directly in kernel/sysctl.c itself. This will also eliminate the extern declaration from header file. No functionality is broken or changed this way. Signed-off-by: Pintu Kumar Signed-off-by: Pintu Agarwal --- include/linux/compaction.h | 1 - kernel/sysctl.c | 1 + mm/compaction.c | 3 --- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/linux/compaction.h b/include/linux/compaction.h index ed4070e..4221888 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h @@ -81,7 +81,6 @@ static inline unsigned long compact_gap(unsigned int order) } #ifdef CONFIG_COMPACTION -extern int sysctl_compact_memory; extern unsigned int sysctl_compaction_proactiveness; extern int sysctl_compaction_handler(struct ctl_table *table, int write, void *buffer, size_t *length, loff_t *ppos); diff --git a/kernel/sysctl.c b/kernel/sysctl.c index c9fbdd8..66aff21 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -198,6 +198,7 @@ static int max_sched_tunable_scaling = SCHED_TUNABLESCALING_END-1; #ifdef CONFIG_COMPACTION static int min_extfrag_threshold; static int max_extfrag_threshold = 1000; +static int sysctl_compact_memory; #endif #endif /* CONFIG_SYSCTL */ diff --git a/mm/compaction.c b/mm/compaction.c index 190ccda..ede2886 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -2650,9 +2650,6 @@ static void compact_nodes(void) compact_node(nid); } -/* The written value is actually unused, all memory is compacted */ -int sysctl_compact_memory; - /* * Tunable for proactive compaction. It determines how * aggressively the kernel should compact memory in the -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.