From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE4D2C433E3 for ; Tue, 28 Jul 2020 11:59:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BCADD206D7 for ; Tue, 28 Jul 2020 11:59:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCADD206D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 30F136B002F; Tue, 28 Jul 2020 07:59:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 297E16B0030; Tue, 28 Jul 2020 07:59:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13A356B0031; Tue, 28 Jul 2020 07:59:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id EFA8D6B002F for ; Tue, 28 Jul 2020 07:59:53 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A5C87180AD817 for ; Tue, 28 Jul 2020 11:59:53 +0000 (UTC) X-FDA: 77087340666.23.knot00_220f42326f69 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 7CF7A37613 for ; Tue, 28 Jul 2020 11:59:53 +0000 (UTC) X-HE-Tag: knot00_220f42326f69 X-Filterd-Recvd-Size: 4473 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 11:59:51 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07484;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0U43tT5Y_1595937583; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U43tT5Y_1595937583) by smtp.aliyun-inc.com(127.0.0.1); Tue, 28 Jul 2020 19:59:44 +0800 Subject: Re: [PATCH v17 03/21] mm/compaction: correct the comments of compact_defer_shift To: Alexander Duyck Cc: Andrew Morton , Mel Gorman , Tejun Heo , Hugh Dickins , Konstantin Khlebnikov , Daniel Jordan , Yang Shi , Matthew Wilcox , Johannes Weiner , kbuild test robot , linux-mm , LKML , cgroups@vger.kernel.org, Shakeel Butt , Joonsoo Kim , Wei Yang , "Kirill A. Shutemov" , Rong Chen References: <1595681998-19193-1-git-send-email-alex.shi@linux.alibaba.com> <1595681998-19193-4-git-send-email-alex.shi@linux.alibaba.com> From: Alex Shi Message-ID: <3bd60e1b-a74e-050d-ade4-6e8f54e00b92@linux.alibaba.com> Date: Tue, 28 Jul 2020 19:59:33 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 7CF7A37613 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: >> * Compaction is deferred when compaction fails to result in a page >> - * allocation success. 1 << compact_defer_limit compactions are skipped up >> + * allocation success. compact_defer_shift++, compactions are skipped up >> * to a limit of 1 << COMPACT_MAX_DEFER_SHIFT >> */ >> void defer_compaction(struct zone *zone, int order) > > So this doesn't read right. I wouldn't keep the "++," in the > explanation, and if we are going to refer to a limit of "1 << > COMPACT_MAX_DEFER_SHIFT" then maybe this should be left as "1 << > compact_defer_shift". > Thanks for comments! So is the changed patch fine? -- >From 80ffde4c8e13ba2ad1ad5175dbaef245c2fe49bc Mon Sep 17 00:00:00 2001 From: Alex Shi Date: Tue, 26 May 2020 09:47:01 +0800 Subject: [PATCH] mm/compaction: correct the comments of compact_defer_shift There is no compact_defer_limit. It should be compact_defer_shift in use. and add compact_order_failed explanation. Signed-off-by: Alex Shi Cc: Andrew Morton Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- include/linux/mmzone.h | 1 + mm/compaction.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index f6f884970511..14c668b7e793 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -512,6 +512,7 @@ struct zone { * On compaction failure, 1<