Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3335922rdb; Wed, 13 Sep 2023 09:01:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFOGrjrworiNmhVWpSPJKt0kSdbPgPUmxAP2SujK6+dG7cPFdgsApNNkcSCB+EPWRCtUZds X-Received: by 2002:a05:6a00:1796:b0:68f:ca89:9c71 with SMTP id s22-20020a056a00179600b0068fca899c71mr3998918pfg.10.1694620911669; Wed, 13 Sep 2023 09:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694620911; cv=none; d=google.com; s=arc-20160816; b=RoYpTP6f6voF+ULjGmnYlkOQ9agIPAzv1dT0Lt5uMUNeetfGCQEDhNbB/TaacH74Uu 0p5isAyxgGyrpPy4pVNLUgk0ejOTRZ7aB8dmxHaIDBmYhABLvrZfF3eH98JW1zN5cHZS /jpuvJbHoqNuEnzVBmo+J8TIy0rKNjo03gGaMqpzfs9Hr+OmVmXexPWB0mdEeSnVGf8c byzk8bnjJqVmCfLa7uP/yaSirGQ9TYlL38CD4PHjXcw75WfZF84musaUYDEnJaLs5W23 6Wl0Y7TmqVD/rP5QWLy79W2VsThbRs0HFcm1XeU05nLFpSoqpolYUWQOqlP4qV5N9hfa qLnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=4+RU0KIou9w9utdTOlx7DUMD1ZLCYn2PIUlTEIwiPpQ=; fh=9j7hZ88xpWgt/1BeXMFXvYTl455Ma1izhK41dlZW4jI=; b=VDbqz26Svjw2CNtv5jt9ou2jCaaOG/9UgnHmO/+0OFngsJWOQRwyeT6Na2KSADQDoB sxfTsLUILpDXP8MiGb72BleFaDGT9fA3/bNlyeFDygbmFqNrZh9Ur2aXx+LTtLDCRswo AqWbuYwtwcPHnHOBWNCfpH6yuTdiAazmPhx0uWluRmH91qVglGLqKp5RfCPcIibACBKe Ss6jr2vqtkjObJf7SMFW5GSQt7EzFkoStqfq8q+SE6W/OY/+OzdSwKQQSBaJIYH4/LUE RdHSeLRbf+M5UFL6Gg1qUuKHBEO+cZlbBH2R2L1VUomCmyUDTjQtyKWm9q3TfPbsNIBM CQpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=aCFCxXd6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=l4wqlyRC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id cu12-20020a056a00448c00b0068fe2453ad2si3951462pfb.132.2023.09.13.09.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 09:01:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=aCFCxXd6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=l4wqlyRC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 32A0E81ED050; Wed, 13 Sep 2023 06:34:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240893AbjIMNer (ORCPT + 99 others); Wed, 13 Sep 2023 09:34:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239451AbjIMNeq (ORCPT ); Wed, 13 Sep 2023 09:34:46 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2FFB19B6 for ; Wed, 13 Sep 2023 06:34:42 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6F3341F385; Wed, 13 Sep 2023 13:34:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1694612081; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4+RU0KIou9w9utdTOlx7DUMD1ZLCYn2PIUlTEIwiPpQ=; b=aCFCxXd6M2W+F3UzYQaNY77FvUcYJ8khNloHjjQtvOvMWDWoOut6dh0nHef5yWXRhWn1wD Wf21nb56OtPECrnLRO+jLxC2Lz/oDags+po3ayu+WQW/Je43EMNMpr2bvSm9xY0oM86Yfu uLq/vyzRMBh03DbYk2YRcGGHgCw10CE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1694612081; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4+RU0KIou9w9utdTOlx7DUMD1ZLCYn2PIUlTEIwiPpQ=; b=l4wqlyRCrqZWIrDDXO1m6/Gv1kjwqx0BpcdarYxHEY5KwbWpK5OeZ6ThGY1Nu8OPyOTBI4 1TwptIIoeGmSlLBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 539EA13582; Wed, 13 Sep 2023 13:34:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KYO6E3G6AWXLSAAAMHmgww (envelope-from ); Wed, 13 Sep 2023 13:34:41 +0000 Message-ID: <0ab2495b-c110-c1b6-bd37-dbd163412a48@suse.cz> Date: Wed, 13 Sep 2023 15:34:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH 1/6] mm: page_alloc: remove pcppage migratetype caching Content-Language: en-US To: Johannes Weiner Cc: Andrew Morton , Mel Gorman , Miaohe Lin , Kefeng Wang , Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20230911195023.247694-1-hannes@cmpxchg.org> <20230911195023.247694-2-hannes@cmpxchg.org> <20230912145028.GA3228@cmpxchg.org> <320c16a7-96b7-65ec-3d80-2eace0ddb290@suse.cz> <20230913132412.GA45543@cmpxchg.org> From: Vlastimil Babka In-Reply-To: <20230913132412.GA45543@cmpxchg.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 13 Sep 2023 06:34:48 -0700 (PDT) X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email On 9/13/23 15:24, Johannes Weiner wrote: > Hello Vlastimil, > > On Wed, Sep 13, 2023 at 11:33:52AM +0200, Vlastimil Babka wrote: >> On 9/12/23 16:50, Johannes Weiner wrote: >> > From 429d13322819ab38b3ba2fad6d1495997819ccc2 Mon Sep 17 00:00:00 2001 >> > From: Johannes Weiner >> > Date: Tue, 12 Sep 2023 10:16:10 -0400 >> > Subject: [PATCH] mm: page_alloc: optimize free_unref_page_list() >> > >> > Move direct freeing of isolated pages to the lock-breaking block in >> > the second loop. This saves an unnecessary migratetype reassessment. >> > >> > Minor comment and local variable scoping cleanups. >> >> Looks like batch_count and locked_zone could be moved to the loop scope as well. > > Hm they both maintain values over multiple iterations, so I don't > think that's possible. Am I missing something? True, disregard :D >> > Suggested-by: Vlastimil Babka >> > Signed-off-by: Johannes Weiner >> >> Reviewed-by: Vlastimil Babka > > Thanks! I'll send this out properly with your tag. np!