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=-10.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 1063CC433DF for ; Tue, 28 Jul 2020 14:18:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C3337206F5 for ; Tue, 28 Jul 2020 14:18:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ys6zUE87" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3337206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6D2E86B0083; Tue, 28 Jul 2020 10:18:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A92A6B0085; Tue, 28 Jul 2020 10:18:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E6506B0087; Tue, 28 Jul 2020 10:18:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0097.hostedemail.com [216.40.44.97]) by kanga.kvack.org (Postfix) with ESMTP id 463586B0083 for ; Tue, 28 Jul 2020 10:18:35 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EE0841EF2 for ; Tue, 28 Jul 2020 14:18:34 +0000 (UTC) X-FDA: 77087690148.06.house72_14029f526f6a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 5E81610044BCC for ; Tue, 28 Jul 2020 14:18:05 +0000 (UTC) X-HE-Tag: house72_14029f526f6a X-Filterd-Recvd-Size: 6138 Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jul 2020 14:17:58 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id d18so20915534ion.0 for ; Tue, 28 Jul 2020 07:17:58 -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=uiRcDeb6ox2yLj5fXNdoo05VO5CcXhShAkGVYjl04bA=; b=Ys6zUE87HGooZo1PtEgKd0uJDkaEkHFGsY1EOydtoSvjPDQl51Ix2N7rg4aqhB71lC j2VW2HZTKNWlVWHcU7VD2D5+PhV6cpWsdtKKe1/SK8sNiTxNDTNjkGR4BS0y22ANyoCC 4aHYx2avcGsIGwy2/PotHxNQwmXTqKRa2HRaUcQWN3yeLutu0lSdYw3Yx73YEYag5hPu QdgUT4EjVX27slSACOg8fzHrZP3TWN0F7LvKm5bkNOY9GRgQr+OVwFVrevJrsqF+FkCR q/sCLBF+MDkBqYZuWXN0ov2yL64I7sPhzA9kdFAHZulnJ9VKWgvOi5PKdoH56dAwi1m3 +Vmw== 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=uiRcDeb6ox2yLj5fXNdoo05VO5CcXhShAkGVYjl04bA=; b=HsJsj4Gs6+iBw/HafRUbq3FPVpaBybqQOYUSAV1xcl0YqjdaroKDQ+1Fyv1iXrwPch AJ+zOYhoPmcWrzfSl89DwedYGBJ1S5VjSmE3eedyOo+bZyRJBvh5HRV5kJRk3wWRSdl1 EuseikZTKQbupdjQP1VH59K8MVoL5wLUA0aYvjKh3Mc/4xfXfZSVCMcHTAGOCYvRSyRG /khEHfTw9K3lTaem2GQOb1qgN5IgODmavurMGJZZzAVdZE259UUlHeqbPsZEf0Fm068l iV/vR8YA28TwDb054VsDWLQO0K13dsFFUuf3dLQ008cgDOgSoB54jkybTImMkjr7D8W8 /jsA== X-Gm-Message-State: AOAM532HB+AKsHve4S92P7LhHfM2x9s0GnJSVvMbSaO93t6ApHPIFWam naw+llWhVBIeFsGk6mOoXNKmSb8Gdq8lBeYzkwA= X-Google-Smtp-Source: ABdhPJwBbS1GB98Y4FyDLwh4H/OtvXDdnPzhnInC0IVz8ECy3gVFmEqGDS9cDDfxjL49EqZh49ZaMH3Ncm+/fBVSf8Q= X-Received: by 2002:a5e:980f:: with SMTP id s15mr14176280ioj.5.1595945878359; Tue, 28 Jul 2020 07:17:58 -0700 (PDT) MIME-Version: 1.0 References: <1595681998-19193-1-git-send-email-alex.shi@linux.alibaba.com> <1595681998-19193-4-git-send-email-alex.shi@linux.alibaba.com> <3bd60e1b-a74e-050d-ade4-6e8f54e00b92@linux.alibaba.com> In-Reply-To: <3bd60e1b-a74e-050d-ade4-6e8f54e00b92@linux.alibaba.com> From: Alexander Duyck Date: Tue, 28 Jul 2020 07:17:47 -0700 Message-ID: Subject: Re: [PATCH v17 03/21] mm/compaction: correct the comments of compact_defer_shift To: Alex Shi 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 Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 5E81610044BCC X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: On Tue, Jul 28, 2020 at 4:59 AM Alex Shi wrote: > > > >> * 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< * are skipped before trying again. The number attempted since > * last failure is tracked with compact_considered. > + * compact_order_failed is the minimum compaction failed order. > */ > unsigned int compact_considered; > unsigned int compact_defer_shift; > diff --git a/mm/compaction.c b/mm/compaction.c > index 86375605faa9..4950240cd455 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -136,7 +136,7 @@ void __ClearPageMovable(struct page *page) > > /* > * Compaction is deferred when compaction fails to result in a page > - * allocation success. 1 << compact_defer_limit compactions are skipped up > + * allocation success. 1 << compact_defer_shift, compactions are skipped up > * to a limit of 1 << COMPACT_MAX_DEFER_SHIFT > */ > void defer_compaction(struct zone *zone, int order) Yes, that looks better to me. Reviewed-by: Alexander Duyck