Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5373866rwb; Wed, 7 Sep 2022 01:37:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR4EuNXak/JBnxdbjzYxiA6s03CjItLt97UCvcFXzHTg4ae+sT5l81PE7Ri0/1l8aAiaisQF X-Received: by 2002:aa7:c956:0:b0:43b:206d:c283 with SMTP id h22-20020aa7c956000000b0043b206dc283mr2158756edt.381.1662539823644; Wed, 07 Sep 2022 01:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662539823; cv=none; d=google.com; s=arc-20160816; b=zsveyDx+BESolH5svamV97UmbINdtOYYd/SEKVtPPk+47IEIZAZjGDqlFB89cB2UIz tTvLebH+g7dIsh/XlFggJXfmBDH0wCsfKWqovd3zMANwEpYsYWLiGdbWOR7v4FgCw5mA HIKkCBAZK3Lshx4xRSDB4s30+EYLz/dXzSV56axl9pmqCiO0sIEQ1S7Ymz9QL7tXaq0u 7WUMPcwvOX+sbB/IbkEkM2dhAPrLJxRtYusr3Hk+TAVAdBHTDs+caJxFqDJx0MDFD1ak ViNvyHgDfIbKK00oUlrkj1LIX+hkf8OhkIBu2vpjAHjS2yXlyRc7IdqccM8Xb/qrbx4j FVuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=kVGBhnmmVLaHsutvMDyoZ6zUGI/cfItdEBWL5jrgzrs=; b=YuRtvviv2UyxEGHV3l5w3UoO3MTdrNt+PEeplcL0XvUYfNUJ3Ej2zqhzw9qA2d40/y feaU3NUPvMHNxyFvXvuTyMRXToWNahxM9u03ATx1/5boWiRaxR1BMBIlEzkC8YIs854X W8/N/0RS4QDlWOW9M8fE6NkoqvoZmiPW7KJ+meOjI6S7tg0D55UoEQu4V6CVCiWGZkbZ va9YOfF02Ro2xaMqAlvcHxsqUKlOpAn5qex2X8g1HHmRKyo4dS42hoFFgFkUQNMgoQLj hwqY9Kxb7RpAQA9N4tf9sxzKSx1AgUvLk4LBOha7Lgjd7a7XEIc9qwNzU5VLVG6zJQNr Ifuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NXJOwgjw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a056402064c00b0044ee88a08b1si2541078edx.277.2022.09.07.01.36.37; Wed, 07 Sep 2022 01:37:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NXJOwgjw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbiIGICK (ORCPT + 99 others); Wed, 7 Sep 2022 04:02:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbiIGIBf (ORCPT ); Wed, 7 Sep 2022 04:01:35 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49862A9C0B for ; Wed, 7 Sep 2022 01:01:32 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2877icrp014506; Wed, 7 Sep 2022 08:01:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=kVGBhnmmVLaHsutvMDyoZ6zUGI/cfItdEBWL5jrgzrs=; b=NXJOwgjwrnnfvpccDtjCSByUVZtHx318iPVit2cn155g4PrFJS5BVvmchTZo0l/eWDdb qlwET6ewxg7dpu4FGk+ZOyJQnbI+L+gJMBXI5+cplbMFaOaKg/YOhstTBCGfdfZajFfI W6RbaqOfRQ0Z6BrVmhpA0JXWbbc/byn1DRlTW2iJXBmgUUnu0koZdsr+7lx2CSicgbxd 4kXTL8hRBhGE6YOaRldsE/cBnP/MJTHqZ7kroMQnYtZEM+ww1bRVIGQFGX5Pz1mIwyyX uOtps3otqvZ1PeH+O2NJ/tfH5MefLM044TeHc8YTHJA4rbkV6IMLTdx74o+g41Iycr4H LQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3je25nukps-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Sep 2022 08:01:29 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28781SMD031449 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 7 Sep 2022 08:01:28 GMT Received: from zhenhuah-gv.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Wed, 7 Sep 2022 01:01:26 -0700 From: Zhenhua Huang To: CC: Zhenhua Huang , , Subject: [PATCH] mm/page_owner.c: remove redudant drain_all_pages Date: Wed, 7 Sep 2022 16:01:13 +0800 Message-ID: <1662537673-9392-1-git-send-email-quic_zhenhuah@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: xnoyN8B2iXRIzLILMg82jI9AAG_v1Rxu X-Proofpoint-GUID: xnoyN8B2iXRIzLILMg82jI9AAG_v1Rxu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-07_04,2022-09-06_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 phishscore=0 malwarescore=0 suspectscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1011 mlxscore=0 mlxlogscore=887 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209070034 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Page owner info of pages in pcp list have already been reset: 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 It can also be confirmed from dump that page owner info of pcp pages are correct. Hence there is no more need to drain when reading. Signed-off-by: Zhenhua Huang --- mm/page_owner.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index 90023f9..54f3e03 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -524,8 +524,6 @@ read_page_owner(struct file *file, char __user *buf, size_t count, loff_t *ppos) while (!pfn_valid(pfn) && (pfn & (MAX_ORDER_NR_PAGES - 1)) != 0) pfn++; - drain_all_pages(NULL); - /* Find an allocated page */ for (; pfn < max_pfn; pfn++) { /* -- 2.7.4