Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11201559ybi; Thu, 25 Jul 2019 11:47:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3o4n4ArTS+X9l6Mou5pbKWAV8zmVdLxoclvhjexFl+n30MqWmw4Ta8B+uGKgpqPIMqqyI X-Received: by 2002:a17:902:b20d:: with SMTP id t13mr88003798plr.229.1564080443041; Thu, 25 Jul 2019 11:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564080443; cv=none; d=google.com; s=arc-20160816; b=Api3eMnmJkZkrVtmtpzbdbSaDLWCREWEtdPIxBF9yUvB8CB187ecmfTb7pokPkxm8W tLqoeropN+uzNCK+LATeeGM9nfV29ODnobdulS7CjI96aV47V/vE55PlG/aI+bUBiADi wnRJijq/yeDxjmDgLAB21lcpiMSB+KCbZyN6XEsSFgeLKgnvzHoyheECy2Flea9pFu5I Dj7JVLrLQonD0cOxYJ1HsxE5/W+fHGjVSCbixwp52L8eeqQvgBVwI3swWMeiwiYF/4YI T1vFVGYtz6wldRzUVa3xF9bp0zDgHNXb/eGE1OBWXl9AimqOpUdz+8OTB770k6nKjvah G1Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NhwngYDbvri5ejmcM0XgYmhjUBSSl/buGnAbDPDI9EI=; b=BLFT8y0+9x3olTtK0Uo+pSWz9Wnxca7p7qc5WDyfSbwf1d6tUAzmzyg0Kl2F2k/2qB QcxiFloIDbyrn+qGId5Acy3hc1R/rXXpOQnKXBlG6wlTlfOdddofOohCN5TTIAl4OmvK Yp61nTfRJz1Oc7t/2YPNmyD2Wtonz+Sw+ryf+oPFVP0Ns6tiqtdgcBaaGT6dYT96u8RY oHFgBoTS0aNFzi1cfI7cI3i6tzRyEPe52YoIS97LrKRmxkiwOszbzTgQtM5h4S+R1cWo UX21t2dgKse545OGUUIIJnrrkyOLfAwz702Hq1KkKNRTfJMrVEmSiNz+WxYPrZ96ETLR LzJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=itn+ATRx; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 124si18197487pgb.11.2019.07.25.11.47.08; Thu, 25 Jul 2019 11:47:23 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=itn+ATRx; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726554AbfGYSor (ORCPT + 99 others); Thu, 25 Jul 2019 14:44:47 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34495 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbfGYSoq (ORCPT ); Thu, 25 Jul 2019 14:44:46 -0400 Received: by mail-pl1-f195.google.com with SMTP id i2so23763496plt.1 for ; Thu, 25 Jul 2019 11:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NhwngYDbvri5ejmcM0XgYmhjUBSSl/buGnAbDPDI9EI=; b=itn+ATRxnc66FvQMYJryteL+cOXPgFskNlezDWkecZsggx+jExRT3w/o6Zozs9r4lG 7p+nYoCch1hfycj2Nee5j56Dal/g7Fchu2Bo2iHKtJuZT1VJX80T3oUPlIJFK8zFzP3l fLnG1YQh79ExZFmGg3Vdh4sIhJXUvwotn0Rdca8RSEGgBD61h9ckWIZGcKP63fnc4DeU NtdzrRSRiFo6iIaf5S09Z1w1VIWf47s6ZRjqMN/SQet0AgUstkkV0e/If8ZBqHwuVvZw n7UJO9EjWtc94vpUjFu23209ncO9R4sRtMWsUI649YSjzndG72fY/mV2qUIliSKCqnrP qPng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NhwngYDbvri5ejmcM0XgYmhjUBSSl/buGnAbDPDI9EI=; b=Bxp4PF7MwYKVLH4gOrHPICVAzLtZL/tqqDbSYLfXbF3+7+Ebqe6nV4TGFxbeooqg0v ca9hwOdXFVdSYJUZN53aklU3jq8tKp/wu9g8tGL2MBFZ1ELX7TihvLgIrq2vI0sQnIpu pOL1EjnZUe8OvfH+Xlb9iJxgM2udR0TKkpEtxWX1TXUuTaoVFN82CC1eHYpO5vQkJ2ar gj07nMB768lfBUaXlYuJEIOV/vsJ8FTvnV9zIXeJwkUkb5huee9tExEeWsXioGoHzRsR JayM8L7TN0pfiNVZDhJa05a30SZb1DWumT/sIC8Y84dpOyS07480RyTD09XLIsfB8RZk pR0g== X-Gm-Message-State: APjAAAVo0/bt7H1uEMS0fWO6QSbTRt8ie8nw277eMfgZyGD/LOskspUx kGkf6XaJ7jGO3p9ZuIZjl2M= X-Received: by 2002:a17:902:28e9:: with SMTP id f96mr88604969plb.114.1564080285671; Thu, 25 Jul 2019 11:44:45 -0700 (PDT) Received: from localhost.localdomain.localdomain ([2408:823c:c11:624:b8c3:8577:bf2f:3]) by smtp.gmail.com with ESMTPSA id w3sm43818257pgl.31.2019.07.25.11.44.37 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 25 Jul 2019 11:44:45 -0700 (PDT) From: Pengfei Li To: akpm@linux-foundation.org Cc: mgorman@techsingularity.net, mhocko@suse.com, vbabka@suse.cz, cai@lca.pw, aryabinin@virtuozzo.com, osalvador@suse.de, rostedt@goodmis.org, mingo@redhat.com, pavel.tatashin@microsoft.com, rppt@linux.ibm.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Pengfei Li Subject: [PATCH 09/10] mm/compaction: use unsigned int for "kcompactd_max_order" in struct pglist_data Date: Fri, 26 Jul 2019 02:42:52 +0800 Message-Id: <20190725184253.21160-10-lpf.vector@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190725184253.21160-1-lpf.vector@gmail.com> References: <20190725184253.21160-1-lpf.vector@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because "kcompactd_max_order" will never be negative, so just make it unsigned int. Signed-off-by: Pengfei Li --- include/linux/compaction.h | 6 ++++-- include/linux/mmzone.h | 2 +- mm/compaction.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/linux/compaction.h b/include/linux/compaction.h index a8049d582265..1b296de6efef 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h @@ -175,7 +175,8 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, extern int kcompactd_run(int nid); extern void kcompactd_stop(int nid); -extern void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx); +extern void wakeup_kcompactd(pg_data_t *pgdat, unsigned int order, + int classzone_idx); #else static inline void reset_isolation_suitable(pg_data_t *pgdat) @@ -220,7 +221,8 @@ static inline void kcompactd_stop(int nid) { } -static inline void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx) +static inline void wakeup_kcompactd(pg_data_t *pgdat, unsigned int order, + int classzone_idx) { } diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 0947e7cb4214..60bebdf47661 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -723,7 +723,7 @@ typedef struct pglist_data { int kswapd_failures; /* Number of 'reclaimed == 0' runs */ #ifdef CONFIG_COMPACTION - int kcompactd_max_order; + unsigned int kcompactd_max_order; enum zone_type kcompactd_classzone_idx; wait_queue_head_t kcompactd_wait; struct task_struct *kcompactd; diff --git a/mm/compaction.c b/mm/compaction.c index aad638ad2cc6..909ead244cff 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -2607,7 +2607,7 @@ static void kcompactd_do_work(pg_data_t *pgdat) pgdat->kcompactd_classzone_idx = pgdat->nr_zones - 1; } -void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx) +void wakeup_kcompactd(pg_data_t *pgdat, unsigned int order, int classzone_idx) { if (!order) return; -- 2.21.0