Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11428118ybi; Thu, 25 Jul 2019 16:22:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMIIXPOAMVUrM+bxW7yk7Wgo+FBPqV7rcLdFcURGPVsCv8aB2O3tFbxjPBCkD01cPyYfFo X-Received: by 2002:a63:3ec7:: with SMTP id l190mr91207480pga.334.1564096943660; Thu, 25 Jul 2019 16:22:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564096943; cv=none; d=google.com; s=arc-20160816; b=c3/hKBEb7ro65/+g3cX+68qLiJSzBQp7oinvVz5S84q9ApvkgoeIX/UmP2E/ISTxOB fezy44R2ZkrqZUGnao94+FFuKuoNdl0xMvizL4BTPX27bQcci9PbRpMJdXNFHIqpXxPh W2TSQ/DSHtRi69N4u0etTbHZCwqi9U/nazdPq3Y45u1VnUuQAn2Hh5yjfACIzpMuUESS KAH0Y2WjsVsejr3LJSF+6jfPCJD2AytzL47vPBqTU3LGBl6j9C7h17hY1UfJmG3FSkCj PFBelarBGk0mUEymDLTAFkUA4HQZpEF+CgkegtPD0vKr4tGespSh/rqIvlmj7isjKTE/ LmcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=38jxRDTFNsBuvXEWmRhAENl7Dn2UdsUzhcb9070VNP0=; b=XSQYecbr34d07iYU6X8HN3ljZ6zQezZoi/3iD+vQKwowk4V1Uk1uD7sh2iR/9kT2gr jKVUBnBUP3TfWMdenmky7DIRqadTGmueDJ9aYDQbf1i1QN/kl1R5Z13DBkDQItQ7R0Rn M59SdHCUUdks2/Vyq/jncfT4F5qQGi8xhhUMSGx09Fz89/wLswKOPN9kr01GL2jK8W2r EAsYyKk4+N7E3stBYD91Yo1k8NpxKwZ8DjGKpv54MaAP5JO+Hbph1+INWLrzNMlpc+Y3 Fjf24r2tvCVOai3s+pSXlhvuJK4ZhpnzdRJz1rovLi497H8OhhFfACIBnjUTOl53xeRu +k+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pOq4jwIH; 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 d12si17307999plo.68.2019.07.25.16.22.08; Thu, 25 Jul 2019 16:22: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=pOq4jwIH; 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 S1726906AbfGYXVN (ORCPT + 99 others); Thu, 25 Jul 2019 19:21:13 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46516 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726822AbfGYXVM (ORCPT ); Thu, 25 Jul 2019 19:21:12 -0400 Received: by mail-ot1-f65.google.com with SMTP id z23so25108886ote.13 for ; Thu, 25 Jul 2019 16:21:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=38jxRDTFNsBuvXEWmRhAENl7Dn2UdsUzhcb9070VNP0=; b=pOq4jwIH28H2b1iSOQrWo32IdYYxXTbBo3q1WI1pQZh+wScKbCT6GcyOW+Ai5qId/E WxRSp38HTlhmMKBUZhyHF0kthb3Hfu2IAtovYxX3MB+9XmSpeRl3KStvol8PJTMEdu98 hfSx+yBsxsA8MEwwx5UZKvguuEmqulFrDiDgOS9bu0eF0HJwBpIX5ATf10OuETHiSiW0 UcL1d3XJrzlfQSNNKQdj9XZ5ne/2qHm4vgh5tNIsqfI47F60RJfLOYSn3N8WDyA4V3iR ko3LLIDAbctiv1VW95oe08P4AR2xba15afj1ayy+/picFE4mCeH95DA03AoDUFwzchv8 f83Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=38jxRDTFNsBuvXEWmRhAENl7Dn2UdsUzhcb9070VNP0=; b=d1mK9K14U/h/+F2EHSVbfcg3oVU7rGn2JQz2apK5NFlLFHzM2O6BFgi7xXUqcJEV0N X9NMVm4610pwGZdVeE9FVBRlLBtRfdmCf36lCSu4JL3FU53y5TTxikryr2QstECbBC9C eJu32BMsk1asVfr0iDgDL7EWQL0lgCz47bB79f6wkeZGXYkjRHkbleNtxitJcfYd0eLO Tnjulz2z3F4zJBXDDSehJxUJF8Lmn4pG1ia+DJGnZjGfm2blB0sy3OGBXfit3w6VhIIR Tr4IYTWdEzgxcWpFK2NVUkujAwxz0XouSmkxPSA1929/TvMae0sOi+i4AXC4Tbby2tk7 4fEw== X-Gm-Message-State: APjAAAWyE8Y5zaqVBX7P92HwvN+QybbXHGVKMdc44k31zhwcLknkS0zJ JrVJNLuglMOHwRRr+k/n3FKzTZAAUmYXmQkSB08= X-Received: by 2002:a05:6830:2098:: with SMTP id y24mr25146806otq.173.1564096871998; Thu, 25 Jul 2019 16:21:11 -0700 (PDT) MIME-Version: 1.0 References: <20190725184253.21160-1-lpf.vector@gmail.com> <20190725184253.21160-2-lpf.vector@gmail.com> <20190725185800.GC30641@bombadil.infradead.org> In-Reply-To: <20190725185800.GC30641@bombadil.infradead.org> From: Pengfei Li Date: Fri, 26 Jul 2019 07:21:00 +0800 Message-ID: Subject: Re: [PATCH 01/10] mm/page_alloc: use unsigned int for "order" in should_compact_retry() To: Matthew Wilcox Cc: Andrew Morton , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 26, 2019 at 2:58 AM Matthew Wilcox wrote: > > On Fri, Jul 26, 2019 at 02:42:44AM +0800, Pengfei Li wrote: > > static inline bool > > -should_compact_retry(struct alloc_context *ac, int order, int alloc_flags, > > - enum compact_result compact_result, > > - enum compact_priority *compact_priority, > > - int *compaction_retries) > > +should_compact_retry(struct alloc_context *ac, unsigned int order, > > + int alloc_flags, enum compact_result compact_result, > > + enum compact_priority *compact_priority, int *compaction_retries) > > { > > int max_retries = MAX_COMPACT_RETRIES; > > One tab here is insufficient indentation. It should be at least two. Thanks for your comments. > Some parts of the kernel insist on lining up arguments with the opening > parenthesis of the function; I don't know if mm really obeys this rule, > but you're indenting function arguments to the same level as the opening > variables of the function, which is confusing. I will use two tabs in the next version. -- Pengfei