Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp117888ybt; Thu, 25 Jun 2020 16:56:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBckGAQP/LGddakgKN33g1+PCGtf6b+bfCL6GwKnS9+5Y1HAlWI8xCv+WR5AfDYFYsH42Y X-Received: by 2002:a17:906:5e06:: with SMTP id n6mr230077eju.504.1593129398833; Thu, 25 Jun 2020 16:56:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593129398; cv=none; d=google.com; s=arc-20160816; b=Yc4uZZ4mitSSqf4KlL823noyIyJpQy7q65hGwOIDzUb+RU2pgC1b7dZt22lnYElHSZ GfozXO9QBP/D1PjX7ThLCaLKukOeabOLMvwUL7nuPZ7alRvliCHqSEFlH0xTz+MquWXL COw4uve/UpwOPMQ8B1chBUTB5v74xt2gVvii+CozpNrhfSi5qZ28JOJ2T1HjzX+YFOfy Tl7X8taw+tr9CL8yolJosLVcfOPfVF2jsK3v/25LAZKLk6tryxHPjQZxputADge+lCwz n9brpoKWgDQt7hF6VjmuoT4VUxaNZG6x/5MQXeUNeCzLOMnPQ9ckxNenXej/sl9mM7Iw +2JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bt621Mvq6sTu3O5dwOUoRdDK9kmboXkltfi2CNgRw4Y=; b=NThGv4fMsSfiol0nJ51pCCSLWyjs8ffv9YWwMH0D4xyHE1yzVsTMbp+4gLfrst7gxY ZdLoxlNDHCWTqGrwxSvcjfeLOPdhV9qgd/nqpj8sonbRLzKwONCTm+KC8Aqpr+HtXlgI H4VMKLljX3q6Eu/v0cIyf8eFnEQXZp9Xogs2KseN6W5LhUOQNTpVjqUh921SzmYZbS4W XMncBzZCd0Ug0D0S+iSyH/hB9h4hbIb6cmpEf4ZAxV/ZqqhFiLzd3xDFTVq6kuy23bRT +TcYW8DAsDEMQyPxlGM0uTWkd70TYvMslz4TQ6XXyt0R/BxRv/2spoPzr6R82AqbVTbQ E90Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm20si20115604ejc.159.2020.06.25.16.56.15; Thu, 25 Jun 2020 16:56:38 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405100AbgFYXK0 (ORCPT + 99 others); Thu, 25 Jun 2020 19:10:26 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:38898 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404432AbgFYXK0 (ORCPT ); Thu, 25 Jun 2020 19:10:26 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0U0iD16h_1593126623; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U0iD16h_1593126623) by smtp.aliyun-inc.com(127.0.0.1); Fri, 26 Jun 2020 07:10:23 +0800 From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH] mm/page_alloc: fallbacks at most has 3 elements Date: Fri, 26 Jun 2020 07:10:22 +0800 Message-Id: <20200625231022.18784-1-richard.weiyang@linux.alibaba.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MIGRAGE_TYPES is used to be the mark of end and there are at most 3 elements for the one dimension array. Reduce to 3 to save little memory. Signed-off-by: Wei Yang --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index dabec744ceff..8b0df4aeb8c6 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2266,7 +2266,7 @@ struct page *__rmqueue_smallest(struct zone *zone, unsigned int order, * This array describes the order lists are fallen back to when * the free lists for the desirable migrate type are depleted */ -static int fallbacks[MIGRATE_TYPES][4] = { +static int fallbacks[MIGRATE_TYPES][3] = { [MIGRATE_UNMOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_MOVABLE, MIGRATE_TYPES }, [MIGRATE_MOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_UNMOVABLE, MIGRATE_TYPES }, [MIGRATE_RECLAIMABLE] = { MIGRATE_UNMOVABLE, MIGRATE_MOVABLE, MIGRATE_TYPES }, -- 2.20.1 (Apple Git-117)