Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp337252ybg; Tue, 28 Jul 2020 07:19:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyI8yH1/h5MfOMSJvGT9n+bBQK6ddFAmDg6pqu13iTLdKTNQqPUnyQCGG3gslfxGDErq103 X-Received: by 2002:a50:d50e:: with SMTP id u14mr25599799edi.256.1595945954020; Tue, 28 Jul 2020 07:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595945954; cv=none; d=google.com; s=arc-20160816; b=AKutYsM2l8Iou4kN3ttvzyBNo6zEwSmcqm/RLmTLNdzXSEbGtESin61Ou5DqE26r97 lV4iaUOXWnytnnwARg9iOThDkgHZiTgoe1o1GT//jhP9Elu7SpaQdLFGate/hOvbVSFr 4rRx9TuKFL4plKgE4hHqkUtPK5qSSwh/MXV5KkwIqa0CFKUuWtCOjl17szko2/0PwNF0 DFHph6noXz4lGQ2RX4mdtS7SM06C5zmW9LbaL+9Z5uZVUrCR6AGjpPbqQWAnfAUmIX8W kz3Iwg0K8Id212f6vpu7S72qEhuVqN/oDVlYdm2C1/VDlqblOt4HiZ74iqgLCVQAiiRQ Gg3A== 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=uiRcDeb6ox2yLj5fXNdoo05VO5CcXhShAkGVYjl04bA=; b=Bqe6sFq2eTQS7DUOh8eAOJcLUxLuquJ5Z5JqsbQzFBcWPK4o8uFqDcV1q4DJBgy40P m4PEB3xaIS1TjajVLPKVPk/pcaNit6Yilh6niMdGqgKdi2/IEQSSCE/cdpzbukIByF4s yDOPNDXAJAmUQLppSj43aOf3WUecQ/4I7quY/03yscX8e8o4Y5AqBe/hOWJAk2Mm4Fnf NC9nxlzJVBWfHI6oXDa3aPeiyRZ6oaedNHuZzcJOxkYLgEDAjoCqp/zEn8zXs1WhKzEQ EdxhlbxKGICKdO3uePJg17039sGcvwTIC41DJNwxhp3m1+nlUHnhcWGwXHU8YkMq+ICi Iz+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ys6zUE87; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id 18si6557482eju.472.2020.07.28.07.18.50; Tue, 28 Jul 2020 07:19:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ys6zUE87; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730367AbgG1OR7 (ORCPT + 99 others); Tue, 28 Jul 2020 10:17:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730307AbgG1OR7 (ORCPT ); Tue, 28 Jul 2020 10:17:59 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 008F9C061794; Tue, 28 Jul 2020 07:17:58 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id w12so7283339iom.4; 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=YdjxD/gyyDfZrflAMXQ9vqDkFWmrOInZVfVFbc5BfQhjaV4Zmn1uHmnN+getaYZw7j suRF4BS0J2YTFtfx6aj32GLhMLuZ0cFpNZlDMbErn8l3EoXX807x2YCPMAwg8NyITe2O SrZ/Tk9ZeUAvi4Rer868T8LPEVMwl+z+OV9TfCqrWqH0RKLln1uGdSiXtvNdNKvxG2jc PD3NTFahza78ZI/EulJdlkST6zBOX8/EYPYPgnp/IhCoAZGMokK+Tt2Ps4g3IbWuvXcT KtafTqjpt7UIWn87r0mHFvx74Q4ZvFFNXp5i1YUIj+eNm3WpSn/7TYLO74Tzv99A29HC sxUg== X-Gm-Message-State: AOAM532xpaqW5vl6fvaBTP5O4coyQzJj+qLkKpF4J3ego9W0wpTIWYpz ef6SeRBFjU1bVvSJhBhGisr8C3wtTO5FTAB7VcFRzf3T 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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