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=-8.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 5FF43C3279D for ; Tue, 6 Oct 2020 22:04:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 74F1A208B6 for ; Tue, 6 Oct 2020 22:04:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74F1A208B6 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 708D66B005C; Tue, 6 Oct 2020 18:04:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B83D6B005D; Tue, 6 Oct 2020 18:04:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A5E0900002; Tue, 6 Oct 2020 18:04:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0203.hostedemail.com [216.40.44.203]) by kanga.kvack.org (Postfix) with ESMTP id 2DD746B005C for ; Tue, 6 Oct 2020 18:04:05 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AB87F180AD801 for ; Tue, 6 Oct 2020 22:04:04 +0000 (UTC) X-FDA: 77342879208.23.skin53_29049b3271ca Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 9068F37606 for ; Tue, 6 Oct 2020 22:04:04 +0000 (UTC) X-HE-Tag: skin53_29049b3271ca X-Filterd-Recvd-Size: 2340 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Tue, 6 Oct 2020 22:04:04 +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 D3C80AC1D; Tue, 6 Oct 2020 22:04:02 +0000 (UTC) Subject: Re: [PATCH 2/9] mm, page_alloc: calculate pageset high and batch once per zone To: Michal Hocko Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pavel Tatashin , David Hildenbrand , Oscar Salvador , Joonsoo Kim References: <20200922143712.12048-1-vbabka@suse.cz> <20200922143712.12048-3-vbabka@suse.cz> <20201005125247.GX4555@dhcp22.suse.cz> From: Vlastimil Babka Message-ID: <325c9545-a307-5bbe-261c-43aaeda34322@suse.cz> Date: Wed, 7 Oct 2020 00:04:02 +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: <20201005125247.GX4555@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000037, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 10/5/20 2:52 PM, Michal Hocko wrote: > On Tue 22-09-20 16:37:05, Vlastimil Babka wrote: >> We currently call pageset_set_high_and_batch() for each possible cpu, which >> repeats the same calculations of high and batch values. >> >> Instead call the function just once per zone, and make it apply the calculated >> values to all per-cpu pagesets of the zone. >> >> This also allows removing the zone_pageset_init() and __zone_pcp_update() >> wrappers. >> >> No functional change. >> >> Signed-off-by: Vlastimil Babka >> Reviewed-by: Oscar Salvador >> Reviewed-by: David Hildenbrand > > I like this. One question below > Acked-by: Michal Hocko Thanks. > I hope I am not misreading the diff but it seems that setup_zone_pageset > is calling pageset_init which is then done again by > zone_set_pageset_high_and_batch as a part of pageset_update No, pageset_init() is not called again from there, so must be insufficient diff context giving that impression.