Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11207072ybi; Thu, 25 Jul 2019 11:54:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQro9NUVBX56wOpnTErYVJAc5XlAjEWbvLFaxGl6JdYYH46CvU3434nan9ExdWvjmco1/n X-Received: by 2002:a62:fc0a:: with SMTP id e10mr18094316pfh.114.1564080862994; Thu, 25 Jul 2019 11:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564080862; cv=none; d=google.com; s=arc-20160816; b=wVu+GHzRlp3CWvK4TPRbYEFLLrQyoV/VIUjOOeyP+JavC+4bSK9BJiRUqCUX/WB7Ba cgB6RmYjWxfMv5CgcrzrNz8irLL5NRbgK9U0dil7YIVlAzOw5QU1Us4895EzGnMAjLRP 3Ip6gBzANJunjyODHDj3CX/Gt/BBed4/jS8thyXi0LH79ngRnz4vTBmg00mZR8Wy+qmj wj7xZkgLuy+2M+VJ18IXIanueE6U1nMHM5FP8xrdQ82rnxRdSZE61shuvP24pbTCRmox UAPQdoC3gPYfFgz7h0Cd/bil98XTehO8AE1rDVoKC1Nil0ArtLh8t2hfKdciL6/vfZw8 Zk4g== 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:date:cc:to:from:subject:message-id :dkim-signature; bh=w30g8iTJZ+UU2qLPrb+evOZb5z9OWHBiOGbGq1jemNU=; b=T1kfhFRlsXPYXoyUkg3f24y2+Sea3DikDCZUc1/f7DnMFAXLYsF7OFVjKu3dYwRnFf TaS8qNbfd2pb9a0Lgv5KhNXVqTpGprJ0+SHPN9UjSl9zD6UMMUcMHpcBiZUcu7oYPy28 fZcd3lQojuvWViqI7J1UKwBrjzyS6HF4EpX7zPqxFpmqpAUC2Lw8IM3fXCe6rgpEgXSI vJzpvz3UO8MSzV2T20G8fnTw97r+dTzDYuUbnJJDBnQXiUDVMazzZMYoWaDfYqIuR773 3jFac4D+j90Ktc9e9ozpmTOKcZXhWrp72Qf9Q1AyEQM7yIazBB+xc/hFjngj0ZnH1IGe IleQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=fk5PxdqX; 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 bh8si16404542plb.175.2019.07.25.11.54.07; Thu, 25 Jul 2019 11:54:22 -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=@lca.pw header.s=google header.b=fk5PxdqX; 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 S1726426AbfGYSww (ORCPT + 99 others); Thu, 25 Jul 2019 14:52:52 -0400 Received: from mail-ua1-f66.google.com ([209.85.222.66]:42702 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726107AbfGYSww (ORCPT ); Thu, 25 Jul 2019 14:52:52 -0400 Received: by mail-ua1-f66.google.com with SMTP id a97so20236378uaa.9 for ; Thu, 25 Jul 2019 11:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=w30g8iTJZ+UU2qLPrb+evOZb5z9OWHBiOGbGq1jemNU=; b=fk5PxdqXwDMPwORg3XCxFG7uAIyVeAxzjCVFr+xY1GzC38VvJWux97NE9QX+CMxCWT dW04AcGMPDsLPV36Mle3sHH8SfBxjOIw/qUNl8V7ZhAGicnLTjfSfmoBiocxOZZg4bsX GueHeMwj15Cu7ORpM8BNUmrifrXhJs/fxE9WQyPlh1AHJW8e1ZDTzDFM3b2Y8A8cZ5Ee Zym/8PjXzAcatIUnO7Fm1FMiiuJMEr9QWCVp9O3lKHrMoKEn4pG7flqM/1RgO/i7Tp5H NB1nrOVWLfVvMaxoRs94O2pNu7mq8vhq1LjdJr0p7wEW5WxeQ6k84EitR4kgT4ZHfBrk 8fPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=w30g8iTJZ+UU2qLPrb+evOZb5z9OWHBiOGbGq1jemNU=; b=rl2eGwZUyfLNb6RNQuDYph5NjSTY/f8P/jVKSUR0aMj/OKwtQzedwSNtsnZeuG7rkE Rtol3QXPbS18rxI3MSdxh0ytoHCWZTZlt0CVW4/ffRsJzaC99y5vGuLEMLlDTupyfQRV GGAtLZzZ6F9JfQyjaptPnAG2UfR2BA5rjYvnF65LBzBB8oaT7Zp1o5OnWHY42Ummg++c JGvfpdn1qsfpeBqwsygnTF7oLyO4qNHXrQmMUeFk5ycQTrBBR9T9NtrM/yYK8zB8uaUG 9thUtH18TBzmtIB0eAYQmq8iNlDpu7j3zkC2MMViTq/xNP55Q6m/K0elPp7zq+26rWh3 GnSQ== X-Gm-Message-State: APjAAAUGDfPjR6spTBJitFV0/cl1eOEWgG7SuV2TpPV6OdFZH/wy1UBr phKzbH8/VJ9CbB2e/NNzZAdLUw== X-Received: by 2002:a9f:2269:: with SMTP id 96mr55944133uad.80.1564080771058; Thu, 25 Jul 2019 11:52:51 -0700 (PDT) Received: from dhcp-41-57.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id l20sm15288616vkl.2.2019.07.25.11.52.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 11:52:50 -0700 (PDT) Message-ID: <1564080768.11067.22.camel@lca.pw> Subject: Re: [PATCH 00/10] make "order" unsigned int From: Qian Cai To: Pengfei Li , akpm@linux-foundation.org Cc: mgorman@techsingularity.net, mhocko@suse.com, vbabka@suse.cz, 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 Date: Thu, 25 Jul 2019 14:52:48 -0400 In-Reply-To: <20190725184253.21160-1-lpf.vector@gmail.com> References: <20190725184253.21160-1-lpf.vector@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) 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 On Fri, 2019-07-26 at 02:42 +0800, Pengfei Li wrote: > Objective > ---- > The motivation for this series of patches is use unsigned int for > "order" in compaction.c, just like in other memory subsystems. I suppose you will need more justification for this change. Right now, I don't see much real benefit apart from possibly introducing more regressions in those tricky areas of the code. Also, your testing seems quite lightweight. > > In addition, did some cleanup about "order" in page_alloc > and vmscan. > > > Description > ---- > Directly modifying the type of "order" to unsigned int is ok in most > places, because "order" is always non-negative. > > But there are two places that are special, one is next_search_order() > and the other is compact_node(). > > For next_search_order(), order may be negative. It can be avoided by > some modifications. > > For compact_node(), order = -1 means performing manual compaction. > It can be avoided by specifying order = MAX_ORDER. > > Key changes in [PATCH 05/10] mm/compaction: make "order" and > "search_order" unsigned. > > More information can be obtained from commit messages. > > > Test > ---- > I have done some stress testing locally and have not found any problems. > > In addition, local tests indicate no performance impact. > > > Pengfei Li (10): >   mm/page_alloc: use unsigned int for "order" in should_compact_retry() >   mm/page_alloc: use unsigned int for "order" in __rmqueue_fallback() >   mm/page_alloc: use unsigned int for "order" in should_compact_retry() >   mm/page_alloc: remove never used "order" in alloc_contig_range() >   mm/compaction: make "order" and "search_order" unsigned int in struct >     compact_control >   mm/compaction: make "order" unsigned int in compaction.c >   trace/events/compaction: make "order" unsigned int >   mm/compaction: use unsigned int for "compact_order_failed" in struct >     zone >   mm/compaction: use unsigned int for "kcompactd_max_order" in struct >     pglist_data >   mm/vmscan: use unsigned int for "kswapd_order" in struct pglist_data > >  include/linux/compaction.h        |  30 +++---- >  include/linux/mmzone.h            |   8 +- >  include/trace/events/compaction.h |  40 +++++----- >  include/trace/events/kmem.h       |   6 +- >  include/trace/events/oom.h        |   6 +- >  include/trace/events/vmscan.h     |   4 +- >  mm/compaction.c                   | 127 +++++++++++++++--------------- >  mm/internal.h                     |   6 +- >  mm/page_alloc.c                   |  16 ++-- >  mm/vmscan.c                       |   6 +- >  10 files changed, 126 insertions(+), 123 deletions(-) >