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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14437C433EF for ; Mon, 2 May 2022 09:53:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 58B5D6B0072; Mon, 2 May 2022 05:53:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5378C6B0073; Mon, 2 May 2022 05:53:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4275E6B0074; Mon, 2 May 2022 05:53:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 340906B0072 for ; Mon, 2 May 2022 05:53:26 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id F2C702B9AD for ; Mon, 2 May 2022 09:53:25 +0000 (UTC) X-FDA: 79420340412.07.F24D746 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf06.hostedemail.com (Postfix) with ESMTP id B6C41180079 for ; Mon, 2 May 2022 09:53:23 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id E57751F8AB; Mon, 2 May 2022 09:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1651485203; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YtO7nfzlefXiRENj/ugjHQpqg0xyePTCQXyxKhRQBRU=; b=i9QB+6VMM8y1aM5RRHjv8Yy4uhYwv/EAcLyuoBPoe1Ldvsxb3M74y1ffpr00MTa3Wy41fE 3jMo19xrDehbPvmVbRRc9pRmUVsmC0568Nvw9a0+4VNPbF/33qZltmtlTvJOIPuM+orLiF 6tl9ukzGTwv4dUxtJVsNuSBcjdXx22I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1651485203; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YtO7nfzlefXiRENj/ugjHQpqg0xyePTCQXyxKhRQBRU=; b=9RYJ47aH3zDMBae3MhAZ7npe5RF5XxtRL2tDT1utv8sFQnvgpeTR02ZZhhgZnvzWKmV7Qd 7/Yef710mWpmbeDQ== Received: from suse.de (unknown [10.163.43.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 0B3312C141; Mon, 2 May 2022 09:53:23 +0000 (UTC) Date: Mon, 2 May 2022 10:53:21 +0100 From: Mel Gorman To: Wonhyuk Yang Cc: Andrew Morton , Ohhoon Kwon , JaeSang Yoo , Jiyoup Kim , Donghyeok Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/page_alloc: cache the result of node_dirty_ok() Message-ID: <20220502095321.GA20579@suse.de> References: <20220430011032.64071-1-vvghjk1234@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20220430011032.64071-1-vvghjk1234@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Stat-Signature: qxmt9nmnhc7e7sbpu8ew1uixawf8q4dk X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: B6C41180079 X-Rspam-User: Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=i9QB+6VM; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=9RYJ47aH; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf06.hostedemail.com: domain of mgorman@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=mgorman@suse.de X-HE-Tag: 1651485203-19078 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 Sat, Apr 30, 2022 at 10:10:32AM +0900, Wonhyuk Yang wrote: > To spread dirty page, nodes are checked whether > it reached the dirty limit using the expensive > node_dirty_ok(). To reduce the number of calling > node_dirty_ok(), last node that hit the dirty > limit is cached. > > Instead of caching the node, caching both node > and it's result of node_dirty_ok() can reduce > the number of calling node_dirty_ok() more than > before. > > Signed-off-by: Wonhyuk Yang Acked-by: Mel Gorman I agree with Andrew that last_pgdat_dirty_ok is a better name. The old name was also bad but seeing as the area is being changed, fixing the name is harmless. -- Mel Gorman SUSE Labs