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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 008E3C433ED for ; Mon, 12 Apr 2021 10:01:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 513666121E for ; Mon, 12 Apr 2021 10:01:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 513666121E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B40E36B0036; Mon, 12 Apr 2021 06:01:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AF0D76B006C; Mon, 12 Apr 2021 06:01:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B8466B006E; Mon, 12 Apr 2021 06:01:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0031.hostedemail.com [216.40.44.31]) by kanga.kvack.org (Postfix) with ESMTP id 7ECB06B0036 for ; Mon, 12 Apr 2021 06:01:55 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2D0B65DDA for ; Mon, 12 Apr 2021 10:01:55 +0000 (UTC) X-FDA: 78023273790.28.EE6142E Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf02.hostedemail.com (Postfix) with ESMTP id EE3B240002F4 for ; Mon, 12 Apr 2021 10:01:40 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 72338AF1A; Mon, 12 Apr 2021 10:01:53 +0000 (UTC) Subject: Re: [PATCH 1/9] mm/page_alloc: Rename alloced to allocated To: Mel Gorman , Andrew Morton Cc: Chuck Lever , Jesper Dangaard Brouer , Christoph Hellwig , Alexander Duyck , Matthew Wilcox , Ilias Apalodimas , LKML , Linux-Net , Linux-MM , Linux-NFS References: <20210325114228.27719-1-mgorman@techsingularity.net> <20210325114228.27719-2-mgorman@techsingularity.net> From: Vlastimil Babka Message-ID: Date: Mon, 12 Apr 2021 12:01:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210325114228.27719-2-mgorman@techsingularity.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: EE3B240002F4 X-Stat-Signature: xa15hmp16nboyr31hciz5pttrt3aqtix X-Rspamd-Server: rspam02 Received-SPF: none (suse.cz>: No applicable sender policy available) receiver=imf02; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1618221700-619696 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 3/25/21 12:42 PM, Mel Gorman wrote: > Review feedback of the bulk allocator twice found problems with "alloced" > being a counter for pages allocated. The naming was based on the API name > "alloc" and was based on the idea that verbal communication about malloc > tends to use the fake word "malloced" instead of the fake word mallocated. > To be consistent, this preparation patch renames alloced to allocated > in rmqueue_bulk so the bulk allocator and per-cpu allocator use similar > names when the bulk allocator is introduced. > > Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka > --- > mm/page_alloc.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index dfa9af064f74..8a3e13277e22 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -2908,7 +2908,7 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order, > unsigned long count, struct list_head *list, > int migratetype, unsigned int alloc_flags) > { > - int i, alloced = 0; > + int i, allocated = 0; > > spin_lock(&zone->lock); > for (i = 0; i < count; ++i) { > @@ -2931,7 +2931,7 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order, > * pages are ordered properly. > */ > list_add_tail(&page->lru, list); > - alloced++; > + allocated++; > if (is_migrate_cma(get_pcppage_migratetype(page))) > __mod_zone_page_state(zone, NR_FREE_CMA_PAGES, > -(1 << order)); > @@ -2940,12 +2940,12 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order, > /* > * i pages were removed from the buddy list even if some leak due > * to check_pcp_refill failing so adjust NR_FREE_PAGES based > - * on i. Do not confuse with 'alloced' which is the number of > + * on i. Do not confuse with 'allocated' which is the number of > * pages added to the pcp list. > */ > __mod_zone_page_state(zone, NR_FREE_PAGES, -(i << order)); > spin_unlock(&zone->lock); > - return alloced; > + return allocated; > } > > #ifdef CONFIG_NUMA >