Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp182492iob; Mon, 2 May 2022 16:30:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdylAqHbL4giHt/G9rH7vE2krSS7EKn5m3NybIJecpVHD6B3Y2NGeapE0PlKPH7I5ahdT1 X-Received: by 2002:a05:6a00:14d5:b0:50d:6a8f:d0e2 with SMTP id w21-20020a056a0014d500b0050d6a8fd0e2mr13355554pfu.55.1651534239853; Mon, 02 May 2022 16:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651534239; cv=none; d=google.com; s=arc-20160816; b=w/4A9aq+HJqOZb/qKEX+k8ufHMREQKK0c6svD1J+uSD5VP4nOaqRgxMeVQn6ByYSDj NGb0FpVVAHUft+GxFfBPb/GrCHf4p1KU+4MFosfo5ski1XzjIsq1Kt3O+1jYHVLxC0n1 YOtmCl/zGV81D1b6yZQZ19dgkyhKk40+6STj3Ye4VNHl80Yc2VjIO3ABZziFe9Z+OggY mnmRxnLSzfm0GHOxCDPp04PD5NtSEEaPDo2pTR5ZLd6YWcUHM3ipUJXL7HfU8TfFGIyY fqDku8cOcSjbZhHAco+Wav0iBZhBBdmakbYiklFIN29zxEqb0P7/QfTtNLIrNJBDJnZu u5Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=YtO7nfzlefXiRENj/ugjHQpqg0xyePTCQXyxKhRQBRU=; b=mQHuiyVfMlPkmkhrPvOK3bIJhgbLr15W3wfV7n9parwMDB/6TEF9ivfUziNduCVkSr 84Xr0MFRy9WYmb4kNV9ynoBMJw+fg/lJWISZhze+tOzOdhnkOAY3AOxjrcpICsPRM6tI 3A8UpBsD+OVmdx9bsON1X6PJvAgI0kTX7vHckLL61TOEd9O7qdxPvxJzPA8+Xv51k4PO vmgjHtCiVxSXnf1aKhY5Q2OAbc0xa/Zx7MaO5gaBdg6a47CMB3+DuGeenW+DNIUnOs2c kC7fo57bisYcPYi2U7+obIHxG96FODYbwSMcqLcHxYIUSkOcJFPAMKqwZTMz1sYteDNR aJ2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=i9QB+6VM; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=9RYJ47aH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b4-20020a170902d50400b0015eb40a671csi1236088plg.313.2022.05.02.16.30.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 16:30:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=i9QB+6VM; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=9RYJ47aH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5624E31528; Mon, 2 May 2022 16:30:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357584AbiEBKDh (ORCPT + 99 others); Mon, 2 May 2022 06:03:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384706AbiEBJ7R (ORCPT ); Mon, 2 May 2022 05:59:17 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 950B34A3DA for ; Mon, 2 May 2022 02:53:25 -0700 (PDT) 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-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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