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 EF09FC54EE9 for ; Thu, 8 Sep 2022 15:02:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 36D1C6B0072; Thu, 8 Sep 2022 11:02:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 31D0E8D0001; Thu, 8 Sep 2022 11:02:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 20BDA6B0074; Thu, 8 Sep 2022 11:02:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 0F6DC6B0072 for ; Thu, 8 Sep 2022 11:02:01 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id D251240B6F for ; Thu, 8 Sep 2022 15:02:00 +0000 (UTC) X-FDA: 79889233200.03.AB71C47 Received: from outbound-smtp20.blacknight.com (outbound-smtp20.blacknight.com [46.22.139.247]) by imf23.hostedemail.com (Postfix) with ESMTP id E612214008C for ; Thu, 8 Sep 2022 15:01:47 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp20.blacknight.com (Postfix) with ESMTPS id 43F841C452C for ; Thu, 8 Sep 2022 16:01:46 +0100 (IST) Received: (qmail 30297 invoked from network); 8 Sep 2022 15:01:46 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.198.246]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 8 Sep 2022 15:01:46 -0000 Date: Thu, 8 Sep 2022 15:55:38 +0100 From: Mel Gorman To: Zhenhua Huang Cc: akpm@linux-foundation.org, linux-mm@kvack.org, quic_tingweiz@quicinc.com Subject: Re: [PATCH v2] mm/page_owner.c: remove redudant drain_all_pages Message-ID: <20220908145538.in2ttdaejp2zxwxk@techsingularity.net> References: <1662633204-10044-1-git-send-email-quic_zhenhuah@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1662633204-10044-1-git-send-email-quic_zhenhuah@quicinc.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662649309; a=rsa-sha256; cv=none; b=LOw1kN5glQxyjmTxWFSGtCxatUq2EZklRBbAKaVAL6wpaemlOHuYgC2km8CgAcvdrezyV/ lYq5t8nSBFQjczUoAoHag3/rVivoYYisckP4k4WpahTGdQjzwbQwdOMwtuy3KbjJ0i2CVy dyTfoeAlr9ZCu6rF6DZ8Ptf7oj1UbjY= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf23.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.247 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662649309; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wd/i8uKP0xM2SrZTsw4hQHwwvr2YomWmKbmkEa6rays=; b=4X7xWUGXzYqwOvUY+eKXwLMAuttozLa1ToF1GQsBl8ghxz2g9ACYZRUDHUd4EELjkJ4Wri EnUQ6RkbLFE4kH7T5Bal9TAEWfHj5eL5TkzbOZRbiOnJrdw7LWZXG0KnvJO+U2xjsPvS/A fLgT5G7q9+i/VQcWZb1vt+Lh04iEjZY= Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf23.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.247 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Rspam-User: X-Rspamd-Queue-Id: E612214008C X-Rspamd-Server: rspam09 X-Stat-Signature: iony8czo95crbwna81x9m3jqiw75jk1w X-HE-Tag: 1662649307-188342 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 Thu, Sep 08, 2022 at 06:33:24PM +0800, Zhenhua Huang wrote: > Remove an expensive and unnecessary operation as PCP pages are safely > skipped when reading page owner. PCP pages can be skipped because > PAGE_EXT_OWNER_ALLOCATED is cleared. > > With draining PCP pages, these pages are moved to buddy list so they > can be identified as buddy pages and skipped quickly. Although it improved > efficiency of PFN walker, the drain is guaranteed expensive that is > unlikely to be offset by a slight increase in efficiency when skipping > free pages. > > PAGE_EXT_OWNER_ALLOCATED is cleared in the page owner reset path below: > free_unref_page > -> free_unref_page_prepare > -> free_pcp_prepare > -> free_pages_prepare which do page owner > reset > -> free_unref_page_commit which add pages into pcp list > > Acked-by: Mel Gorman > Signed-off-by: Zhenhua Huang Should be; Signed-off-by: Zhenhua Huang Acked-by: Mel Gorman Otherwise looks good! -- Mel Gorman SUSE Labs