Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11199294ybi; Thu, 25 Jul 2019 11:44:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3fPdKVCANJu/olOTUpUJOY1hwZiKEHS1+rmEN/IaMNyHrhLONO36/o6+ydrC3c9zQWdPX X-Received: by 2002:a62:7d13:: with SMTP id y19mr18073290pfc.62.1564080291068; Thu, 25 Jul 2019 11:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564080291; cv=none; d=google.com; s=arc-20160816; b=zv4LQuUo0SwSod8spTEUjK5E+tU8NgM/bVlgu7tzEX8yBHNSgQFC7GLswOxdXY13w+ H8NeNwSbHguXjJA44iOfcKqg0oAubxS+s/eKFR2waL4TyUrJo6GDDZ/8PSZQWPhdiiEP 10gKnrlu2T2xsP34e+vwYmX7zp8bE2d9S01UVnxQLZjHBu8rTsAZo0NCqZiq1fK3nNz5 +0luWfx+jUABnHAT2VrCrLM7aEEckdQhldoZbgI8ukNAxUAI66IL8A4sgJYPPy3NVgSY Z0aT8ZFjmFLwufyVlsbIsmqxWCwAugmB7ZkEqu8F7Ryr4J4aQcKZZ7dHDweJw9FpSKJ5 mGlA== 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=75v+7kFOX3fDCU6QmGh0HhSEpSdixRD3VTEDmH00T24=; b=sD6I+4kNblseVmpPI7oH46KCy5YPMagZEbQCTQzxPsDPgdUsdpL273lHz20gBFb1pF SP94AzOXiEqdN32DIc1UFAumeG4/+bwiemHnz6f/I0fH2qML1Nrp1XX5zx2FYubZ29uP MWmupb2yIixV4ID26lI8P/p0FYG4uZPVgX5iexB6tMMOe8nvFc94nYhjLrxFr16/JvSV /9oCD4waxhqXC3zT0QS3SOIuyove10VQC/5wA1bpdx7FeeJIHr4n9KfMV8or7OWgJXNE k3nFHsQIWSoY8EltSYthfWYdYAXytOFxMoRktFpJxl9UgaeBR5+/ZmbqJ7BEdOeVIrJT Y0tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dlyJ1Kob; 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 80si20269044pgf.5.2019.07.25.11.44.36; Thu, 25 Jul 2019 11:44:51 -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=dlyJ1Kob; 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 S1726319AbfGYSns (ORCPT + 99 others); Thu, 25 Jul 2019 14:43:48 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45454 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbfGYSns (ORCPT ); Thu, 25 Jul 2019 14:43:48 -0400 Received: by mail-pf1-f196.google.com with SMTP id r1so23180865pfq.12 for ; Thu, 25 Jul 2019 11:43:47 -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=75v+7kFOX3fDCU6QmGh0HhSEpSdixRD3VTEDmH00T24=; b=dlyJ1KobmoWLtFv7IcNUQJNez9fMahwQ5BinTISnEvaeniV2pgG2noG7Q17DcQHHhe kv1BWR9vH2jTvOCKHrFyHl2Z7FSzGX7IPCY1DtjJnKYZr9ao4LPqqwI/qzKZUmlfxxj9 gWoQjCwtrBIwL1CotH8OwPNZxE9sm3Gals+8TapRsll0joD1XmNmjoyhW2vel99FHMLl +v2xNA2JhyFRoDDtSggDSTjUFy4qrEY7KYIupvhwaByb4Y46kYtK2z4ns4C1yqY7zYyU ILNBVtcrVmOqkgkdWurIguRB5tzt0l1D6fPe1Y8dpyE5iGLmrtcwqAub4syvDoI9McrV GsEQ== 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=75v+7kFOX3fDCU6QmGh0HhSEpSdixRD3VTEDmH00T24=; b=D6mmz8LRM3hMnPH9l/XNH2cCLrToXxxDrHVvuPMXZFGnIQQM8z/mLOf1+NaDtiRZ4n xoS0llY4wC9clqO75+mkrzMV2wi5tFha81OYgZjuUx1Xpx+zNT3KvHny3eKKLmtbYMMB KUXxTQTrVaR2yB4rTMC0lOq2Vo0+pUIqda3jqle6MRwJTI2WPN+jqfS4wZ0NMptZOmtR 3RBJm3jYSpal0iyffpJjzj3pHdqzQPK5zOm7syxMTsM1RWBYjgLDj10GqAu4SM2r/Jem 9VZLLSqkJEqty/nuKvOOGPdm/Tz54pkxHT6bJpAFSqfQIjyZRJu1HQDJhsqht83PuOKT HEfw== X-Gm-Message-State: APjAAAXx9d3u3V3/0Uipo7awE7Si1ZkVtOT99y6wx2SFLiOboKu91XSV hmE6szmbgEgx0MllpUuNyUI= X-Received: by 2002:a63:b555:: with SMTP id u21mr89025235pgo.222.1564080227314; Thu, 25 Jul 2019 11:43:47 -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.43.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 25 Jul 2019 11:43:46 -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 02/10] mm/page_alloc: use unsigned int for "order" in __rmqueue_fallback() Date: Fri, 26 Jul 2019 02:42:45 +0800 Message-Id: <20190725184253.21160-3-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 "order" will never be negative in __rmqueue_fallback(), so just make "order" unsigned int. And modify trace_mm_page_alloc_extfrag() accordingly. Signed-off-by: Pengfei Li --- include/trace/events/kmem.h | 6 +++--- mm/page_alloc.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index eb57e3037deb..31f4d09aa31f 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h @@ -277,7 +277,7 @@ TRACE_EVENT(mm_page_pcpu_drain, TRACE_EVENT(mm_page_alloc_extfrag, TP_PROTO(struct page *page, - int alloc_order, int fallback_order, + unsigned int alloc_order, int fallback_order, int alloc_migratetype, int fallback_migratetype), TP_ARGS(page, @@ -286,7 +286,7 @@ TRACE_EVENT(mm_page_alloc_extfrag, TP_STRUCT__entry( __field( unsigned long, pfn ) - __field( int, alloc_order ) + __field( unsigned int, alloc_order ) __field( int, fallback_order ) __field( int, alloc_migratetype ) __field( int, fallback_migratetype ) @@ -303,7 +303,7 @@ TRACE_EVENT(mm_page_alloc_extfrag, get_pageblock_migratetype(page)); ), - TP_printk("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d", + TP_printk("page=%p pfn=%lu alloc_order=%u fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d", pfn_to_page(__entry->pfn), __entry->pfn, __entry->alloc_order, diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 75c18f4fd66a..1432cbcd87cd 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2631,8 +2631,8 @@ static bool unreserve_highatomic_pageblock(const struct alloc_context *ac, * condition simpler. */ static __always_inline bool -__rmqueue_fallback(struct zone *zone, int order, int start_migratetype, - unsigned int alloc_flags) +__rmqueue_fallback(struct zone *zone, unsigned int order, + int start_migratetype, unsigned int alloc_flags) { struct free_area *area; int current_order; -- 2.21.0