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 C8CE7C433E0 for ; Tue, 28 Jul 2020 11:59:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A719C206D7 for ; Tue, 28 Jul 2020 11:59:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729328AbgG1L7v (ORCPT ); Tue, 28 Jul 2020 07:59:51 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:57244 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728433AbgG1L7t (ORCPT ); Tue, 28 Jul 2020 07:59:49 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> * 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< Subject: Re: [PATCH v17 03/21] mm/compaction: correct the comments of compact_defer_shift Date: Tue, 28 Jul 2020 19:59:33 +0800 Message-ID: <3bd60e1b-a74e-050d-ade4-6e8f54e00b92@linux.alibaba.com> References: <1595681998-19193-1-git-send-email-alex.shi@linux.alibaba.com> <1595681998-19193-4-git-send-email-alex.shi@linux.alibaba.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Shakeel Butt , Joonsoo Kim , Wei Yang , "Kirill A. Shutemov" , Rong Chen >> * 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-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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<