Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp765618rwd; Thu, 1 Jun 2023 06:22:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7i4PwoL+pUTFRrAkT4tevt2F5BTe5dfBXVjO3HlY0gVlr/IFLBmjB0J0EKlmG8jGDL66LT X-Received: by 2002:a05:6a20:1058:b0:101:4e04:cef1 with SMTP id gt24-20020a056a20105800b001014e04cef1mr9110334pzc.27.1685625748759; Thu, 01 Jun 2023 06:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685625748; cv=none; d=google.com; s=arc-20160816; b=zGB/SsP67LaBHnFpcWorWnQABx1vxKcayvV95rFz/I4hyQx0CPHo+z1BVJx2SqhIjI 7TNNpQFiK3SfUvMzwL5v5eq55h0cW4tMlbmlGbynCdneGawM5XH58orlo8lRrRomHJn4 DbstEkFsQAqW/lTngWESX5DbuN/E8VfZpB8DepwfhZMoOZj6puk0van+JMxh+fYYkrOc BqNiNhAbJZymY10vmYl0eIZGhHLLLtfjj5y59v4sC0uxEhJKkEKFD/26ADSaVSfY9u+k ZwH/YeVUUQEq8sEnXwb7N4l3ppGkPFHJ5unE9oU9bIOHio7Magbq5T+bTsDUREZF41DB FTOg== 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; bh=T0Eoky1lbNQcAa9Gx3toJXuqNq+fNeKJF5cXn77jxgo=; b=Qu0r8PEdZVU4tRjseaSCc5SpcvsJZoCpEPmQXsaaTrngg5vuLcNhkdOjrAK2wraEFy EwmbVw2NFC6ihT88D61cC8eE6Ncj9YF/L3n5cLZe6JvrPoiTW3cKK6csO8U+X2PGhzdJ sLQWooSev8Pn2DY3dizFJ3PAh2Hos3hCEq88nz9tH6hLj+KLS9fmxo4mnzQOYOr6UC52 2Xa1vlFprjTVmwl2yFvg+TYqbEtCAoH6FxRHUlKaKBo01plDPuNqvV7DD/y09HgtuR+N D2gcka86YDmwcmD6eEuaWgjcEi6yp7yJaK+KaMO2mRhLA9zVM10vOzqw8NKG3ilBw2HH NkSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=PfHpuSqw; 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 c21-20020aa79535000000b0064f4745a3b0si2921012pfp.295.2023.06.01.06.22.16; Thu, 01 Jun 2023 06:22:28 -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=PfHpuSqw; 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 S233035AbjFANTj (ORCPT + 99 others); Thu, 1 Jun 2023 09:19:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbjFANTh (ORCPT ); Thu, 1 Jun 2023 09:19:37 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E781D97 for ; Thu, 1 Jun 2023 06:19:36 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 351CcLTS017367; Thu, 1 Jun 2023 13:19:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=T0Eoky1lbNQcAa9Gx3toJXuqNq+fNeKJF5cXn77jxgo=; b=PfHpuSqwmDF53VSIZVtfXYKymZq2OWyULIreut2m0j5pUKha+mZimrf2Db4wfMuEjknQ TuwthPLYUj0nBdku/YEfsGYQTYjsrQuw4brGRs7TgaQTSNewfS5PNA0R780Iv8NnOoVA 3u5zrXHkUNjkEKUwpHnjINcFwTZdBrclaZkxBXuL5Qg8cHUkeqpytL9Slm5pHANtbeTS zoluwYD5JZXB6uH6680k2eHJ2ktIcUnTcikYWgKguuzjwNPI1tqfRnuavqynpbZdZ724 TX46zSbHbvJO4m+zOC6yGpwpjciPbwFBnv7oib6yfsEMaGahpDGxrd8pWEoFdRSjzSzH hw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qxugr8358-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Jun 2023 13:19:28 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 351DJ3PP030653 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 1 Jun 2023 13:19:03 GMT Received: from [10.50.22.21] (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.42; Thu, 1 Jun 2023 06:19:01 -0700 Message-ID: Date: Thu, 1 Jun 2023 18:48:57 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] mm: madvise: fix uneven accounting of psi Content-Language: en-US To: Andrew Morton CC: , , , , References: <1685531374-6091-1-git-send-email-quic_charante@quicinc.com> <20230531150449.56311ca2ea6184b413517672@linux-foundation.org> From: Charan Teja Kalla In-Reply-To: <20230531150449.56311ca2ea6184b413517672@linux-foundation.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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-GUID: f0wxzNPNp5cnsjtEH1oQWGXQUBzfFWU9 X-Proofpoint-ORIG-GUID: f0wxzNPNp5cnsjtEH1oQWGXQUBzfFWU9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-01_08,2023-05-31_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 mlxscore=0 clxscore=1015 impostorscore=0 adultscore=0 malwarescore=0 phishscore=0 bulkscore=0 mlxlogscore=918 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2306010117 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 Thanks Andrew!! On 6/1/2023 3:34 AM, Andrew Morton wrote: >> This patch is tested on Android, Snapdragon SoC with 8Gb RAM, 4GB swap >> mounted on zram which has 2GB of backingdev. The test case involved >> launching some memory hungry apps in an order and do the proactive >> reclaim for the app that went to background using madvise(MADV_PAGEOUT). >> We are seeing ~40% less total values of psi mem some and full when this >> patch is combined with [1]. > Does this accounting inaccuracy have any perceptible runtime effects? > With the testcase mentioned, we are able to achieve better app concurrency(It is a measure on Android of how many apps that can survive by not getting killed by lmkd(which relies on PSI events to take the decissions) by the end of the testcase). The total memsome and memfull psi events(measured in usec) are as below: mem PSI w/o patch with patch some 61255313 21867736 full 31353138 15391454 Thanks, Charan >