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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 DA1E9C41604 for ; Tue, 6 Oct 2020 22:31:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4347521582 for ; Tue, 6 Oct 2020 22:31:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4347521582 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 02E286B005C; Tue, 6 Oct 2020 18:31:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EFA426B005D; Tue, 6 Oct 2020 18:31:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC2BB6B0062; Tue, 6 Oct 2020 18:31:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0025.hostedemail.com [216.40.44.25]) by kanga.kvack.org (Postfix) with ESMTP id AC35A6B005C for ; Tue, 6 Oct 2020 18:31:45 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3850A362A for ; Tue, 6 Oct 2020 22:31:45 +0000 (UTC) X-FDA: 77342948970.01.meal24_0604664271ca Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 1992D100480AB for ; Tue, 6 Oct 2020 22:31:45 +0000 (UTC) X-HE-Tag: meal24_0604664271ca X-Filterd-Recvd-Size: 2129 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Tue, 6 Oct 2020 22:31:44 +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 8D80CAA55; Tue, 6 Oct 2020 22:31:43 +0000 (UTC) Subject: Re: [PATCH 6/9] mm, page_alloc: cache pageset high and batch in struct zone To: David Hildenbrand , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Michal Hocko , Pavel Tatashin , Oscar Salvador , Joonsoo Kim References: <20200922143712.12048-1-vbabka@suse.cz> <20200922143712.12048-7-vbabka@suse.cz> From: Vlastimil Babka Message-ID: Date: Wed, 7 Oct 2020 00:31:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 9/25/20 12:34 PM, David Hildenbrand wrote: > On 22.09.20 16:37, Vlastimil Babka wrote: >> @@ -6300,6 +6310,8 @@ static __meminit void zone_pcp_init(struct zone *zone) >> * offset of a (static) per cpu variable into the per cpu area. >> */ >> zone->pageset = &boot_pageset; >> + zone->pageset_high = BOOT_PAGESET_HIGH; >> + zone->pageset_batch = BOOT_PAGESET_BATCH; > > I do wonder if copying from any cpuvar inside boot_pageset is cleaner. > > zone->pageset_high = &this_cpu_ptr(zone->pageset)->pcp.high; Uh I don't know. That would be like admitting they can be different than what was initialized. But then they could be also different depending on what cpu we happen to run it on. It's why I added the #define BOOT_PAGESET_* in the first place - to ensure same value used in two places. Makes sense?